crobertson-astro opened a new pull request, #69839:
URL: https://github.com/apache/airflow/pull/69839

   Add a `reattach_on_existing` option to `TriggerDagRunOperator`.
   
   When a triggered Dag run fails on a single task, users often fix it by hand 
in the triggered Dag (mark the task success, clear it, or re-run it) and then 
want the triggering task to resume waiting on that same run. Today, re-running 
the triggering task either wipes the manual fix (`reset_dag_run=True` clears 
the whole triggered run) or raises `DagRunAlreadyExists` (the default). Neither 
lets the triggering task simply re-attach.
   
   With `reattach_on_existing=True`, a cleared triggering task attaches to the 
existing triggered Dag run and — with `wait_for_completion=True` — polls or 
defers on it until it reaches an allowed or failed state, preserving the manual 
intervention. `reset_dag_run` and `skip_when_already_exists` keep precedence.
   
   Implemented on both the Airflow 2.x path (operator `DagRunAlreadyExists` 
handling) and the Airflow 3.x path (`DagRunTriggerException` + task-SDK 
execution), with tests covering reattach, wait-success, wait-failed, 
deferrable, and reset/skip precedence on both paths.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Opus 4.8) orchestrating Astronomer Otto (0.1.18)
   
   Generated-by: Claude Code (Opus 4.8) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)


-- 
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]

Reply via email to