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

🐛 Source Amazon Ads: Fix unexpected column for SponsoredProductCampaigns and SponsoredBrandsKeywords #30679

Merged
merged 14 commits into from Sep 22, 2023

Conversation

lazebnyi
Copy link
Collaborator

@lazebnyi lazebnyi commented Sep 21, 2023

What

Fix due to comments after checklist review - https://docs.google.com/spreadsheets/d/12JrATeBFEvjp-H-Uxo3x5VgGDwadxFsq35HCMKlPXBg/edit#gid=1700962388

How

Add field to schema
Add pattern, format to start date and airbyte_secret to client_id
Delete inapp doc to use main one

🚨 User Impact 🚨

No

Pre-merge Actions

Updating a connector

Community member or Airbyter

  • Grant edit access to maintainers (instructions)
  • Unit & integration tests added

Airbyter

If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.

  • Create a non-forked branch based on this PR and test the below items on it
  • Build is successful
  • If new credentials are required for use in CI, add them to GSM. Instructions.

@vercel
Copy link

vercel bot commented Sep 21, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview Sep 22, 2023 3:24pm

@octavia-squidington-iii octavia-squidington-iii added area/connectors Connector related issues area/documentation Improvements or additions to documentation connectors/source/amazon-ads labels Sep 21, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 21, 2023

Before Merging a Connector Pull Request

Wow! What a great pull request you have here! 🎉

To merge this PR, ensure the following has been done/considered for each connector added or updated:

  • PR name follows PR naming conventions
  • Breaking changes are considered. If a Breaking Change is being introduced, ensure an Airbyte engineer has created a Breaking Change Plan.
  • Connector version has been incremented in the Dockerfile and metadata.yaml according to our Semantic Versioning for Connectors guidelines
  • You've updated the connector's metadata.yaml file any other relevant changes, including a breakingChanges entry for major version bumps. See metadata.yaml docs
  • Secrets in the connector's spec are annotated with airbyte_secret
  • All documentation files are up to date. (README.md, bootstrap.md, docs.md, etc...)
  • Changelog updated in docs/integrations/<source or destination>/<name>.md with an entry for the new version. See changelog example
  • Migration guide updated in docs/integrations/<source or destination>/<name>-migrations.md with an entry for the new version, if the version is a breaking change. See migration guide example
  • If set, you've ensured the icon is present in the platform-internal repo. (Docs)

If the checklist is complete, but the CI check is failing,

  1. Check for hidden checklists in your PR description

  2. Toggle the github label checklist-action-run on/off to re-run the checklist CI.

@airbyte-oss-build-runner
Copy link
Collaborator

source-amazon-ads test report (commit 58df40edc1) - ✅

⏲️ Total pipeline duration: 03mn10s

Step Result
Connector package install
Build source-amazon-ads docker image for platform linux/x86_64
Unit tests
Acceptance tests
Code format checks
Validate airbyte-integrations/connectors/source-amazon-ads/metadata.yaml
Connector version semver check
Connector version increment check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-amazon-ads test

@airbyte-oss-build-runner

This comment was marked as outdated.

@airbyte-oss-build-runner

This comment was marked as outdated.

@airbyte-oss-build-runner

This comment was marked as outdated.

@airbyte-oss-build-runner

This comment was marked as outdated.

@airbyte-oss-build-runner

This comment was marked as outdated.

@airbyte-oss-build-runner
Copy link
Collaborator

source-amazon-ads test report (commit 16070afae6) - ✅

⏲️ Total pipeline duration: 02mn49s

Step Result
Connector package install
Build source-amazon-ads docker image for platform linux/x86_64
Unit tests
Acceptance tests
Code format checks
Validate airbyte-integrations/connectors/source-amazon-ads/metadata.yaml
Connector version semver check
Connector version increment check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-amazon-ads test

@lazebnyi lazebnyi requested review from brianjlai and davydov-d and removed request for brianjlai September 21, 2023 23:18

assert source.check(None, config_gen(start_date="2022-02-20")) == AirbyteConnectionStatus(status=Status.SUCCEEDED)
assert len(responses.calls) == 6
assert len(responses.calls) == 4
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did the number of calls change? I couldn't find any related changes in the code

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we update case in line 67-68 and now we handle wrong pattern, so call qty reduced

assert command_check(source, config_gen(start_date="")) == AirbyteConnectionStatus(status=Status.SUCCEEDED)
assert len(responses.calls) == 4
with pytest.raises(Exception):
command_check(source, config_gen(start_date=""))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't start date optional?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is optional. But we're adding it with the wrong template in that case, that's why the error rise.

@airbyte-oss-build-runner
Copy link
Collaborator

source-amazon-ads test report (commit 11a97ab423) - ✅

⏲️ Total pipeline duration: 02mn07s

Step Result
Connector package install
Build source-amazon-ads docker image for platform linux/x86_64
Unit tests
Acceptance tests
Code format checks
Validate airbyte-integrations/connectors/source-amazon-ads/metadata.yaml
Connector version semver check
Connector version increment check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-amazon-ads test

@github-actions

This comment was marked as outdated.

@octavia-squidington-iii octavia-squidington-iii added area/connectors Connector related issues area/documentation Improvements or additions to documentation labels Sep 22, 2023
@@ -41,6 +42,7 @@ def read_full_refresh(stream_instance: Stream):
def command_check(source: Source, config):
logger = mock.MagicMock()
connector_config, _ = split_config(config)
connector_config = MigrateStartDate.modify_and_save("unit_tests/config.json", source, connector_config)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to test modify logic with check tests

@airbyte-oss-build-runner
Copy link
Collaborator

source-amazon-ads test report (commit 535d1b74be) - ✅

⏲️ Total pipeline duration: 03mn19s

Step Result
Connector package install
Build source-amazon-ads docker image for platform linux/x86_64
Unit tests
Acceptance tests
Code format checks
Validate airbyte-integrations/connectors/source-amazon-ads/metadata.yaml
Connector version semver check
Connector version increment check
QA checks

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-amazon-ads test

@lazebnyi lazebnyi linked an issue Sep 22, 2023 that may be closed by this pull request
@lazebnyi lazebnyi merged commit 50faaa6 into master Sep 22, 2023
29 of 31 checks passed
@lazebnyi lazebnyi deleted the lazebnyi/source-amazon-ads-fix-schema branch September 22, 2023 17:42
jbfbell pushed a commit that referenced this pull request Sep 22, 2023
…gns and SponsoredBrandsKeywords (#30679)

Co-authored-by: lazebnyi <lazebnyi@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues area/documentation Improvements or additions to documentation connectors/source/amazon-ads
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[EPIC] Source Amazon Ads to Silver
4 participants