SnapRevs update failed on duplicity

I am getting this when trying to release version 306 (fix outdated security packages). I had screwed up earlier and released 302. Now for some reason this will not run and the store web page just goes back to 302 after releasing 306 and hitting Save. Something is really borked.

$ snapcraft release -t duplicity 306 stable,candidate,beta
2022-07-06 14:01:44.808 Starting Snapcraft 7.0.9
2022-07-06 14:01:44.808 Logging execution to '/home/ken/.cache/snapcraft/log/snapcraft-20220706-140144.807674.log'
2022-07-06 14:01:44.808 Raw pre-parsed sysargs: args={'help': False, 'verbose': False, 'quiet': False, 'trace': True, 'version': False} filtered=['release', 'duplicity', '306', 'stable,candidate,beta']
2022-07-06 14:01:44.808 General parsed sysargs: command='release' args=['duplicity', '306', 'stable,candidate,beta']
2022-07-06 14:01:44.810 Command parsed sysargs: Namespace(channels='stable,candidate,beta', name='duplicity', progressive_percentage=None, revision=306)
2022-07-06 14:01:44.810 Found legacy credentials stored in /home/ken/.config/snapcraft/snapcraft.cfg
2022-07-06 14:01:44.810 Found legacy credentials stored in /home/ken/.config/snapcraft/snapcraft.cfg
2022-07-06 14:01:44.810 Found legacy credentials stored in PosixPath('/home/ken/.config/snapcraft/snapcraft.cfg')
2022-07-06 14:01:44.812 Storing credentials for 'snapcraft' on 'dashboard.snapcraft.io' in keyring 'auth MemoryKeyring'.
2022-07-06 14:01:44.812 Retrieving credentials for 'snapcraft' on 'dashboard.snapcraft.io' from keyring 'auth MemoryKeyring'.
2022-07-06 14:01:44.812 HTTP 'POST' for 'https://dashboard.snapcraft.io/dev/api/snap-release/' with params None and headers {'Authorization': '<macaroon>', 'User-Agent': 'snapcraft/7.0.9 ubuntu/20.04 (x86_64)'}
2022-07-06 14:01:45.244 Retrieving credentials for 'snapcraft' on 'dashboard.snapcraft.io' from keyring 'auth MemoryKeyring'.
2022-07-06 14:01:45.244 HTTP 'POST' for 'https://login.ubuntu.com/api/v2/tokens/refresh' with params None and headers {'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'snapcraft/7.0.9 ubuntu/20.04 (x86_64)'}
2022-07-06 14:01:45.835 Storing credentials for 'snapcraft' on 'dashboard.snapcraft.io' in keyring 'auth MemoryKeyring'.
2022-07-06 14:01:45.835 Retrieving credentials for 'snapcraft' on 'dashboard.snapcraft.io' from keyring 'auth MemoryKeyring'.
2022-07-06 14:01:45.836 HTTP 'POST' for 'https://dashboard.snapcraft.io/dev/api/snap-release/' with params None and headers {'Authorization': '<macaroon>', 'User-Agent': 'snapcraft/7.0.9 ubuntu/20.04 (x86_64)'}
2022-07-06 14:01:46.550 craft-store error: Store operation failed:
- resource-not-ready: SnapRevs update failed.
2022-07-06 14:01:46.550 Full execution log: '/home/ken/.cache/snapcraft/log/snapcraft-20220706-140144.807674.log'

Sorry you ran into this. One question, can you tell me which timezone those timestamps are on?

  • Daniel

It looks like one of the services thinks it created revision 306 which is why you can see it in your list, but the service that actually hosts the revisions doesn’t have it. I think it happened due to an uncommon network glitch that caused them to get out of sync.

I confirmed your other revisions are there.

The easiest way to get through this, if possible, is to do a rebuild of the snap so new revisions are generated (a trivial version number bump could work, for example - or a small tweak to the snapcraft.yaml file) and release those instead.

I’ll track down in more detail what happened so it doesn’t again in the future.

  • Daniel

I’ve resynced the database state and the revision exists everywhere it should. Can you try again now?

Daniel,

Thanks for the quick response. I was able to do a remote-build this morning and everything promoted as it should.

…Ken