New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
o/snapstate: support user-services when refreshing snaps #13905
base: master
Are you sure you want to change the base?
o/snapstate: support user-services when refreshing snaps #13905
Conversation
6908f90
to
1762c26
Compare
ef0cd88
to
fa70343
Compare
fa70343
to
7a3d4e1
Compare
I dropped the spread test I was doing, we were already covering this functionality in the unit tests - and extending them to cover the user services part made sense. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some comments/questions
overlord/snapstate/handlers.go
Outdated
// Insert it into the overview, into the 'found' list. Re-use the entire | ||
// list for all users (-1) as there won't be any difference between users | ||
// in this specific case (and to allow us to keep a singular list of services | ||
// that need to be disabled). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this comment is not very clear, can we use a single list because hooks cannot target single users via snapctl commands?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your comment let me to a missing case of support for user-services. The service tracking code for hooks did not account for user-services - I added this in here, as it is required for completeness in the refresh handling.
5fd71d8
to
abe095c
Compare
I split out the wrapper changes: #13957 |
Implements the remaining functionality to support user-services when refreshing snaps. SnapState now also keeps track of the last disabled services for user-services.