dstandish commented on code in PR #32985:
URL: https://github.com/apache/airflow/pull/32985#discussion_r1280912932
##########
airflow/models/taskinstance.py:
##########
@@ -187,19 +187,28 @@ def set_current_context(context: Context) ->
Generator[Context, None, None]:
)
-def stop_all_tasks_in_dag(tis: list[TaskInstance], session: Session,
task_id_to_ignore: int):
+def _stop_remaining_tasks(*, dag: DAG, tis: list[TaskInstance],
task_id_to_ignore: str, session: Session):
+ """
+ Stop non-teardown tasks in dag.
+
+ :meta private:
+ """
for ti in tis:
if ti.task_id == task_id_to_ignore or ti.state in (
TaskInstanceState.SUCCESS,
TaskInstanceState.FAILED,
):
continue
if ti.state == TaskInstanceState.RUNNING:
- log.info("Forcing task %s to fail", ti.task_id)
+ log.info("Forcing task %s to fail due to dag's `fail_stop`
setting", ti.task_id)
ti.error(session)
else:
- log.info("Setting task %s to SKIPPED", ti.task_id)
- ti.set_state(state=TaskInstanceState.SKIPPED, session=session)
+ task = dag.task_dict[ti.task_id]
+ if not task.is_teardown:
Review Comment:
good call
--
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]