-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
Disable suppress_logs_and_warning in cli when debugging #13180
Disable suppress_logs_and_warning in cli when debugging #13180
Conversation
In some cases commands like 'dags list' can be used for debug purposes. The problem is that we are suppresing logs and warnings in some cases to make the output nice and clean. This commit disable this functionality if logging level is set to DEBUG.
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.
The change itself looks good to me.
Meanwhile a quick idea for your consideration (may be incorrect):
I remember the main purpose of introducing suppress_logs_and_warning
is that otherwise outputs in YAML/JSON formats cannot be parsed properly in a pipe (via jq
for example).
So an alternative solution can be disable suppress_logs_and_warning
for table
output?
I suppose you meant the json and yaml output formats. Sure, this is an option but in my opinion commands should provide requested information and nothing more. Especially that in some cases the errors and warnings (for example from dags) can be a real mess |
Make sense to me, and my opinion about that alternative solution was not strong anyway. Will approve, but please re-push to re-run the CI before we merge this please. |
The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest master at your convenience, or amend the last commit of the PR, and push it with --force-with-lease. |
In my opinion, it's worth adding the --verbose switch to enable logs. Mainly to make it easier to read log import, which is now only available when you run:
These logs now don't show up when you start
For now, I always remove this decorator for development: @turbaszek @XD-DENG WDYT? |
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 think that logs should not be available for other logging levels as well.
The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest master at your convenience, or amend the last commit of the PR, and push it with --force-with-lease. |
Some CLI tests are failing :) |
Should be fixed now |
Random test failing! Merging! |
In some cases commands like 'dags list' can be used for debug purposes.
The problem is that we are suppresing logs and warnings in some cases
to make the output nice and clean. This commit disable this functionality
if logging level is set to DEBUG.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.