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
Bugfix: fixes a CLI argument bug for the conda-debug command #4448
Conversation
670f90c
to
78da400
Compare
798e6e3
to
84f04df
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.
I'm not thrilled about adding a new submodule but can see the value in standardizing validators. Perhaps we should identify a few other places where using validators will help simplify the code before we move ahead with this change?
d73ae5b
to
d2ca8de
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.
Looking good, just noticed that there's more we can remove since you removed the unused if
clause.
@travishathaway you may also want to rebase/squash 15f9605 to change the author/committer |
c16b7fd
to
d78f075
Compare
d78f075
to
46be298
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.
Everything looks good, just want to make sure we aren't changing any user-facing messages that don't need to be changed.
Putting this on hold until I can resolve a comment from another one of our projects: (I just need to implement |
46be298
to
203590d
Compare
The |
for more information, see https://pre-commit.ci
Co-authored-by: Ken Odegard <kodegard@anaconda.com>
for more information, see https://pre-commit.ci
fixing linter issue more changes based on PR
581bd3d
to
11fdfb2
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.
Nice!
Addresses the following issue:
Although at first glance this issue seem pretty straight forward, it was not. The bug unearthed a dormant code path that was revealed by some interesting behavior in Python.
After some debugging, it became obvious that this line wasn't doing what it intended to do:
conda-build/conda_build/cli/main_debug.py
Line 63 in 4d1d522
If I'm correct, the intent of the above line was to filter out everything out that was not a "conda package file", so in theory, directories would be diverted to this code path. In reality, it also allows strings like,
/tmp/some-dir/
to evaluate asTrue
, which means directories have always been sent to the nextelse
block (currently the working and expected behavior).Why is that so? It all has to do with the fact that
'' in 'somestring
evaluates toTrue
. Check out the example for details:With all that being said, I think it is fair to assume that the code executed under this
if
statement was never actually working in the first place because when it is run, it generates the error that we see. Therefore, I made the decision to entirely remove the execution of this code.I'm not entirely sure why that was ever there in the first place, but it's definitely been broken for a bit. Additionally, the
conda_build.cli.main_debug
module had zero test coverage when I began, so it's very easy to imagine that this broke a while back, and we were unaware of it.If you know more about this command, please comment, so we can find the best way to fix it!