joshk-kang opened a new issue #17585: URL: https://github.com/apache/airflow/issues/17585
**Apache Airflow version**: 2.1.2 **Apache Airflow Provider versions** (please include all providers that are relevant to your bug): None are relevant **Kubernetes version (if you are using kubernetes)** (use `kubectl version`): N/A **Environment**: - **Cloud provider or hardware configuration**: - **OS** (e.g. from /etc/os-release): - **Kernel** (e.g. `uname -a`): - **Install tools**: - **Others**: **What happened**: When adding new tasks to an existing dag with `depends_on_past = True`, it will never get scheduled. **What you expected to happen**: The newly added tasks should be able to run even with `depends_on_past=True` The reason is that the logic to determine if it is the first task depends on the dag not the task itself https://github.com/apache/airflow/blob/main/airflow/ti_deps/deps/prev_dagrun_dep.py#L58-L65. The code here should be updated so that the first TaskInstance should be allowed to run even if there are previous DagRuns related to that task. **How to reproduce it**: Create a DAG with some tasks and let it have a run. Add another task with `depends_on_past=True` to the existing DAG, and it will never be scheduled because of the following reason `depends_on_past is true for this task's DAG, but the previous task instance has not run yet.` **Anything else we need to know**: NA -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
