Closed Bug 1491262 Opened 2 years ago Closed 2 years ago

Make snap store push idempotent


(Release Engineering :: Release Automation: Snap, enhancement)

Not set


(Not tracked)



(Reporter: rail, Assigned: jlorenzo)



(Whiteboard: [releaseduty])


(5 files) shows a good example where the first run pushes the snap to the snap store, but the task dies for some reason. The second rerun tries to push the snap again, but the store refuses to accept the "same content".

We should probably ignore that particular exception or check if we pushed the same image already.
Whiteboard: [releaseduty]
I agree with this idea. Root cause of the bug is tracked in bug 1488396.
Depends on: 1488396
Would you have some headspace for review, Aki? Feel free to defer, this is not urgent.
Attachment #9011760 - Flags: review?(aki)
Comment on attachment 9011760 [details] [review]
[pushsnapscript] PR: Make task idempotent

Comments are in the PR; clearing the review flag til that's ready again.
Attachment #9011760 - Flags: review?(aki)
This is now deployed onto production. I'll keep an eye to tomorrow's job.
Closed: 2 years ago
Resolution: --- → FIXED
ni: johan

it was raised in postmortem that 60.2.2esr failed. Do you think this bug should be re-opened or file new?
Flags: needinfo?(jlorenzo)
Even though I deployed comment 8 after the 60.2.2esr job ran, the last beta failed because of a lack of permissions[1]. Reopening bug to revoke then generate new macaroons.

Flags: needinfo?(jlorenzo)
Resolution: FIXED → ---
I revoked the existing macaroons[1]. I generated new ones by running:

> docker pull snapcore/snapcraft:stable
> docker run -ti snapcore/snapcraft:stable bash
> snapcraft export-login --snaps=firefox --channels=beta --acls=package_push,package_release,package_access --expires="2019-10-06T00:00:00" macaroon_file
> snapcraft export-login --snaps=firefox --channels=candidate --acls=package_push,package_release,package_access --expires="2019-10-06T00:00:00" macaroon_file
>  snapcraft export-login --snaps=firefox --channels=esr/stable,esr/candidate --acls=package_push,package_release,package_access --expires="2019-10-06T00:00:00" macaroon_file

I reran beta[2]: it passed. I recreated the last esr[3] and release[4] tasks. Release passed but not ESR. That's a bug in the implementation of the patch. I'm on it.

[1] by changing the password of the master account - that's the only supported way
Depends on: 1411559
Depends on: 1462066
For ESR, command is actually:
> snapcraft export-login --snaps=firefox --channels=esr,esr/stable,esr/candidate --acls=package_push,package_release,package_access --expires="2019-10-06T00:00:00" macaroon_file
Attachment #9014749 - Flags: review?(aki) → review+
Attachment #9015219 - Flags: review?(rgarbas) → review+
We've had a couple of beta passing since the deployment. I reran the last task to see how it goes[1] => It's all green! Please let me know if you see another type of bustage. Chances are: it can now be solved just by a rerun :) 

Closed: 2 years ago2 years ago
Resolution: --- → FIXED
See Also: → 1554501
Blocks: 1579854
You need to log in before you can comment on or make changes to this bug.