snapd
snapd copied to clipboard
Pass error messages to the client on global refresh (bug 1928567)
https://bugs.launchpad.net/snapd/+bug/1928567 https://forum.snapcraft.io/t/refresh-awareness-kills-security/36818
The issue could be partially solved with a minor client-side modification, to behave like snap refresh; snap refresh --list
. But it would lack the list of running processes and atomicity.
~~With this commit, snap refresh
output structure becomes:~~
[List of updated snaps]
[Error messages]
["All snaps up to date."]
~~Another change is that "All snaps up to date" message will be shown even if all snaps has been successfully refreshed.~~
Build and ./run-checks
passed.
we were thinking of solving the bug using the warning mechanism instead
It was easy.
But cmd/snap/cmd_warnings.go
seems buggy. At least, it outputs wrong number of new warnings.
@iomezk Thank you for such great work! just a small side note, we usually try to avoid force push after a PR has received reviews to make it easier to incrementally review the changes, for reference please check CONTRIBUTING.md.
@iomezk Thank you for your effort, This looks really good.
We are just missing some unit tests. If you don't have the capacity to write them, I can help. It would be great if we get the PR moving forward.
I can pick this up and add the missing tests.
I will rebase this on master to see how it behaves with tests from this year.
@zyga I think https://github.com/snapcore/snapd/pull/13780 would solve this issue from another angle (only blocker is that is hidden behind the refresh-app-awareness-ux flag)
Hey! iomezk has not signed the Canonical CLA which is required to get this contribution merged on this project.
Please head over to https://ubuntu.com/legal/contributors to read more about it.
We need to unblock the CLA and we need to discuss how this works with experimental features that are in development. In either case this won't make it for 2.63