Skip to content

Add deferrable mode in EMR operator and sensor - #32029

Merged
pankajastro merged 11 commits into
apache:mainfrom
astronomer:add_emr_async_op
Jun 27, 2023
Merged

Add deferrable mode in EMR operator and sensor#32029
pankajastro merged 11 commits into
apache:mainfrom
astronomer:add_emr_async_op

Conversation

@pankajastro

Copy link
Copy Markdown
Member

Add the deferrable param in
EmrContainerOperator/EmrStepSensor/EmrJobFlowSensor.
This will allow running Operator/Sensors in an async way
which means we only submit a job from the worker to run a 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.


^ 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-cyborgboring-cyborgBot added area:providers provider:amazon AWS/Amazon - related issues labels Jun 20, 2023
@pankajastro

Copy link
Copy Markdown
MemberAuthor

cc: @syedahsn

@pankajastro
pankajastro marked this pull request as ready for review June 20, 2023 12:27
@pankajkoti
pankajkoti requested a review from Lee-WJune 20, 2023 12:35
Comment threadairflow/providers/amazon/aws/operators/emr.py Outdated
Comment threadairflow/providers/amazon/aws/operators/emr.py Outdated
Comment threadairflow/providers/amazon/aws/triggers/emr.py Outdated
Comment threadairflow/providers/amazon/aws/operators/emr.py Outdated
Comment threadairflow/providers/amazon/aws/operators/emr.py Outdated
Comment threadairflow/providers/amazon/aws/operators/emr.py Outdated
Comment threadairflow/providers/amazon/aws/sensors/emr.py Outdated
Comment threadairflow/providers/amazon/aws/triggers/emr.py Outdated
Comment threadtests/providers/amazon/aws/operators/test_emr_containers.py Outdated
Comment threadtests/providers/amazon/aws/sensors/test_emr_containers.py Outdated
Comment threadtests/providers/amazon/aws/sensors/test_emr_job_flow.py Outdated

@phanikumvphanikumv 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.

Can you add docs about availability of deferrable mode for these operators?

Comment threadairflow/providers/amazon/aws/sensors/emr.py Outdated
Comment threadairflow/providers/amazon/aws/sensors/emr.py Outdated
Comment threadairflow/providers/amazon/aws/triggers/emr.py Outdated
Comment threadairflow/providers/amazon/aws/operators/emr.py Outdated
Comment threadairflow/providers/amazon/aws/sensors/emr.py Outdated
Comment threaddocs/apache-airflow-providers-amazon/operators/emr/emr.rst Outdated
Comment threaddocs/apache-airflow-providers-amazon/operators/emr/emr.rst Outdated
Comment threadtests/providers/amazon/aws/operators/test_emr_containers.py Outdated
Comment threadtests/providers/amazon/aws/sensors/test_emr_job_flow.py Outdated
Comment threadtests/providers/amazon/aws/sensors/test_emr_step.py Outdated
Comment threadtests/providers/amazon/aws/triggers/test_emr.py Outdated
Comment threadtests/providers/amazon/aws/triggers/test_emr.py Outdated
Comment threadtests/providers/amazon/aws/triggers/test_emr.py Outdated
Comment threadtests/providers/amazon/aws/triggers/test_emr.py Outdated
@pankajastro
pankajastro requested review from ephraimbuddy and phanikumv and removed request for syedahsnJune 26, 2023 08:10

@phanikumvphanikumv 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.

rebase it from main and we should be good to go!

Comment threadairflow/providers/amazon/aws/triggers/emr.py Outdated
Comment threaddocs/apache-airflow-providers-amazon/operators/emr/emr.rst Outdated
Comment threadairflow/providers/amazon/aws/waiters/emr.json Outdated
pankajastroand others added 10 commits June 27, 2023 14:47
Add the deferrable param in EmrContainerOperator/EmrStepSensor/EmrJobFlowSensor.
This will allow running Operator/Sensors in an async way
that means we only submit a job from the worker to run a 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 threadairflow/providers/amazon/aws/operators/emr.py Outdated
Co-authored-by: Ephraim Anierobi <splendidzigy24@gmail.com>
@pankajastro
pankajastro merged commit 06b5a1e into apache:mainJun 27, 2023
@pankajastro
pankajastro deleted the add_emr_async_op branch June 27, 2023 10:27
ferruzzi pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Jun 27, 2023
* Add deferrable mode in EMR operator and sensor
Add the deferrable param in EmrContainerOperator/EmrStepSensor/EmrJobFlowSensor.
This will allow running Operator/Sensors in an async way
that means we only submit a job from the worker to run a 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.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providersprovider:amazonAWS/Amazon - related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@pankajastro@ephraimbuddy@Lee-W@pankajkoti@phanikumv@syedahsn