0x26res opened a new issue, #40435:
URL: https://github.com/apache/airflow/issues/40435
### Apache Airflow version
Other Airflow 2 version (please specify below)
### If "Other Airflow 2 version" selected, which one?
2.8.1 (MWAA)
### What happened?
My airflow deferred (AWS) BatchOperator occasionally fail. When this happens
I can see this:
```
{{local_task_job_runner.py:302}} WARNING - State of this instance has been
externally set to deferred. Terminating instance.
```
I actually think it's an oversight in the code for local_task_job_runner.
This
[line](https://github.com/apache/airflow/blob/main/airflow/jobs/local_task_job_runner.py#L264)
should check for state being RUNNING or DEFERRED.
### What you think should happen instead?
_No response_
### How to reproduce
This is hard to reproduce. The issue is very transient.
### Operating System
MWAA
### Versions of Apache Airflow Providers
apache-airflow-providers-amazon==8.16.0
### Deployment
Official Apache Airflow Helm Chart
### Deployment details
MWAA
### Anything else?
I would say it happens one out of 100 run.
### Are you willing to submit PR?
- [X] 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]