Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andrewphelpsj
Copy link
Collaborator

Removes an unused slice, unsure what it was originally used for.

@andrewphelpsj andrewphelpsj added the Simple 😃 A small PR which can be reviewed quickly label May 16, 2024
@andrewphelpsj
Copy link
Collaborator Author

Actually, after reading this undo handler more carefully, does it even do anything?

Copy link
Contributor

@MiguelPires MiguelPires left a 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:"}
Copy link
Collaborator

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?

Copy link
Collaborator

@pedronis pedronis left a 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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Simple 😃 A small PR which can be reviewed quickly
Projects
None yet
4 participants