bbovenzi commented on code in PR #28066:
URL: https://github.com/apache/airflow/pull/28066#discussion_r1038509576
##########
airflow/www/views.py:
##########
@@ -2298,13 +2299,24 @@ def _mark_dagrun_state_as_queued(self, dag_id: str,
dag_run_id: str, confirmed:
if not dag:
return {"status": "error", "message": f"Cannot find DAG: {dag_id}"}
- new_dag_state = set_dag_run_state_to_queued(dag=dag,
run_id=dag_run_id, commit=confirmed)
+ set_dag_run_state_to_queued(dag=dag, run_id=dag_run_id,
commit=confirmed)
if confirmed:
return {"status": "success", "message": "Marked the DagRun as
queued."}
else:
- details = [str(t) for t in new_dag_state]
+ # Identify tasks that will be queued up to run when confirmed
+ all_task_ids = [task.task_id for task in dag.tasks]
+
+ existing_tis = session.query(TaskInstance.task_id).filter(
+ TaskInstance.dag_id == dag.dag_id,
+ TaskInstance.run_id == dag_run_id,
+ TaskInstance.state is not None,
Review Comment:
Do we need to check for `state is not None`? Aren't we looking for tasks
that don't have a corresponding instance for this run?
--
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]