Skip to content

Add deferrable param in BatchOperator#30865

Merged
jedcunningham merged 3 commits into
apache:mainfrom
astronomer:batch_async_op
May 25, 2023
Merged

Add deferrable param in BatchOperator#30865
jedcunningham merged 3 commits into
apache:mainfrom
astronomer:batch_async_op

Conversation

@pankajastro

@pankajastro pankajastro commented Apr 25, 2023

Copy link
Copy Markdown
Member

Add the deferrable param in BatchOperator.
This will allow running BatchOperator in an async way
that means we only submit a job from the worker to run a batch job
then defer to the trigger for polling and wait for a job the job status
and the worker slot won't be occupied for the whole period of
task execution.

original PR: #30500


^ 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.rst or {issue_number}.significant.rst, in newsfragments.

@boring-cyborg boring-cyborg Bot added area:providers provider:amazon AWS/Amazon - related issues labels Apr 25, 2023
@pankajastro pankajastro marked this pull request as ready for review April 25, 2023 15:31

@syedahsn syedahsn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Just need to make a few minor changes.

Comment thread airflow/providers/amazon/aws/operators/batch.py Outdated
Comment thread airflow/providers/amazon/aws/triggers/batch.py Outdated
Comment thread airflow/providers/amazon/aws/triggers/batch.py Outdated
@pankajastro pankajastro requested a review from syedahsn April 26, 2023 13:11
@pankajastro pankajastro force-pushed the batch_async_op branch 2 times, most recently from a3f47f3 to dd1286e Compare April 26, 2023 16:52
Comment thread airflow/providers/amazon/aws/operators/batch.py

@syedahsn syedahsn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Nice work!

@pankajkoti

pankajkoti commented Apr 28, 2023

Copy link
Copy Markdown
Member

Can we apply the full tests needed label on this, please?

cc: @potiuk

@potiuk potiuk added the full tests needed We need to run full set of tests for this PR to merge label Apr 28, 2023
@potiuk potiuk closed this Apr 28, 2023
@potiuk potiuk reopened this Apr 28, 2023
@potiuk

potiuk commented Apr 28, 2023

Copy link
Copy Markdown
Member

Applied. Closed/reopened to rebuild it.

Comment thread airflow/providers/amazon/aws/waiters/batch.json
@pankajastro pankajastro marked this pull request as draft May 25, 2023 14:17
@pankajastro pankajastro force-pushed the batch_async_op branch 2 times, most recently from 7073f19 to 3f177d0 Compare May 25, 2023 14:18
@pankajastro pankajastro marked this pull request as ready for review May 25, 2023 15:29
Add the deferrable param in BatchOperator.
This will allow running BatchOperator in an async way
that means we only submit a job from the worker to run a batch job
then defer to the trigger for polling and wait for a job the job status
and the worker slot won't be occupied for the whole period of
task execution.
Comment thread airflow/providers/amazon/aws/operators/batch.py Outdated
Comment thread airflow/providers/amazon/aws/waiters/batch.json
Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>
Comment thread airflow/providers/amazon/aws/waiters/batch.json

@syedahsn syedahsn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Nice work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers full tests needed We need to run full set of tests for this PR to merge provider:amazon AWS/Amazon - related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants