-
Notifications
You must be signed in to change notification settings - Fork 16.4k
[AIRFLOW_3982] Update DagRun state based on its tasks rather than DAG's #4808
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
Conversation
|
Interesting. I never used the adhoc feature. |
|
I've restarted the failing tests |
| dag.clear() | ||
| scheduler = SchedulerJob(dag_id, num_runs=2) | ||
| # we can't use dag.run or evaluate_dagrun because it uses BackfillJob | ||
| # instead of SchedulerJob and BackfillJobs are allowed to not respect start dates |
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.
nit: you mean Unlike SchedulerJob, BackfillJobs are allowed to not respect start dates ?
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.
@dima-asana , WDYT?
|
one small nit, LGTM |
Fokko
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.
Restarted Travis
Codecov Report
@@ Coverage Diff @@
## master #4808 +/- ##
==========================================
+ Coverage 75.3% 76.75% +1.45%
==========================================
Files 450 456 +6
Lines 29023 34723 +5700
==========================================
+ Hits 21855 26651 +4796
- Misses 7168 8072 +904
Continue to review full report at Codecov.
|
======================================================================
57) FAIL: test_dagrun_root_after_dagrun_unfinished (tests.test_jobs.SchedulerJobTest)
----------------------------------------------------------------------
Traceback (most recent call last):
tests/test_jobs.py line 2556 in test_dagrun_root_after_dagrun_unfinished
self.assertEqual(first_run.state, State.SUCCESS)
AssertionError: u'running' != u'success'
- running
+ successI find out our master branch ci failed due to this PR merge yesterday, And I have to go to bed because is mid-night in my zone. Maybe someone could take a look? |
|
will take a look |
|
@dima-asana I believe this change caused AIRFLOW-4428 bug |
Make sure you have checked all steps below.
Jira
Description
If a DagRun does not have the same tasks as its DAG (e.g. a task is added or removed later), it should update its state based on its tasks rather than the DAG's.
This is probably mostly relevant when (a) adding a task to a DAG with a different start date and then (b) clearing a past DAG Run.
Note that this CR also removes the adhoc task references. The code path that led to this bug is attempting to exclude adhoc tasks, which don't exist anymore as of #1667. I've removed other references for consistency.
Tests
SchedulerJobTest.test_dagrun_root_after_dagrun_unfinished
Commits
Code Quality
flake8