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

Fixes #18943 null execution date on insert to task_fail violating NOT NULL #18979

Merged
merged 2 commits into from
Oct 14, 2021

Conversation

robinedwards
Copy link
Contributor

Insert into task_fail table fails when reaping zombies from the dag processor.

The dag_run property isn't populated by ti.refresh_from_db() or by the failure handler.
This resulted in an IntegrityError violating the NOT NULL constraint on execution_date in the task_fail table on Airflow 2.2.0

See #18943 for details

The dag_run property isn't populated by refresh_from_db or when this is
called from the failure handler when reaping zombies. This resulted in
an IntegrityError violating the NOT NULL constraint on task_fail
@potiuk potiuk added this to the Airflow 2.2.1 milestone Oct 14, 2021
@github-actions github-actions bot added the full tests needed We need to run full set of tests for this PR to merge label Oct 14, 2021
@github-actions
Copy link

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.

Copy link
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

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

Nice one.

Copy link
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

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

@uranusjr is right - session is missing

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Copy link
Member

@uranusjr uranusjr left a comment

Choose a reason for hiding this comment

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

I've committed the session change directly

@kaxil kaxil merged commit 2966e3c into apache:main Oct 14, 2021
jedcunningham pushed a commit that referenced this pull request Oct 14, 2021
…NULL (#18979)

Fixes #18943 null exec date on insert to task_fail

The dag_run property isn't populated by refresh_from_db or when this is
called from the failure handler when reaping zombies. This resulted in
an IntegrityError violating the NOT NULL constraint on task_fail

(cherry picked from commit 2966e3c)
@jedcunningham jedcunningham added the type:bug-fix Changelog: Bug Fixes label Apr 7, 2022
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 type:bug-fix Changelog: Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants