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

Change log level of serialization information #30239

Merged
merged 1 commit into from
Mar 22, 2023

Conversation

potiuk
Copy link
Member

@potiuk potiuk commented Mar 22, 2023

The #30094 introduced info log on how long serialization takes, and coupled with the fact that serialization register() function is called by just importing the serde module it caused a potential of breaking airflow CLI method that produce formatted output (with --output flag with json format).

Those methods block warnings and logs, but only after initial CLI parsing is complete and the right CLI method is selected (with @suppress_logs_and_warnings). However in case serde module is imported before, default "info" log level might cause the log to be printed before it has been blocked.

The log level seemed to be left here by mistake (it's not a good practice to log anything at import time), so changing it to debug seems appropriate.


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an 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 a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

The apache#30094 introduced info log on how long serialization takes, and
coupled with the fact that serialization register() function
is called by just importing the serde module it caused a potential
of breaking airflow CLI method that produce formatted output
(with `--output` flag with json format).

Those methods block warnings and logs, but only after initial
CLI parsing is complete and the right CLI method is selected
(with @suppress_logs_and_warnings). However in case serde module
is imported before, default "info" log level might cause the log
to be printed before it has been blocked.

The log level seemed to be left here by mistake (it's not a good
practice to log anything at import time), so changing it to debug
seems appropriate.
@potiuk potiuk merged commit 894741e into apache:main Mar 22, 2023
@potiuk potiuk deleted the fix-log-level-of-serialization-code branch March 22, 2023 14:44
@pierrejeambrun pierrejeambrun added this to the Airflow 2.6.0 milestone Mar 22, 2023
@pierrejeambrun pierrejeambrun added changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) type:misc/internal Changelog: Misc changes that should appear in change log and removed changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) labels Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:serialization type:misc/internal Changelog: Misc changes that should appear in change log
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants