suhail-zemoso commented on issue #54927:
URL: https://github.com/apache/airflow/issues/54927#issuecomment-3242842304

   ## Proposed Solution
   
   @wolfier  Watch the recording to verify the expected behaviour 
   
   
https://www.loom.com/share/c3c874834ee7478a89f3639dd23df445?sid=4c2f4648-3221-4207-844a-3a3509550224
   
   ### Problem Analysis
   - **Current Behavior**:
     - Triggers continue running even when their DAG is paused or deactivated
     - No clear distinction between paused and deactivated DAGs in trigger 
handling
     - No mechanism to resume triggers after a DAG is unpaused
   
   - **Impact**:
     - Unnecessary resource usage from running triggers for inactive DAGs
     - Inconsistent behavior between UI actions (pause/unpause) and actual 
trigger execution
     - Potential for unwanted task execution when DAGs are in an inactive state
   
   ### Solution Implementation
   
   1. **For Paused DAGs**:
      - Triggers are unassigned from the current triggerer but kept in the 
database
      - Task instances remain in `DEFERRED` state with their `trigger_id` 
preserved
      - Triggers are reassigned when the DAG is unpaused
      - Added comprehensive logging for better traceability
   
   2. **For Deactivated DAGs**:
      - Triggers are permanently deleted from the database
      - Associated task instances are marked as `FAILED`
      - Prevents any further trigger execution for deactivated DAGs
   


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