-
Notifications
You must be signed in to change notification settings - Fork 562
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: remove unused slice that is only appended to #13972
base: master
Are you sure you want to change the base?
Conversation
Actually, after reading this undo handler more carefully, does it even do anything? |
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.
I see:
// TODO: telemetry about errors here
at the end of the handler so I'm guessing this was meant to collect information about the error to eventually do something with it? But it was added in 2017 so the plan might've changed. Maybe @pedronis remembers
@@ -629,21 +629,17 @@ func (m *SnapManager) undoPrepareSnap(t *state.Task, _ *tomb.Tomb) error { | |||
return nil | |||
} | |||
|
|||
var logMsg []string | |||
var snapSetup string | |||
dupSig := []string{"snap-install:"} |
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.
dupSig appears to be equally useless?
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.
in theory we can empty the whole definition and just leave the TODO about telemetry for errors, a different approach would be to replace the code with a short text that list what we were/would want to capture
at some past point this code was sending the computed info to the errortracker but we removed this because that's wasn't working/scaling for us (afair)
Removes an unused slice, unsure what it was originally used for.