Repository navigation
feat(source-amazon-seller-partner): Test JsonItemsDecoder for brand analytics - #78360
Alfredo Garcia (agarctfi) wants to merge 5 commits into
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. 💡 Show Tips and TricksPR Slash CommandsAirbyte Maintainers (that's you!) can execute the following slash commands on your PR:
📚 Show Repo GuidanceHelpful Resources
|
|
…ecoder in all Union types Ran `poe assemble` (datamodel-codegen) against the YAML schema to regenerate the Pydantic model. This adds JsonItemsDecoder to: - GzipDecoder.decoder - ZipfileDecoder.decoder - SimpleRetriever.decoder - AsyncRetriever.decoder - AsyncRetriever.download_decoder The YAML schema already had JsonItemsDecoder in these anyOf unions, but the previously generated Python model was stale and missing it. This fixes manifest validation for GzipDecoder -> JsonItemsDecoder pipelines (needed by airbytehq/airbyte#78360). Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
Updated this PR to use the CDK/SDM pre-release generated by the completed publish workflow for airbytehq/airbyte-python-cdk#1026, then merged latest Pinned versions:
Validation passed locally:
Latest push is |
|
/publish-connectors-prerelease
|
|
|
Publish status clarification:
I also canceled a duplicate publish workflow I accidentally triggered after Zane's slash command had already started the real publish run. The canceled duplicate is https://github.com/airbytehq/airbyte/actions/runs/27171653290?pr=78360 and does not affect the successful pre-release above. |
|
What
Alfredo Garcia asked for a draft PR to test the
JsonItemsDecoderchanges from airbytehq/airbyte-python-cdk#1026 in the Amazon Seller Partner connector. This PR updates the Brand Analytics JSON report downloads for the OOM investigation tracked in https://github.com/airbytehq/oncall/issues/12143.How
The connector now builds from the SDM pre-release generated by the completed CDK publish workflow for airbytehq/airbyte-python-cdk#1026:
docker.io/airbyte/source-declarative-manifest:7.21.1.post9.dev27167986557@sha256:a5b8673bd083193321a9ed06aafdfe0e8fafa6a5848a8dea3ba95b27ec11b7ddThe unit-test environment is also pinned to
airbyte-cdk==7.21.1.post9.dev27167986557so connector validation runs against the same JsonItemsDecoder-capable CDK pre-release.The five Brand Analytics report streams replace the custom
source_declarative_manifest.components.GzipJsonDecoderwith a declarativeGzipDecoderwrappingJsonItemsDecoder, and extraction now reads the streamed array items directly fromfield_path: [].The branch was updated against latest
master; the Amazon Seller Partner conflict kept the JsonItemsDecoder manifest changes and the CDK/SDM pre-release pin.Validation on this branch:
docker buildx imagetools inspect docker.io/airbyte/source-declarative-manifest:7.21.1.post9.dev27167986557→ digest matchessha256:a5b8673bd083193321a9ed06aafdfe0e8fafa6a5848a8dea3ba95b27ec11b7ddpoetry checkfromsource-amazon-seller-partner/unit_tests→ passedpoetry run pytest test_source.py::test_streams_count -q→ 1 passed after mergepoetry run pytest integration/test_report_based_streams.py::TestFullRefresh::test_given_report_when_read_then_return_records --maxfail=1 -q→ 22 passed after mergepoetry run pytest -qfromsource-amazon-seller-partner/unit_tests→ 554 passed after mergegit diff --checkscoped to the touched Amazon Seller Partner files → passedReview guide
airbyte-integrations/connectors/source-amazon-seller-partner/metadata.yamlairbyte-integrations/connectors/source-amazon-seller-partner/manifest.yamlairbyte-integrations/connectors/source-amazon-seller-partner/unit_tests/pyproject.tomlairbyte-integrations/connectors/source-amazon-seller-partner/unit_tests/poetry.lockUser Impact
If the CDK image accepts this manifest shape, Brand Analytics JSON report records should be streamed from the nested arrays instead of loading the full decompressed JSON payload into memory before extraction. This targets OOM risk on large Brand Analytics reports without changing the emitted fields.
Can this PR be safely reverted and rolled back?
Link to Devin session: https://app.devin.ai/sessions/15c02c695f434bbbab5ca5ec5d099405
Requested by: Alfredo Garcia (@agarctfi)