-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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 running child tasks in a subdag after clearing a successful subdag #14776
Fix running child tasks in a subdag after clearing a successful subdag #14776
Conversation
83d1b8d
to
cd21515
Compare
cd21515
to
a6eac67
Compare
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.
This test isn't right yet -- it's passing on master so isn't correctly exercising the bug
a6eac67
to
1bb5e65
Compare
Resolved. Thanks for info on testing!!! |
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 master at your convenience, or amend the last commit of the PR, and push it with --force-with-lease. |
After successfully running a SUBDAG, clearing it (including downstream+recursive) doesn't trigger the inner tasks. Instead, the subdag is marked successful and the inner tasks all stay cleared and aren't re-run. The above problem is because the DagRun state of the subdags are not updated after clearing. This PR solves it by updating the DagRun state of all DAGs including subdags when include_subdags is True
1bb5e65
to
cec7ef2
Compare
#14776) After successfully running a SUBDAG, clearing it (including downstream+recursive) doesn't trigger the inner tasks. Instead, the subdag is marked successful and the inner tasks all stay cleared and aren't re-run. The above problem is because the DagRun state of the subdags are not updated after clearing. This PR solves it by updating the DagRun state of all DAGs including subdags when include_subdags is True (cherry picked from commit 0521635)
Closes: apache/airflow#15374 This pull request follows apache/airflow#14776. Clearing a subdag with Downstream+Recursive does not automatically set the state of the parent dag so that the downstream parent tasks can execute. GitOrigin-RevId: a4211e276fce6521f0423fe94b01241a9c43a22c
Closes: apache/airflow#15374 This pull request follows apache/airflow#14776. Clearing a subdag with Downstream+Recursive does not automatically set the state of the parent dag so that the downstream parent tasks can execute. GitOrigin-RevId: a4211e276fce6521f0423fe94b01241a9c43a22c
Closes: apache/airflow#15374 This pull request follows apache/airflow#14776. Clearing a subdag with Downstream+Recursive does not automatically set the state of the parent dag so that the downstream parent tasks can execute. GitOrigin-RevId: a4211e276fce6521f0423fe94b01241a9c43a22c
Closes: apache/airflow#15374 This pull request follows apache/airflow#14776. Clearing a subdag with Downstream+Recursive does not automatically set the state of the parent dag so that the downstream parent tasks can execute. GitOrigin-RevId: a4211e276fce6521f0423fe94b01241a9c43a22c
Closes: apache/airflow#15374 This pull request follows apache/airflow#14776. Clearing a subdag with Downstream+Recursive does not automatically set the state of the parent dag so that the downstream parent tasks can execute. GitOrigin-RevId: a4211e276fce6521f0423fe94b01241a9c43a22c
Closes: apache/airflow#15374 This pull request follows apache/airflow#14776. Clearing a subdag with Downstream+Recursive does not automatically set the state of the parent dag so that the downstream parent tasks can execute. GitOrigin-RevId: a4211e276fce6521f0423fe94b01241a9c43a22c
Closes: apache/airflow#15374 This pull request follows apache/airflow#14776. Clearing a subdag with Downstream+Recursive does not automatically set the state of the parent dag so that the downstream parent tasks can execute. GitOrigin-RevId: a4211e276fce6521f0423fe94b01241a9c43a22c
Closes: apache/airflow#15374 This pull request follows apache/airflow#14776. Clearing a subdag with Downstream+Recursive does not automatically set the state of the parent dag so that the downstream parent tasks can execute. GitOrigin-RevId: a4211e276fce6521f0423fe94b01241a9c43a22c
Closes: apache/airflow#15374 This pull request follows apache/airflow#14776. Clearing a subdag with Downstream+Recursive does not automatically set the state of the parent dag so that the downstream parent tasks can execute. GitOrigin-RevId: a4211e276fce6521f0423fe94b01241a9c43a22c
Closes: apache/airflow#15374 This pull request follows apache/airflow#14776. Clearing a subdag with Downstream+Recursive does not automatically set the state of the parent dag so that the downstream parent tasks can execute. GitOrigin-RevId: a4211e276fce6521f0423fe94b01241a9c43a22c
Closes: apache/airflow#15374 This pull request follows apache/airflow#14776. Clearing a subdag with Downstream+Recursive does not automatically set the state of the parent dag so that the downstream parent tasks can execute. GitOrigin-RevId: a4211e276fce6521f0423fe94b01241a9c43a22c
Closes: apache/airflow#15374 This pull request follows apache/airflow#14776. Clearing a subdag with Downstream+Recursive does not automatically set the state of the parent dag so that the downstream parent tasks can execute. GitOrigin-RevId: a4211e276fce6521f0423fe94b01241a9c43a22c
Closes: apache/airflow#15374 This pull request follows apache/airflow#14776. Clearing a subdag with Downstream+Recursive does not automatically set the state of the parent dag so that the downstream parent tasks can execute. GitOrigin-RevId: a4211e276fce6521f0423fe94b01241a9c43a22c
Closes: apache/airflow#15374 This pull request follows apache/airflow#14776. Clearing a subdag with Downstream+Recursive does not automatically set the state of the parent dag so that the downstream parent tasks can execute. GitOrigin-RevId: a4211e276fce6521f0423fe94b01241a9c43a22c
Closes: apache/airflow#15374 This pull request follows apache/airflow#14776. Clearing a subdag with Downstream+Recursive does not automatically set the state of the parent dag so that the downstream parent tasks can execute. GitOrigin-RevId: a4211e276fce6521f0423fe94b01241a9c43a22c
Closes: #13295
After successfully running a SUBDAG, clearing it
(including downstream+recursive) doesn't trigger the inner tasks.
Instead, the subdag is marked successful and the inner tasks all
stay cleared and aren't re-run.
The above problem is because the DagRun state of the subdags are not updated
after clearing. This PR solves it by updating the DagRun state of all DAGs
including subdags when include_subdags is True
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code change, 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 UPDATING.md.