yuqian90 opened a new pull request #15382: URL: https://github.com/apache/airflow/pull/15382
closes: #14260 related: #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. #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: 1. Make `clear_task_instances` set DagRuns' state to `dag_run_state` for all the affected DagRuns. 2. 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. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
