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

Remove deprecated code from Pagerduty provider #44653

Merged
merged 4 commits into from
Dec 7, 2024

Conversation

Prab-27
Copy link
Contributor

@Prab-27 Prab-27 commented Dec 4, 2024

related: #44559

remove-deprecated-code, remove test ,update changelog from-pagerduty provider


^ 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.

@jscheffl
Copy link
Contributor

jscheffl commented Dec 7, 2024

Just a static check is failing, when this is fixed I assume this can be merged.

@Prab-27
Copy link
Contributor Author

Prab-27 commented Dec 7, 2024

Just a static check is failing, when this is fixed I assume this can be merged.

I have modified test_pagerduty.py and another check has failed due to this statement from providers/src/airflow/providers/pagerduty/hooks/pagerduty.py
airflow.providers.pagerduty.hooks.pagerduty_events import PagerdutyEventsHook

However, fixing the second static check caused the unit test to fail.

__ ERROR collecting providers/tests/pagerduty/hooks/test_pagerduty_events.py ___
ImportError while importing test module '/opt/airflow/providers/tests/pagerduty/hooks/test_pagerduty_events.py'.
Hint: make sure your test modules/packages have valid Python names.

@jscheffl
Copy link
Contributor

jscheffl commented Dec 7, 2024

Just a static check is failing, when this is fixed I assume this can be merged.

I have modified test_pagerduty.py and another check has failed due to this statement from providers/src/airflow/providers/pagerduty/hooks/pagerduty.py airflow.providers.pagerduty.hooks.pagerduty_events import PagerdutyEventsHook

However, fixing the second static check caused the unit test to fail.

__ ERROR collecting providers/tests/pagerduty/hooks/test_pagerduty_events.py ___
ImportError while importing test module '/opt/airflow/providers/tests/pagerduty/hooks/test_pagerduty_events.py'.
Hint: make sure your test modules/packages have valid Python names.

Yes, because previously the pytest imported "wrong" as a re-import. In providers/tests/pagerduty/hooks/test_pagerduty_events.py:23 you need to import via:

from airflow.providers.pagerduty.hooks.pagerduty_events import PagerdutyEventsHook

...and then of course also commit the fix in static checks, easiest run pre-commit run -a

@Prab-27
Copy link
Contributor Author

Prab-27 commented Dec 7, 2024

Done !

@jscheffl jscheffl merged commit 8cd2f82 into apache:main Dec 7, 2024
65 checks passed
@jscheffl
Copy link
Contributor

jscheffl commented Dec 7, 2024

Green! Merged! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants