-
Notifications
You must be signed in to change notification settings - Fork 27
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
Deprecate EmrJobFlowSensorAsync #1406
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1406 +/- ##
==========================================
- Coverage 98.54% 98.40% -0.15%
==========================================
Files 91 91
Lines 5364 5253 -111
==========================================
- Hits 5286 5169 -117
- Misses 78 84 +6 ☔ View full report in Codecov by Sentry. |
def __init__( | ||
self, | ||
*, | ||
poll_interval: float = 5, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EmrJobFlowSensor uses poke_interval not poll_interval so need to handle that case too I feel https://github.com/apache/airflow/blob/b260367208f9c3c09bc1da2a32abf59867ddd789/airflow/providers/amazon/aws/sensors/emr.py#L524C46-L524C46
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indeed, it might be missed in #640. let me add a similar deprecation here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment #1398 (review) regarding removal of hook specific code?
def __init__( | ||
self, | ||
*, | ||
poll_interval: float = 5, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
3ef5d40
to
52f0746
Compare
Just removed. Thanks! |
c083565
to
2e05a8a
Compare
@@ -146,6 +147,11 @@ class EmrJobFlowHookAsync(AwsBaseHookAsync): | |||
""" | |||
|
|||
def __init__(self, *args: Any, **kwargs: Any) -> None: | |||
warnings.warn( | |||
"This module is deprecated and will be removed in 2.0.0.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also suggest them to use the OSS hook instead?
@@ -57,6 +58,11 @@ def __init__( | |||
target_states: Optional[Iterable[str]] = None, | |||
failed_states: Optional[Iterable[str]] = None, | |||
): | |||
warnings.warn( | |||
"This module is deprecated and will be removed in 2.0.0.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same question if we should suggest using them the OSS trigger
905f074
to
fbaac64
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
fbaac64
to
ce7bc17
Compare
What's changed
Deprecate EmrJobFlowSensorAsync and fallback to their OSS counterpart
EmrJobFlowSensor
withdeferrable=True
Why this change
Most of the logic of these operators has been contributed back to OSS airflow