Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix dag.clear() to set multiple dags to running when necessary (apach…
…e#15382) closes: apache#14260 related: apache#9824 When clearing task across dags using ExternalTaskMarker the dag state of the external DagRun is not set to active. So cleared tasks in the external dag will not automatically start if the DagRun is a Failed or Succeeded state. apache#9824 tried to fix a similar issue for subdag. But it did not fix ExternalTaskMarker. This PR fixes both. Two changes are made to fix the issue: Make clear_task_instances set DagRuns' state to dag_run_state for all the affected DagRuns. The filter for DagRun in clear_task_instances is fixed too. Previously, it made an assumption that execution_dates for all the dag_ids are the same, which is not always correct. test_external_task_marker_clear_activate is added to make sure the fix does the right thing. (cherry picked from commit 2bca8a5)
- Loading branch information