-
Notifications
You must be signed in to change notification settings - Fork 76
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
Removes dead code for conflict-test #1797
base: main
Are you sure you want to change the base?
Conversation
@@ -30,7 +30,6 @@ import ( | |||
) | |||
|
|||
const ( | |||
EchoCmd = "echo" |
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.
Unrelated, but also unused.
@@ -60,7 +60,6 @@ var ( | |||
envExport bool | |||
noBrowser bool | |||
compose bool | |||
conflictTest bool |
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 don't see anywhere in our code that sets this variable. It used to exist at one time as a flag, but doesn't anymore. This would always evaluate to false
, so we remove the code that branches if this value is true
.
if conflictTest { | ||
err = d.conflictTest(testHomeDirectory, newImageName, newAirflowVersion) | ||
if err != nil { | ||
return err | ||
} | ||
} |
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.
Nowhere in our code base do we seem to set conflictTest
to true
. There should be no way for this branch to ever run. This conflictTest
used to exist as a flag on the CLI commands, but seems to have been removed.
b1ca490
to
e0230f8
Compare
…r/astro-cli into remove-conflict-test-dead-code
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.
Thank you @schnie ❤️
Description
This PR removes some seemingly dead code. This
conflictTest
variable will always evaluate tofalse
, so we're removing all the code that would run if we branched on this value beingtrue
. Seems like it used to be a flag that we've removed along the way. Not sure how else this code would ever run.Update: I found this digging through the history. Looks like we intentionally removed the functionality, but didn't remove the dead code. @kushalmalani even suggested it here.
🎟 Issue(s)
No issue, just noticed while looking at other things.
🧪 Functional Testing
📸 Screenshots
📋 Checklist
make test
before taking out of draftmake lint
before taking out of draft