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

Fix Sentry handler from LocalTaskJob causing error #18119

Merged
merged 1 commit into from
Sep 9, 2021

Conversation

robinedwards
Copy link
Contributor

The enrich_errors method assumes the first argument to the function
its wrapping is a method on a TaskInstance when in fact it can also be a LocalTaskJob. In the case of the mini scheduler :

def _run_mini_scheduler_on_child_tasks(self, session=None) -> None:

I believe this issue was introduced with #16289

This is now handled by extracting the task_instance from the LocalTaskJob

Closes #18118

@ashb ashb added this to the Airflow 2.1.4 milestone Sep 9, 2021
@github-actions
Copy link

github-actions bot commented Sep 9, 2021

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 Sep 9, 2021
airflow/sentry.py Outdated Show resolved Hide resolved
The `enrich_errors` method assumes the first argument to the function
its patch is a TaskInstance when infact it can also be a LocalTaskJob.

This is now handled by extracting the task_instance from the
LocalTaskJob
@kaxil kaxil merged commit f97ddf1 into apache:main Sep 9, 2021
kaxil pushed a commit that referenced this pull request Sep 10, 2021
The `enrich_errors` method assumes the first argument to the function
its patch is a TaskInstance when infact it can also be a LocalTaskJob.

This is now handled by extracting the task_instance from the
LocalTaskJob

Closes #18118

(cherry picked from commit f97ddf1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
full tests needed We need to run full set of tests for this PR to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exception within LocalTaskJob._run_mini_scheduler_on_child_tasks brakes Sentry Handler
3 participants