Race condition on SCA's dashboard when updating snaprevs may led to a bad channel map

Bug #1855152 reported by Natalia Bidart on 2019-12-04
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snap Store
Undecided
Unassigned

Bug Description

This bug report is based on https://forum.snapcraft.io/t/store-shows-incorrect-latest-release-for-amd64-arch-but-arm64-and-i386-are-correct/14438/8

When issuing many release requests to the dashboard's snap release API, very close in time and all requests targeting the same channel but different architectures; the internals for updating SnapRevs (get_snaprevs_releases) would send the revision information for the whole channel without distinction of the architecture, leading to potential overrides of revisions for other architectures being updated by a different request.

From the forum post above, what I think happened was:

request 1 came in to release revision 96 (amd64) to stable
request 2 came in to release revision 95 (i386) to stable

both requests were received at almost the same time, and both were started to be processed concurrently. Request 1 completed OK, but request 2 took a little bit more and when get_snaprevs_releases was run, the channel map that was sent to snaprevs had the outdated information for amd64 sending revision 92 as their current.

We need to ensure updates to snaprevs are done also per architecture.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers