Repository navigation
Support timeout in BatchOperator - #45619
nrobinson-intelycare wants to merge 7 commits into
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
|
| self.poll_interval = poll_interval | ||
| self.awslogs_enabled = awslogs_enabled | ||
| self.awslogs_fetch_interval = awslogs_fetch_interval | ||
| self.timeout = timeout |
There was a problem hiding this comment.
This can be mistakenly confused with Airflow task timeout
There was a problem hiding this comment.
Would batch_job_timeout be better?
There was a problem hiding this comment.
I think keeping same/similar name as boto3 interface is simpler
There was a problem hiding this comment.
Please lets not use timeout.
You can use the same name as boto3 or choose something else but not names that can cause confusion with BaseOperator parameters.
There was a problem hiding this comment.
boto3_timeout would make sense I think?
There was a problem hiding this comment.
I'm open to boto3_timeout, batch_job_timeout, job_timeout etc, whatever is acceptable.
| aws_conn_id="airflow_test", | ||
| region_name="eu-west-1", | ||
| tags={}, | ||
| timeout={"attemptDurationSeconds": 3600}, |
There was a problem hiding this comment.
@vincbeck Should I be adding timeout={"attemptDurationSeconds": 3600}, to assert_called_once_with calls?
|
Something is up, I'll try to get the tests working locally |
|
Moved to #45660 to avoid merge commits |
When using a deferrable BatchOperator, it is possible to specify the
max_retriesandpoll_interval, but this does not appear to terminate the job once the task times out.Having the ability to specify the timeout and letting the job be terminated will allow us to enforce strict timeouts on critical pipelines running on Fargate via AWS Batch.
This PR adds support to allow specifying
timeoutin the BatchOperator constructor:https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch/client/submit_job.html
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in newsfragments.