This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new ec5da92440 Skip checking subdagslist if taskinstance state is skipped 
(#40578)
ec5da92440 is described below

commit ec5da924402709738101508b1ece15a90fd76e27
Author: Abhishek <[email protected]>
AuthorDate: Fri Jul 5 16:08:37 2024 +0000

    Skip checking subdagslist if taskinstance state is skipped (#40578)
    
    * Skip checking subdagslist if taskinstance state is skipped
    
    * linter fixes
---
 airflow/api/common/mark_tasks.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/airflow/api/common/mark_tasks.py b/airflow/api/common/mark_tasks.py
index de864a11bd..fa6ce835a9 100644
--- a/airflow/api/common/mark_tasks.py
+++ b/airflow/api/common/mark_tasks.py
@@ -145,8 +145,12 @@ def set_state(
     confirmed_infos = list(_iter_existing_dag_run_infos(dag, dag_run_ids, 
session=session))
     confirmed_dates = [info.logical_date for info in confirmed_infos]
 
-    sub_dag_run_ids = list(
-        _iter_subdag_run_ids(dag, session, DagRunState(state), task_ids, 
commit, confirmed_infos),
+    sub_dag_run_ids = (
+        list(
+            _iter_subdag_run_ids(dag, session, DagRunState(state), task_ids, 
commit, confirmed_infos),
+        )
+        if not state == TaskInstanceState.SKIPPED
+        else []
     )
 
     # now look for the task instances that are affected

Reply via email to