uranusjr commented on a change in pull request #20649:
URL: https://github.com/apache/airflow/pull/20649#discussion_r777932659
##########
File path: airflow/api/common/experimental/mark_tasks.py
##########
@@ -335,18 +336,18 @@ def set_dag_run_state_to_failed(dag, execution_date,
commit=False, session=None)
# Mark the dag run to failed.
if commit:
- _set_dag_run_state(dag.dag_id, execution_date, State.FAILED, session)
+ _set_dag_run_state(dag.dag_id, execution_date,
TaskInstanceState.FAILED, session)
- # Mark only RUNNING task instances.
+ # Mark only running task instances.
task_ids = [task.task_id for task in dag.tasks]
tis = (
session.query(TaskInstance)
.filter(
TaskInstance.dag_id == dag.dag_id,
TaskInstance.execution_date == execution_date,
TaskInstance.task_id.in_(task_ids),
+ TaskInstance.state.in_(State.running),
)
- .filter(TaskInstance.state == State.RUNNING)
)
Review comment:
(Note for other reviewers) From what I can tell, this is the only
functional change; all others are Mypy fixes.
--
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]