Skip to content

Commit

Permalink
Skip checking subdagslist if taskinstance state is skipped (#40578)
Browse files Browse the repository at this point in the history
* Skip checking subdagslist if taskinstance state is skipped

* linter fixes

(cherry picked from commit ec5da92)
  • Loading branch information
abhishekbhakat authored and utkarsharma2 committed Jul 12, 2024
1 parent fac4962 commit 7f7d638
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions airflow/api/common/mark_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,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
Expand Down

0 comments on commit 7f7d638

Please sign in to comment.