-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
DockerOperateur TaskFlow - improve logs #39620
base: main
Are you sure you want to change the base?
DockerOperateur TaskFlow - improve logs #39620
Conversation
Needed when log messages are buffered, and to align the ident of TraceBacks Also add 2 arguments to the python command in order to follow the evolutions of apache#31747
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)
|
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.
Congratulations on your first MR. Can you add the test case for your change?
Formatting the traceback with logger prefix message will beautify the logs. However, it is difficult to traceback whether the logs from the same code line or multiple code lines.
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.
-0.9 Your PR makes the log more beautiful in Airflow webserver, but it also makes it harder to process and analyze via log tools (datadog, cloudwatch, ELK...)
Damn ! I did not expect that. I'm not using such tools... Do you think there is a way to allow both approaches to work ? I thought of indenting the multi-line messages with white spaces matching the length of the logging prefix, but unfortunately the buffering of the messages make such that it is not possible to differentiate one multiline message (such as a Trace back) or multiple messages that are sent at the same time. |
I would be a +0.5 for the log adjustments - nt using ELK but bothered with the output especially in conjunction as also reported in #39686 . My proposal is to make it configurable, maybe as a parameter on the operator? |
Closes #39319
This PR provide two minor changes :
python3 /tmp/script.py /tmp/script.in /tmp/script.out none /tmp/script.out
Indeed, the script used in the DockerOperator in the same as the one in PythonVirtualenvOperator (see airflow/utils/python_virtualenv_script.jinja2 )
Illustration of the multiline splits
Before :
Now
^ 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.