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

Revert protection against back-compatibilty issue with google-core-api #37111

Merged
merged 1 commit into from
Jan 31, 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
3 changes: 2 additions & 1 deletion airflow/providers/google/provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ dependencies:
- gcsfs>=2023.10.0
- google-ads>=22.1.0
- google-analytics-admin
- google-api-core>=2.11.0
# Google-api-core 2.16.0 back-compat issue: https://github.com/googleapis/python-api-core/issues/576
- google-api-core>=2.11.0,!=2.16.0
- google-api-python-client>=1.6.0
- google-auth>=1.0.0
- google-auth-httplib2>=0.0.1
Expand Down
2 changes: 1 addition & 1 deletion generated/provider_dependencies.json
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@
"gcsfs>=2023.10.0",
"google-ads>=22.1.0",
"google-analytics-admin",
"google-api-core>=2.11.0",
"google-api-core>=2.11.0,!=2.16.0",
"google-api-python-client>=1.6.0",
"google-auth-httplib2>=0.0.1",
"google-auth>=1.0.0",
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ winrm = [
# If you want to modify these - modify the corresponding provider.yaml instead.
#############################################################################################################
# START OF GENERATED DEPENDENCIES
# Hash of dependencies: 5041869464e6475fea61bee848306a8c
# Hash of dependencies: ad91a0758ca9b408679bd3ea3ec22c66
airbyte = [ # source: airflow/providers/airbyte/provider.yaml
"apache-airflow[http]",
]
Expand Down Expand Up @@ -705,7 +705,7 @@ google = [ # source: airflow/providers/google/provider.yaml
"gcsfs>=2023.10.0",
"google-ads>=22.1.0",
"google-analytics-admin",
"google-api-core>=2.11.0",
"google-api-core>=2.11.0,!=2.16.0",
"google-api-python-client>=1.6.0",
"google-auth-httplib2>=0.0.1",
"google-auth>=1.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,7 @@
import os
from datetime import datetime

try:
from google.api_core.retry import AsyncRetry # type: ignore[attr-defined]
# There is a backwards-incompatible change in google.api_core.retry.AsyncRetry imports
# In 2.16.0 version of google-api-core, AsyncRetry was moved to google.api_core.retry_unary_async
# and backwards compatibility impots were not haandling the case of
# `from google.api_core.retry_async import AsyncRetry`
# The issue is tracked in https://github.com/googleapis/python-api-core/issues/586
# Until it is solved, we need to handle both cases, because one works before and one after 2.16.0
# But there is no import that works for both.
except ImportError:
from google.api_core.retry_async import AsyncRetry # type: ignore[attr-defined]
from google.api_core.retry_async import AsyncRetry

from airflow.models.dag import DAG
from airflow.providers.google.cloud.operators.dataproc import (
Expand Down