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

Fix(Source-Amazon-Ads): Add Error Hanlding for 425 Errors With Report Streams & Configurable Concurrency Levels (#61652)

This commit is contained in:
Alfredo Garcia
2025-06-25 10:24:16 -05:00
committed by GitHub
parent 7db2e2a03e
commit 394416c1aa
7 changed files with 30 additions and 4 deletions

View File

@@ -11,7 +11,7 @@ acceptance_tests:
- config_path: secrets/config.json
status: succeed
- config_path: integration_tests/invalid_config.json
status: exception
status: failed
discovery:
tests:
- config_path: secrets/config.json

View File

@@ -13,7 +13,7 @@ data:
connectorSubtype: api
connectorType: source
definitionId: c6b0a29e-1da9-4512-9002-7bfd0cba2246
dockerImageTag: 7.2.2
dockerImageTag: 7.2.3
dockerRepository: airbyte/source-amazon-ads
documentationUrl: https://docs.airbyte.com/integrations/sources/amazon-ads
githubIssueLabel: source-amazon-ads

View File

@@ -3,7 +3,7 @@ requires = [ "poetry-core>=1.0.0",]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
version = "7.2.2"
version = "7.2.3"
name = "source-amazon-ads"
description = "Source implementation for Amazon Ads."
authors = [ "Airbyte <contact@airbyte.io>",]

View File

@@ -49,6 +49,10 @@ definitions:
- predicate: "{{ 'Report date is too far in the past' in response.details }}"
action: FAIL
error_message: "{{ response.details }}"
- type: HttpResponseFilter
http_codes: [425]
action: FAIL
error_message: "Amazon detected duplicate report requests. This occurs when syncing the same report types with different time granularities simultaneously. To fix: create a separate source with only the needed report streams and set Number of concurrent workers to 2 for sequential processing."
report_polling_error_handler:
type: DefaultErrorHandler
@@ -3132,5 +3136,5 @@ streams:
concurrency_level:
type: ConcurrencyLevel
default_concurrency: 10
default_concurrency: "{{ config.get('num_workers', 10) }}"
max_concurrency: 10

View File

@@ -110,6 +110,16 @@
"type": "string"
},
"uniqueItems": true
},
"num_workers": {
"type": "integer",
"title": "Number of concurrent workers",
"minimum": 2,
"maximum": 10,
"default": 10,
"examples": [2, 3],
"description": "The number of worker threads to use for the sync.",
"order": 11
}
},
"required": ["client_id", "client_secret", "refresh_token"]

View File

@@ -70,3 +70,12 @@ class SourceAmazonAdsSpec(BaseConfig):
title="Look Back Window",
order=8,
)
num_workers: Optional[int] = Field(
10,
description="The number of worker threads to use for the sync.",
title="Number of concurrent workers",
ge=2,
le=10,
examples=[2, 3],
order=11,
)

View File

@@ -134,6 +134,8 @@ Report data synchronization only covers the last 90 days - [details](https://adv
:::note
The 'Reports' stream(s) by default will have `timeUnit` set to `SUMMARY`. If you would like more granularity, use the `_daily` versions of the report streams, which have
`timeUnit` set to `DAILY`. More info about this can be found [here](https://advertising.amazon.com/API/docs/en-us/guides/reporting/v3/get-started#timeunit-and-supported-columns).
**Important limitation**: Amazon may incorrectly detect duplicate report requests when syncing both summary and daily versions of the same report type simultaneously (e.g., `sponsored_brands_v3_report_stream` and `sponsored_brands_v3_report_stream_daily`). If you encounter this issue, create a separate source with only the needed report streams and set the "Number of concurrent workers" to 2 to ensure sequential processing.
:::
## Performance considerations
@@ -157,6 +159,7 @@ Information about expected report generation waiting time can be found [here](ht
| Version | Date | Pull Request | Subject |
|:--------|:-----------|:---------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 7.2.3 | 2025-06-23 | [61652](https://github.com/airbytehq/airbyte/pull/61652) | Add Error Hanlding for 425 Errors With Report Streams & Configurable Concurrency Levels|
| 7.2.2 | 2025-05-10 | [59332](https://github.com/airbytehq/airbyte/pull/59332) | Update dependencies |
| 7.2.1 | 2025-04-28 | [55745](https://github.com/airbytehq/airbyte/pull/55745) | Enable max concurrent async job count configurability |
| 7.2.0 | 2025-04-28 | [59121](https://github.com/airbytehq/airbyte/pull/59121) | Promoting release candidate 7.2.0-rc.2 to a main version & 7.2.0-rc.1 since they were merged at the same time. |