RNHTTR opened a new issue, #49889: URL: https://github.com/apache/airflow/issues/49889
### Apache Airflow version 3.0.0 ### If "Other Airflow 2 version" selected, which one? 2.10.5 ### What happened? [_handle_tasks_stuck_in_queued](https://github.com/apache/airflow/blob/2.10.5/airflow/jobs/scheduler_job_runner.py#L1802-L1807) revokes TIs without checking their state first. So, it's possible that a TI actually started running, but the TI was revoked by Airflow, causing the TI to go back through its scheduling loop even though the worker is actually executing the TI by the time that happens. ### What you think should happen instead? `_handle_tasks_stuck_in_queued` should check the TIs state before revoking. If the TI has entered the running state, it shouldn't be revoked ### How to reproduce On KubernetesExecutor, you could possibly add a long init container that keeps the worker pod in pending ### Operating System n/a ### Versions of Apache Airflow Providers apache-airflow-providers-cncf-kubernetes==8.4.1 ### Deployment Astronomer ### Deployment details _No response_ ### 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]
