Repository navigation
Add deferrable mode to EmrServerlessJobSensor - #71652
Merged
o-nikolas merged 5 commits intoSep 16, 2026
Merged
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
|
saadbelgi
force-pushed
the
make-emr-serverless-sensor-deferrable
branch
3 times, most recently
from
August 16, 2026 15:22
07bcef2 to
8e9f617
Compare
saadbelgi
marked this pull request as ready for review
August 16, 2026 18:58
SameerMesiah97
left a comment
Contributor
There was a problem hiding this comment.
I think there are 2 main concerns that should be addressed. I have left comments.
saadbelgi
force-pushed
the
make-emr-serverless-sensor-deferrable
branch
2 times, most recently
from
September 2, 2026 20:20
55ae61a to
edeb640
Compare
SameerMesiah97
approved these changes
Sep 3, 2026
SameerMesiah97
left a comment
Contributor
There was a problem hiding this comment.
Approved pending green CI. But this needs one of the AWS maintainers to look at it before merge.
saadbelgi
force-pushed
the
make-emr-serverless-sensor-deferrable
branch
4 times, most recently
from
September 8, 2026 09:39
7e576db to
1a9ea35
Compare
saadbelgi
force-pushed
the
make-emr-serverless-sensor-deferrable
branch
from
September 11, 2026 19:07
1a9ea35 to
fa9db33
Compare
…ead of Collection
saadbelgi
force-pushed
the
make-emr-serverless-sensor-deferrable
branch
from
September 11, 2026 19:12
fa9db33 to
bcc4c9c
Compare
o-nikolas
approved these changes
Sep 16, 2026
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add deferrable mode to
EmrServerlessJobSensorso waiting on a long-running EMR Serverless job does not occupy a worker slot.Follows
EmrJobFlowSensor/EmrStepSensor: poke once, thendefer()to a dedicatedEmrServerlessJobSensorTrigger. The trigger uses the existingserverless_job_completedwaiter with acceptors overridden to preserve the sensor's configuredtarget_states. Poke/reschedule behaviour is unchanged whendeferrable=False.Docs: class docstring plus
providers/amazon/docs/operators/emr/emr_serverless.rst.Implementation notes
serverless_job_completedwaiter and overrides only its acceptors. A static waiter cannot represent runtime-configurabletarget_states, so this avoids adding separate waiter JSON for each possible target-state combination.poke()still raisesAirflowExceptiononJOB_FAILURE_STATES, as before.execute_complete()raisesRuntimeErrorbecause new directraise AirflowExceptionusages are blocked by thecheck-no-new-airflow-exceptionspre-commit hook. This also follows the existing DynamoDB and SSM sensor patterns.EmrServerlessStartJobTriggerremains unchanged forEmrServerlessStartJobOperator. The newEmrServerlessJobSensorTriggeris sensor-specific because it must support runtime-configurabletarget_statesand sensor timeout semantics.Was generative AI tooling used to co-author this PR?
Generated-by: Cursor Grok 4.5 following the guidelines
Tests run locally
check-no-new-airflow-exceptionson the changed files.breeze run mypy providers/amazon/src/airflow/providers/amazon/aws/sensors/emr.py providers/amazon/src/airflow/providers/amazon/aws/triggers/emr.py— passedbreeze testing providers-tests --python 3.10 providers/amazon/tests/unit/amazon/aws/sensors/test_emr_serverless_job.py providers/amazon/tests/unit/amazon/aws/triggers/test_emr.py providers/amazon/tests/unit/amazon/aws/triggers/test_serialization.py -xvs— passedbreeze testing providers-tests --python 3.10 --test-type "Providers[amazon]"— passed