Skip to content

Fix Google Provider Link Deprecations #33642

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

Closed
wants to merge 1 commit into from

Conversation

potiuk
Copy link
Member

@potiuk potiuk commented Aug 23, 2023

The Dataproc Links have been deprecated, but they were deprecated wrongly - the Deprecation Warnings were always raised when the dataproc module has been deprecated, but only few classes there were deprecated. This was because the warnings were added as class-level warnings rather than as warnings in constructors.

Also the deprecated classes have still been used in operators, raising the warnings even if the deprecation warnings have been moved from class to it's constructor.

This PR fixes that:

  • moves deprecation warnings from classes to constructors
  • replaces usage of deprecated links with those links that replaced the deprecated ones

Found during implementing of #33640


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

@boring-cyborg boring-cyborg bot added area:providers provider:google Google (including GCP) related issues labels Aug 23, 2023
@potiuk
Copy link
Member Author

potiuk commented Aug 23, 2023

cc: @bkossakowska -> found it during implementing #33640, once we merge #33640 we should have built-in protection agains similar mistakes.

@potiuk potiuk requested a review from ephraimbuddy August 23, 2023 06:49
@potiuk potiuk force-pushed the fix-google-provider-deprecations branch 2 times, most recently from 45f1708 to 9c602db Compare August 23, 2023 07:49
@potiuk
Copy link
Member Author

potiuk commented Aug 23, 2023

cc: @VladaZakharova @bkossakowska -> The tests are failing after removing the deprecated links and I am not sure if my change is correct or not. Can you please comment ?

@potiuk potiuk force-pushed the fix-google-provider-deprecations branch from 9c602db to 155e9ee Compare August 23, 2023 10:59
The Dataproc Links have been deprecated, but they were deprecated
wrongly - the Deprecation Warnings were always raised when the
dataproc module has been deprecated, but only few classes there
were deprecated. This was because the warnings were added as
class-level warnings rather than as warnings in constructors.

Also the deprecated classes have still been used in operators, raising
the warnings even if the deprecation warnings have been moved
from class to it's constructor.

This PR fixes that:

* moves deprecation warnings from classes to constructors
* replaces usage of deprecated links with those links that
  replaced the deprecated ones

Found during implementing of apache#33640
@potiuk potiuk force-pushed the fix-google-provider-deprecations branch from 155e9ee to acf2921 Compare August 23, 2023 11:44
@potiuk
Copy link
Member Author

potiuk commented Aug 23, 2023

I will close that one - I am mostly guessing what needs to be done. Instead I will make a temporary exclusion for the DataprocLink

@potiuk potiuk closed this Aug 23, 2023
@potiuk potiuk deleted the fix-google-provider-deprecations branch November 17, 2023 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:providers provider:google Google (including GCP) related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants