amoghrajesh commented on code in PR #66586:
URL: https://github.com/apache/airflow/pull/66586#discussion_r3217801592
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py:
##########
@@ -225,6 +226,17 @@ def patch_dag_run(
get_listener_manager().hook.on_dag_run_success(dag_run=dag_run, msg="")
except Exception:
log.exception("error calling listener")
+
+ # Clear state for all TIs in the run — not just the ones that
were transitioned.
+ # When a run is manually marked SUCCESS, the whole run is
considered done
+ # regardless of which TIs were already in SUCCESS.
+ all_tis = session.scalars(
+ select(TaskInstance).where(
+ TaskInstance.dag_id == dag_run.dag_id,
+ TaskInstance.run_id == dag_run.run_id,
+ )
+ ).all()
+ _clear_task_state_on_success(all_tis, session)
Review Comment:
Yeah. High chance it will be, not sure if we should unhook/disallow this
logic in dag run APIs or explain the implications as known performance concern.
--
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]