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

Deprecate EmrJobFlowSensorAsync #1406

Merged
merged 3 commits into from
Jan 17, 2024
Merged

Deprecate EmrJobFlowSensorAsync #1406

merged 3 commits into from
Jan 17, 2024

Conversation

Lee-W
Copy link
Contributor

@Lee-W Lee-W commented Dec 29, 2023

What's changed

Deprecate EmrJobFlowSensorAsync and fallback to their OSS counterpart EmrJobFlowSensor with deferrable=True

Why this change

Most of the logic of these operators has been contributed back to OSS airflow

@Lee-W
Copy link
Contributor Author

Lee-W commented Dec 29, 2023

Just triggered the testing workflow
圖片

@Lee-W Lee-W changed the title feat(amazon): deprecate EmrJobFlowSensorAsync Deprecate EmrJobFlowSensorAsync Dec 29, 2023
Copy link

codecov bot commented Dec 29, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (03adbff) 98.54% compared to head (fbaac64) 98.40%.
Report is 6 commits behind head on main.

❗ Current head fbaac64 differs from pull request most recent head ce7bc17. Consider uploading reports for the commit ce7bc17 to get more accurate results

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.
📢 Have feedback on the report? Share it here.

@Lee-W
Copy link
Contributor Author

Lee-W commented Dec 29, 2023

圖片

def __init__(
self,
*,
poll_interval: float = 5,
Copy link
Contributor

@pankajastro pankajastro Jan 11, 2024

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

+1

Copy link
Contributor Author

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.

Copy link
Collaborator

@pankajkoti pankajkoti left a 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,
Copy link
Collaborator

Choose a reason for hiding this comment

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

+1

@Lee-W Lee-W force-pushed the deprecate-EmrJobFlowSensorAsync branch 4 times, most recently from 3ef5d40 to 52f0746 Compare January 11, 2024 09:35
@Lee-W
Copy link
Contributor Author

Lee-W commented Jan 11, 2024

same comment #1398 (review) regarding removal of hook specific code?

Just removed. Thanks!

@Lee-W Lee-W force-pushed the deprecate-EmrJobFlowSensorAsync branch 2 times, most recently from c083565 to 2e05a8a Compare January 11, 2024 11:25
@@ -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.",
Copy link
Collaborator

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.",
Copy link
Collaborator

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

@Lee-W Lee-W force-pushed the deprecate-EmrJobFlowSensorAsync branch from 905f074 to fbaac64 Compare January 15, 2024 01:11
Copy link
Contributor

@pankajastro pankajastro left a comment

Choose a reason for hiding this comment

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

LGTM

@Lee-W Lee-W force-pushed the deprecate-EmrJobFlowSensorAsync branch from fbaac64 to ce7bc17 Compare January 17, 2024 07:23
@Lee-W Lee-W merged commit b697ecc into main Jan 17, 2024
8 of 9 checks passed
@Lee-W Lee-W deleted the deprecate-EmrJobFlowSensorAsync branch January 17, 2024 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants