-
Notifications
You must be signed in to change notification settings - Fork 574
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/h/ctlcmd: add a snapctl fail command #14525
o/h/ctlcmd: add a snapctl fail command #14525
Conversation
The snapctl fail commands rejects changes in a registry transaction. Signed-off-by: Miguel Pires <[email protected]>
7e4d136
to
dfed99a
Compare
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.
Should this be some sort of snapctl debug fail <...>
command?
Separately I would make it take an argument that somehow implies where the failure is injected. As written it's somewhat generic in naming but very specific in semantics which feels wrong.
@zyga I don't think it should be a debug subcommand but maybe a registry subcommand? |
Signed-off-by: Miguel Pires <[email protected]>
Signed-off-by: Miguel Pires <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #14525 +/- ##
=======================================
Coverage 78.85% 78.86%
=======================================
Files 1079 1080 +1
Lines 145615 145666 +51
=======================================
+ Hits 114828 114875 +47
- Misses 23601 23605 +4
Partials 7186 7186
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
The changes look really good. I agree regarding moving this to a registry sub-command snapctl registry fail <reason>
. Also, It would be nice to have a small spread test with a simple test snap.
Sorry, I thought I had commented here yesterday but looks like I forgot to click submit. Samuele's input was that this could be applicable to other hooks (so it would stay at The spread test will be added once we have all the required pieces (I have a ticket for it already) |
Signed-off-by: Miguel Pires <[email protected]>
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.
LGTM
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.
Thanks!
Add a
snapctl fail <reason>
command to rejects changes in a registry transaction inchange-view-<plug>
hooks.