You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "shakeelansari63 (via GitHub)" <gi...@apache.org> on 2025/10/22 12:49:52 UTC

[I] Marking the DAG as failed marks the waiting tasks to skipped and DAG final status automatically changes to Success [airflow]

shakeelansari63 opened a new issue, #57061:
URL: https://github.com/apache/airflow/issues/57061

   ### Apache Airflow version
   
   Other Airflow 2/3 version (please specify below)
   
   ### If "Other Airflow 2/3 version" selected, which one?
   
   2.10.3
   
   ### What happened?
   
   He have Airflow `2.10` Setup in Kubernetes with Kubernetes Executor. Sometime when user mark a running DAG to failed, it sends the SIGTERM signal to stop running tasks and they are stopped. It also changes the status of waiting tasks to Skipped.   
     
   After doing this the DAG looks to be in failed status for few seconds but later it changes to Success. 
   
   I think once the running tasks are failed, airflow is re-calculating the state of DAG from leaf task state. 
   And since leaf task is in skipped state, it assumes success state for DAG.
   
   ### What you think should happen instead?
   
   Once the DAG status is manually forced to failed, it should stay in Failed state.
   
   ### How to reproduce
   
    - Deploy Airflow on Kubernetes
    - Add following DAG
   ```python
   from airflow import DAG
   from airflow.operators.bash import BashOperator
   from airflow.operators.empty import EmptyOperator
   from datetime import datetime
   
   with DAG(
       dag_id='dag_vs_task_failure',
       start_date=datetime(2023, 1, 1),
       schedule=None,
       catchup=False
   ) as dag:
       start_task = EmptyOperator(task_id='start_workflow')
       stage_task = BashOperator(task_id='stage_task', bash_command="sleep 300")
       end_task = EmptyOperator(task_id='end_workflow')
   
       # Define a dependency
       start_task >> stage_task >> end_task
   ```
    - Run the DAG
    - When the 2nd Task is running, mark the state of DAG (whole DAG not specific task) to failed.
    - The DAG will show error for some time and will automatically change to success
   
   ### Operating System
   
   RHEL 7
   
   ### Versions of Apache Airflow Providers
   
   apache-airflow-provider-cncf-kubernetes==8.3.3
   
   ### Deployment
   
   Official Apache Airflow Helm Chart
   
   ### Deployment details
   
   Deployed on AKS cluster
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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: commits-unsubscribe@airflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Marking the DAG as failed marks the waiting tasks to skipped and DAG final status automatically changes to Success [airflow]

Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun closed issue #57061: Marking the DAG as failed marks the waiting tasks to skipped and DAG final status automatically changes to Success
URL: https://github.com/apache/airflow/issues/57061


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Marking the DAG as failed marks the waiting tasks to skipped and DAG final status automatically changes to Success [airflow]

Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on issue #57061:
URL: https://github.com/apache/airflow/issues/57061#issuecomment-3777750546

   Closing airflow 2.x is in security maintenance only support, and will not benefit any new bug fixes unless those are security related.
   
   Feel free to re-open if I missed something.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org