1
0
mirror of synced 2025-12-25 02:09:19 -05:00

🐛 Source Google Ads: add retry to handle InternalServerError for grpc internal lib (#32001)

Co-authored-by: bazarnov <bazarnov@users.noreply.github.com>
This commit is contained in:
Baz
2023-10-31 17:21:53 +02:00
committed by GitHub
parent 050f7de230
commit e54c2cf5d3
4 changed files with 4 additions and 4 deletions

View File

@@ -11,7 +11,7 @@ data:
connectorSubtype: api
connectorType: source
definitionId: 253487c0-2246-43ba-a21f-5116b20a2c50
dockerImageTag: 2.0.1
dockerImageTag: 2.0.2
dockerRepository: airbyte/source-google-ads
documentationUrl: https://docs.airbyte.com/integrations/sources/google-ads
githubIssueLabel: source-google-ads

View File

@@ -12,7 +12,7 @@ from airbyte_cdk.models import FailureType
from airbyte_cdk.utils import AirbyteTracedException
from google.ads.googleads.client import GoogleAdsClient
from google.ads.googleads.v13.services.types.google_ads_service import GoogleAdsRow, SearchGoogleAdsResponse
from google.api_core.exceptions import ServerError, TooManyRequests
from google.api_core.exceptions import InternalServerError, ServerError, TooManyRequests
from google.auth import exceptions
from proto.marshal.collections import Repeated, RepeatedComposite
@@ -40,7 +40,7 @@ class GoogleAds:
@backoff.on_exception(
backoff.expo,
(ServerError, TooManyRequests),
(InternalServerError, ServerError, TooManyRequests),
on_backoff=lambda details: logger.info(
f"Caught retryable error after {details['tries']} tries. Waiting {details['wait']} seconds then retrying..."
),

View File

@@ -58,7 +58,6 @@ FULL_REFRESH_CUSTOM_TABLE = [
class SourceGoogleAds(AbstractSource):
# Skip exceptions on missing streams
raise_exception_on_missing_stream = False

View File

@@ -278,6 +278,7 @@ Due to a limitation in the Google Ads API which does not allow getting performan
| Version | Date | Pull Request | Subject |
|:---------|:-----------|:---------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------|
| `2.0.2` | 2023-10-31 | [32001](https://github.com/airbytehq/airbyte/pull/32001) | Added handling (retry) for `InternalServerError` while reading the streams |
| `2.0.1` | 2023-10-27 | [31908](https://github.com/airbytehq/airbyte/pull/31908) | Base image migration: remove Dockerfile and use the python-connector-base image |
| `2.0.0` | 2023-10-04 | [31048](https://github.com/airbytehq/airbyte/pull/31048) | Fix schem default streams, change names of streams. |
| `1.0.0` | 2023-09-28 | [30705](https://github.com/airbytehq/airbyte/pull/30705) | Fix schemas for custom queries |