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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]