Closed Bug 1491262 Opened 2 years ago Closed 2 years ago

Make snap store push idempotent

Categories

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

enhancement
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: rail, Assigned: jlorenzo)

References

Details

(Whiteboard: [releaseduty])

Attachments

(5 files)

https://tools.taskcluster.net/groups/U2ZUXzf2Rsyx95EJpLGvzQ/tasks/FWxDvSmKQceWptl86itg7g/details 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.
Status: NEW → RESOLVED
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?

https://tools.taskcluster.net/groups/LWx29n8ySd6tO5Ne6Lyl4A/tasks/d1HWgG8ATPy2TCfIAWn0ng/details
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.

[1] https://tools.taskcluster.net/groups/YOF9mLY1Tq2ecHuiJovB0Q/tasks/NuHaNNFLSV2mByWBZX9J5g/runs/1/logs/public%2Flogs%2Flive_backing.log#L580
Status: RESOLVED → REOPENED
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
[2] https://tools.taskcluster.net/groups/YOF9mLY1Tq2ecHuiJovB0Q/tasks/NuHaNNFLSV2mByWBZX9J5g
[3] https://tools.taskcluster.net/groups/Cs2DmCNIR8ubPK401fFV_A/tasks/S_HmQ59QRYOfHaaAmlg07Q/runs/1/logs/public%2Flogs%2Flive_backing.log#L735
[4] https://tools.taskcluster.net/groups/WwlOZKW3STeA9V3kWfTMqw/tasks/OQ53QPMeRvqg_lGo4_yk_w/runs/0/logs/public%2Flogs%2Flive_backing.log#L598
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 :) 

[1] https://tools.taskcluster.net/groups/Zeg5PDf7RfuUcWiG1gHNjg/tasks/M1WO0_B5RLSiPjw9dpcZ7w/runs/1/logs/public%2Flogs%2Flive_backing.log#L554
Status: REOPENED → RESOLVED
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.