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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion generated/provider_dependencies.json
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@
"gcloud-aio-bigquery>=6.1.2",
"gcloud-aio-storage>=9.0.0",
"gcsfs>=2023.10.0",
"google-ads>=25.0.0",
"google-ads>=25.1.0",
"google-analytics-admin>=0.9.0",
"google-api-core>=2.11.0,!=2.16.0,!=2.18.0",
"google-api-python-client>=2.0.2",
Expand Down
12 changes: 5 additions & 7 deletions providers/src/airflow/providers/google/ads/hooks/ads.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
from airflow.providers.google.common.hooks.base_google import get_field

if TYPE_CHECKING:
from google.ads.googleads.v17.services.services.customer_service import CustomerServiceClient
from google.ads.googleads.v17.services.services.google_ads_service import GoogleAdsServiceClient
from google.ads.googleads.v17.services.types.google_ads_service import GoogleAdsRow
from google.ads.googleads.v18.services.services.customer_service import CustomerServiceClient
from google.ads.googleads.v18.services.services.google_ads_service import GoogleAdsServiceClient
from google.ads.googleads.v18.services.types.google_ads_service import GoogleAdsRow
from google.api_core.page_iterator import GRPCIterator


Expand Down Expand Up @@ -101,16 +101,14 @@ class GoogleAdsHook(BaseHook):
:param api_version: The Google Ads API version to use.
"""

default_api_version = "v17"

def __init__(
self,
api_version: str | None,
api_version: str | None = None,
gcp_conn_id: str = "google_cloud_default",
google_ads_conn_id: str = "google_ads_default",
) -> None:
super().__init__()
self.api_version = api_version or self.default_api_version
self.api_version = api_version
self.gcp_conn_id = gcp_conn_id
self.google_ads_conn_id = google_ads_conn_id
self.google_ads_config: dict[str, Any] = {}
Expand Down
2 changes: 1 addition & 1 deletion providers/src/airflow/providers/google/provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ dependencies:
- gcloud-aio-bigquery>=6.1.2
- gcloud-aio-storage>=9.0.0
- gcsfs>=2023.10.0
- google-ads>=25.0.0
- google-ads>=25.1.0
- google-analytics-admin>=0.9.0
# Google-api-core 2.16.0 back-compat issue:
# - https://github.com/googleapis/python-api-core/issues/576
Expand Down