Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deferrable param in BatchOperator #30865

Merged
merged 3 commits into from
May 25, 2023

Conversation

pankajastro
Copy link
Member

@pankajastro pankajastro commented Apr 25, 2023

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 AWS/Amazon - related issues labels Apr 25, 2023
@pankajastro pankajastro marked this pull request as ready for review April 25, 2023 15:31
Copy link
Contributor

@syedahsn syedahsn left a comment

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.

airflow/providers/amazon/aws/operators/batch.py Outdated Show resolved Hide resolved
airflow/providers/amazon/aws/triggers/batch.py Outdated Show resolved Hide resolved
airflow/providers/amazon/aws/triggers/batch.py Outdated Show resolved Hide resolved
@pankajastro pankajastro force-pushed the batch_async_op branch 2 times, most recently from a3f47f3 to dd1286e Compare April 26, 2023 16:52
Copy link
Contributor

@syedahsn syedahsn left a comment

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
Copy link
Member

pankajkoti commented Apr 28, 2023

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
Copy link
Member

potiuk commented Apr 28, 2023

Applied. Closed/reopened to rebuild it.

@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.
Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>
Copy link
Contributor

@syedahsn syedahsn left a comment

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 AWS/Amazon - related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants