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

Bump google-ads version to use v18 by default #43474

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

VladaZakharova
Copy link
Contributor

This PR is related to the upgrade of google-ads dependency. There is a new API version on Google Ads API and Google Ads API tends to deprecate too quickly. So we are trying to increase the dependency version to match with the latest version.

Since we mostly use the types from the underlying library it is safe to upgrade. Also the users can give specific API version to override default value and use the previous API versions.

Here is the "Deprecation and sunset page" of Google Ads API: https://developers.google.com/google-ads/api/docs/sunset-dates.


^ 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 Oct 29, 2024
@eladkal
Copy link
Contributor

eladkal commented Oct 29, 2024

Can we maybe change our approach to the default version?

We have default value in our hook

self.api_version = api_version or self.default_api_version

which is forward to the GoogleAdsClient

return client.get_service("GoogleAdsService", version=self.api_version)

I checked and the client has it's own default.

https://github.com/googleads/google-ads-python/blob/6c205c4abdf95a18c70b938e37f448660b280da9/google/ads/googleads/client.py#L35

This means that we can change self.api_version to be default of None. if user wants to set it they can otherwise it uses the underlying SDK default (whatever that may be)

@VladaZakharova
Copy link
Contributor Author

Can we maybe change our approach to the default version?

We have default value in our hook

self.api_version = api_version or self.default_api_version

which is forward to the GoogleAdsClient

return client.get_service("GoogleAdsService", version=self.api_version)

I checked and the client has it's own default.

https://github.com/googleads/google-ads-python/blob/6c205c4abdf95a18c70b938e37f448660b280da9/google/ads/googleads/client.py#L35

This means that we can change self.api_version to be default of None. if user wants to set it they can otherwise it uses the underlying SDK default (whatever that may be)

wow, this is really good idea, thank you so much! I will update the code

@potiuk potiuk merged commit 85b095e into apache:main Oct 29, 2024
108 checks passed
ellisms pushed a commit to ellisms/airflow that referenced this pull request Nov 13, 2024
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.

3 participants