Pad71 commented on issue #53402:
URL: https://github.com/apache/airflow/issues/53402#issuecomment-3078218909

   I think, there are several use cases for TriggerDagRunOperator task Clear 
action:
   
   ### Use Case 1: Do not clear child DAG run – raise exception
   **Description**: The triggered DAG run is not cleared.
   
   **Behavior**: If the DAG run is still in a failed or running state, the 
TriggerDagRunOperator task will raise an exception during the next attempt.
   
   **Current status**: ✅ This is the current behavior when using reset_dag_run 
= False.
   
   **Purpose**: Maintains strict separation and manual control between parent 
and child DAGs.
   
   ### Use Case 2: Clear entire child DAG run
   **Description**: When clearing the TriggerDagRunOperator, the entire child 
DAG run (triggered run) is also cleared.
   
   **Behavior**: All tasks in the child DAG run are cleared (including 
successful ones).
   
   The DAG run is reset and will be re-executed from scratch.
   This may be time-consuming for large DAGs or long-running pipelines.
   
   **Current status**: ✅ This is the default behavior when using reset_dag_run 
= True.
   
   **Purpose**: Ensures full re-processing of the child DAG, regardless of 
current state.
   
   
   ### Use Case 3: Clear only failed tasks in child DAG run (with downstream)
   **Description**: When the TriggerDagRunOperator task is cleared, the system 
attempts to clear only failed tasks and their downstreams within the triggered 
child DAG run — without resetting the entire run.
   
   **Behavior** (if implemented): 
   The child DAG run is not deleted, but failed tasks and their downstreams are 
cleared and re-executed.
   This can reduce reprocessing time and resource usage significantly.
   
   **Current status**: ❌ Not supported by Airflow out-of-the-box.
   
   **Workaround today:**
   The user must manually clear failed tasks in the child DAG (via UI/API/CLI).
   Wait until the child DAG finishes successfully.
   
   Then manually mark the TriggerDagRunOperator as successful.
   
   **Operations pain point:**
   If the child DAG run takes hours, this introduces significant overhead for 
Ops teams, who must monitor and intervene manually.
   


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