Skip to content

Log traceback in trigger excs#21213

Merged
uranusjr merged 2 commits into
apache:mainfrom
malthe:log-traceback-in-trigger-excs
Feb 28, 2022
Merged

Log traceback in trigger excs#21213
uranusjr merged 2 commits into
apache:mainfrom
malthe:log-traceback-in-trigger-excs

Conversation

@malthe

@malthe malthe commented Jan 29, 2022

Copy link
Copy Markdown
Contributor

If an exception is raised in a triggerer job during (asynchronous) execution of a trigger, the exception is logged locally, but the traceback is not sent to the task log. Instead, the fail-handler simply logs a message that the trigger has failed.

With the suggested change, the formatted traceback is persisted in the task instance and included as part of a logging line when the task resumes to handle the failure.

@boring-cyborg boring-cyborg Bot added the area:Scheduler including HA (high availability) scheduler label Jan 29, 2022
@malthe
malthe force-pushed the log-traceback-in-trigger-excs branch 2 times, most recently from ea75bb1 to 08e020f Compare January 30, 2022 08:48
@github-actions

Copy link
Copy Markdown
Contributor

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 main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.

@github-actions github-actions Bot added the full tests needed We need to run full set of tests for this PR to merge label Jan 31, 2022
Comment thread tests/jobs/test_triggerer_job.py Outdated

@dstandish dstandish left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

one small fixup

Comment thread airflow/models/taskinstance.py Outdated
Comment thread tests/jobs/test_triggerer_job.py Outdated
@potiuk

potiuk commented Feb 6, 2022

Copy link
Copy Markdown
Member

Can you please rebase @malthe - we fixed a few issues in main.

@malthe
malthe force-pushed the log-traceback-in-trigger-excs branch from c891e10 to e0ca3e0 Compare February 6, 2022 20:16
@malthe
malthe force-pushed the log-traceback-in-trigger-excs branch from e0ca3e0 to 98ca266 Compare February 9, 2022 06:30
@eladkal eladkal added this to the Airflow 2.2.5 milestone Feb 19, 2022
@malthe

malthe commented Feb 28, 2022

Copy link
Copy Markdown
Contributor Author

@eladkal got time to check up on this one?

@uranusjr
uranusjr merged commit 4ad21f5 into apache:main Feb 28, 2022
ephraimbuddy pushed a commit that referenced this pull request Mar 20, 2022
ephraimbuddy pushed a commit that referenced this pull request Mar 22, 2022
ephraimbuddy pushed a commit that referenced this pull request Mar 22, 2022
@ephraimbuddy ephraimbuddy added the type:bug-fix Changelog: Bug Fixes label Mar 22, 2022
ephraimbuddy pushed a commit that referenced this pull request Mar 22, 2022
ephraimbuddy pushed a commit that referenced this pull request Mar 22, 2022
ephraimbuddy pushed a commit that referenced this pull request Mar 24, 2022
ephraimbuddy pushed a commit that referenced this pull request Mar 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Scheduler including HA (high availability) scheduler full tests needed We need to run full set of tests for this PR to merge type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants