-
Notifications
You must be signed in to change notification settings - Fork 107
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
Log stderr warnings as warnings #772
Conversation
✅ Deploy Preview for conda-lock ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
aecc14f
to
bb6b911
Compare
@ctcjab, could you please review this? |
The last commit is chasing a flake unrelated to #770. |
LGTM, thanks for the quick fix! 🙌 |
conda_lock/invoke_conda.py
Outdated
log_level = logging.WARNING | ||
elif log_level == logging.WARNING: | ||
if not line.startswith(" "): | ||
log_level = logging.ERROR |
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.
Just to make sure, will it always be true that any non-indented line that the subprocess writes to stderr (that does not succeed a line beginning with "warning") is actually an error?
If that's a safe bet, please ignore, but if there's still a nontrivial chance of false positives, is it worth exposing some option to control this, as an escape hatch?
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 for the feedback. I fleshed it out quite a bit more, making the log level detection more robust, and also giving you two levels of escape hatches: CONDA_LOCK_SUBPROCESS_STDERR_DEFAULT_LOG_LEVEL
and CONDA_LOCK_SUBPROCESS_STDERR_LOG_LEVEL_OVERRIDE
.
Hmm, now |
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, the new escape hatches are a great improvement!
9ebaead
to
49a1f7a
Compare
The bad JSON output seems to have been due to the now-yanked mamba v2.0.6. |
Description
Closes #770