snapd should track what user installed what, and use the appropriate macaroon in auto-refresh

Bug #1733910 reported by John Lenton
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fix Released
Samuele Pedroni

Bug Description

Currently if a user installs a private snap, the snap never gets refreshed: the refresh doesn't use the user's macaroon, so no refresh exists.

The goal would be to have a single request going to the store with the appropriate macaroon(s).

As a first step we should start looping over the users, and doing a refresh per user.

We should also start tracking what user installed what, and if all private or buyable snaps have a user associated, then we just loop over those users instead of over all of them.

We might be able to migrate from the first case to the second by back-filling with what works.

Changed in snapd:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Samuele Pedroni (pedronis) wrote :

we need to improve our spread tests situation regarding private snaps when tackling this

Revision history for this message
Samuele Pedroni (pedronis) wrote :

In 2.30 we started tracking for each snap the userID of the installing user, snap refresh foo will also set this for a snap that didn't have yet the information.

The plan now is to use that information to refresh snaps in groups with the credentials of their installing users.

Changed in snapd:
assignee: nobody → Samuele Pedroni (pedronis)
Changed in snapd:
status: Confirmed → In Progress
Revision history for this message
Samuele Pedroni (pedronis) wrote :
Revision history for this message
Samuele Pedroni (pedronis) wrote :

a fix for this has now landed (will be in 2.31), in the end we don’t group but query for all snaps for all user creds (to make a best effort to respect validation with the current APIs)

Changed in snapd:
status: In Progress → Fix Committed
Changed in snapd:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.