We discussed where to take this feature from here and here are some quick notes:
New changes for v2 (from top to bottom as they arrive)
- add
snapctl refresh-available
that instantly (without talking to the store) tells snaps that a refresh is pending [1w] - add new lock that inhibits application startup during refresh process [2w]
- the lock needs to be safe from unrelated errors - bound to process, bound to ephemeral file system object
- add cgroup-based app termination mechanics to snapd (20/80 approach, simple polling until cgroups v2 make it easy) [2w]
- add new UX for command line and GUI apps that displays refresh progress while that lock is
held or while current is gone, and we are attempting to start the app- cli just shows the changes via snap socket [2-3w]
- snap run sends signal to the session agent to display the UI and waits in the back for the refresh of the app to change [2+w]
- session agent UI response for the signal [2-3w] (1w with zenity)
Interesting things but not for v2
- add
snapctl refresh-and-rerun
that apps can use to tell snapd to actively refresh them after the app terminates