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

Use poke_interval instead of poll_interval for sensor #640

Merged
merged 5 commits into from
Sep 22, 2022
Merged

Conversation

bharanidharan14
Copy link
Contributor

@bharanidharan14 bharanidharan14 commented Sep 15, 2022

Added deprecated warning and used poke_interval where ever poll_interval is used in the sensor.

closes: #613

@bharanidharan14 bharanidharan14 changed the title Fix poll_interval to poke_interval Use poke_interval instead of poll_interval for sensot Sep 15, 2022
@bharanidharan14 bharanidharan14 changed the title Use poke_interval instead of poll_interval for sensot Use poke_interval instead of poll_interval for sensor Sep 15, 2022
@codecov
Copy link

codecov bot commented Sep 15, 2022

Codecov Report

Base: 98.30% // Head: 98.31% // Increases project coverage by +0.01% 🎉

Coverage data is based on head (8c8e622) compared to base (8cef32f).
Patch coverage: 98.63% of modified lines in pull request are covered.

❗ Current head 8c8e622 differs from pull request most recent head 60464bb. Consider uploading reports for the commit 60464bb to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #640      +/-   ##
==========================================
+ Coverage   98.30%   98.31%   +0.01%     
==========================================
  Files          79       79              
  Lines        4131     4166      +35     
==========================================
+ Hits         4061     4096      +35     
  Misses         70       70              
Impacted Files Coverage Δ
astronomer/providers/http/triggers/http.py 67.85% <50.00%> (ø)
astronomer/providers/amazon/aws/sensors/batch.py 100.00% <100.00%> (ø)
astronomer/providers/amazon/aws/sensors/emr.py 100.00% <100.00%> (ø)
...r/providers/amazon/aws/sensors/redshift_cluster.py 100.00% <100.00%> (ø)
astronomer/providers/amazon/aws/triggers/batch.py 100.00% <100.00%> (ø)
astronomer/providers/amazon/aws/triggers/emr.py 100.00% <100.00%> (ø)
.../providers/amazon/aws/triggers/redshift_cluster.py 100.00% <100.00%> (ø)
astronomer/providers/dbt/cloud/sensors/dbt.py 100.00% <100.00%> (ø)
...stronomer/providers/google/cloud/hooks/dataproc.py 100.00% <100.00%> (ø)
...ronomer/providers/google/cloud/sensors/bigquery.py 100.00% <100.00%> (ø)
... and 14 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@rajaths010494 rajaths010494 left a comment

Choose a reason for hiding this comment

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

It looks overall good to me.

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.

We have inconsistent variables names poll_interval and polling_period_seconds. Let's rename all these to poke_interval in all the internal implementation across execute methods in operators & sensors and in triggers. We can keep the user facing variable poll_interval in the operator & sensor __init__ methods until we remove it.
We will also need to modify the docstring params upon renaming.

astronomer/providers/amazon/aws/sensors/batch.py Outdated Show resolved Hide resolved
astronomer/providers/amazon/aws/sensors/emr.py Outdated Show resolved Hide resolved
astronomer/providers/amazon/aws/sensors/emr.py Outdated Show resolved Hide resolved
astronomer/providers/dbt/cloud/sensors/dbt.py Outdated Show resolved Hide resolved
astronomer/providers/http/sensors/http.py Outdated Show resolved Hide resolved
astronomer/providers/microsoft/azure/sensors/wasb.py Outdated Show resolved Hide resolved
astronomer/providers/microsoft/azure/sensors/wasb.py Outdated Show resolved Hide resolved
tests/google/cloud/sensors/test_bigquery.py Outdated Show resolved Hide resolved
- Added deprecated warning and used poke_interval instead of poll_interval
- Rename `poll_interval` to `poke_interval` for all internal occurrences of sensors
Add TODO for test case

Fix pre-commit
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.

Use poke_interval instead of poll_interval
4 participants