Fix KubernetesPodOperator to forward pod log levels to Airflow task logs#64829
Open
Vishwaspatel2401 wants to merge 3 commits intoapache:mainfrom
Open
Fix KubernetesPodOperator to forward pod log levels to Airflow task logs#64829Vishwaspatel2401 wants to merge 3 commits intoapache:mainfrom
Vishwaspatel2401 wants to merge 3 commits intoapache:mainfrom
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
|
Author
|
@jedcunningham @hussein-awala @jscheffl — could someone please approve |
Previously all pod container output was logged at INFO level regardless of the original log level. Now ERROR, WARNING, DEBUG, CRITICAL prefixes are detected and forwarded at the correct Python logging level. closes: apache#64820
2ea6434 to
64ec2ff
Compare
Use self.log.info() for INFO-level messages and self.log.log(level, ...) only for non-INFO levels, restoring backward compatibility with existing tests that mock log.info directly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously all pod container output was logged at INFO level regardless of the original log level. Now ERROR, WARNING, DEBUG, CRITICAL prefixes are detected and forwarded at the correct Python logging level.
closes: #64820
Was generative AI tooling used to co-author this PR?
Yes — Generative AI tooling was used to assist in authoring this PR.
Generated-by: AI tooling following the guidelines
Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
When adding dependency, check compliance with the ASF 3rd Party License Policy.
For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.