-
Notifications
You must be signed in to change notification settings - Fork 16.4k
[AIRFLOW-5391] Do not re-run skipped tasks when they are cleared (#7276) #8992
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
[AIRFLOW-5391] Do not re-run skipped tasks when they are cleared (#7276) #8992
Conversation
5acf5a5 to
91dc27d
Compare
7595db8 to
3a4e73c
Compare
91dc27d to
cc7ff93
Compare
c4be6d2 to
0aff02b
Compare
cc7ff93 to
fd3a12e
Compare
e676e59 to
aaaa366
Compare
fd3a12e to
84b2b41
Compare
84b2b41 to
9bf3fb9
Compare
eead3bc to
a5a588e
Compare
a1ba607 to
654b5f1
Compare
|
Hi @yuqian90, apologies this won't make it to 1.10.11 as the LatestOnlyOperator causes a change in behaviour. Is it possible for you to achieve this without changing the behaviour (talking about the note in Updating.md) or adding a flag to have old behavior vs new behaviour (default would be old behaviour). |
654b5f1 to
58a2d69
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 fix is needed for the test because the original test calls LatestOnlyOperator.execute() without first creating a dagrun. Also the create_dag_run is moved to setUpClass so that it's called only once for the whole class.
Hi, @kaxil sorry for the late response. I have backed out #5970 which as you have pointed out slightly changes the behaviour or I put the test fix inside the test instead (call create_dagrun() before calling Looks like I missed 1.10.11. Hopefully this can make it for 1.10.12. Thanks! |
235ab10 to
f1fba28
Compare
58a2d69 to
46df966
Compare
kaxil
left a comment
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.
Can you add a note in Updating.md and this is still a minor change in behavior for users who were clearing the skipped tasks intentionally to run it.
…che#7276) If a task is skipped by BranchPythonOperator, BaseBranchOperator or ShortCircuitOperator and the user then clears the skipped task later, it'll execute. This is probably not the right behaviour. This commit changes that so it will be skipped again. This can be ignored by running the task again with "Ignore Task Deps" override. (cherry picked from commit 1cdab56)
46df966 to
9caade2
Compare
Hi @kaxil thanks for the suggestion. I've added a note in UPDATING.md. |
|
Thanks @yuqian90 |
This PR is backported from #7276. The original commit was merged into master but not released in v1-10-*. This PR fixes a few minor merge conflicts and python2.7 compatibility issues and port it to v1-10-test.
If a task is skipped by BranchPythonOperator, BaseBranchOperator or ShortCircuitOperator and the user then clears the skipped task later, it'll execute. This is probably not the right
behaviour.
This commit changes that so it will be skipped again. This can be ignored by running the task again with "Ignore Task Deps" override.
(cherry picked from commit 1cdab56)
Make sure to mark the boxes below before creating PR: [x]
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.
Read the Pull Request Guidelines for more information.