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

Move Post Execution Log Grouping behind Exception Print #40146

Conversation

jscheffl
Copy link
Contributor

@jscheffl jscheffl commented Jun 8, 2024

In PR #38021 we added log grouping into log printing. We all love this feature but I got some negative feedback for cases where people look for a failed task: If you are not an Airflow expert and you look for the exception/eror in the logs, in many cases the exception is not printed. If the task execution fails in an exception the exception trace will be in the "Post task execution logs" group that you need to un-fold.

This PR moves the "Post task execution logs" behind the exception print. Side effect is (due to placement) that error handling code might be called before (on success/skip handler will be called after/inside the group though).

Before - no exception in failed task:
image

...and you needed to un-fold to see it - note that on_failure_callback is also executed before post block:
image

After - exception is moved in front of log group:
image

Plus tasks without exception have no change in beautiful text:
image

@jscheffl jscheffl requested review from kaxil, XD-DENG and ashb as code owners June 8, 2024 20:33
@jscheffl jscheffl added this to the Airflow 2.9.3 milestone Jun 8, 2024
@jscheffl jscheffl added area:UI Related to UI/UX. For Frontend Developers. type:bug-fix Changelog: Bug Fixes labels Jun 8, 2024
Copy link
Contributor

@syedahsn syedahsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@eladkal eladkal merged commit 297ad80 into apache:main Jun 8, 2024
50 checks passed
romsharon98 pushed a commit to romsharon98/airflow that referenced this pull request Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:UI Related to UI/UX. For Frontend Developers. type:bug-fix Changelog: Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants