XD-DENG commented on a change in pull request #5435: [AIRFLOW-4759] Don't error when marking sucessful run as failed URL: https://github.com/apache/airflow/pull/5435#discussion_r295795875
########## File path: airflow/api/common/experimental/mark_tasks.py ########## @@ -337,6 +340,9 @@ def set_dag_run_state_to_failed(dag, execution_date, commit=False, session=None) task.dag = dag tasks.append(task) + if not tasks: + return [] + Review comment: This check may not be necessary as you already handled it inside `set_state()`? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services