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: get rid of fail_on_extra_columns: false in SAT #25913

Merged
merged 6 commits into from
May 16, 2023

Conversation

roman-yermilov-gl
Copy link
Contributor

@roman-yermilov-gl roman-yermilov-gl commented May 9, 2023

What

Amazon Ads passes CAT without declaring fail_on_extra_columns: false

How

The following descriptions of streams that pass undeclared columns come from results of the failed connector acceptance test:

columns.txt:./source-amazon-ads.txt-88-The sponsored_display_ad_groups stream has the following schema errors:
columns.txt:./source-amazon-ads.txt:89:Additional properties are not allowed ('creativeType' was unexpected)
columns.txt:./source-amazon-ads.txt-112-The sponsored_display_targetings stream has the following schema errors:
columns.txt:./source-amazon-ads.txt:113:Additional properties are not allowed ('expression', 'resolvedExpression' were unexpected)
columns.txt:./source-amazon-ads.txt-133-The sponsored_product_campaigns stream has the following schema errors:
columns.txt:./source-amazon-ads.txt:134:Additional properties are not allowed ('ruleBasedBudget' was unexpected)
columns.txt:./source-amazon-ads.txt-175-The sponsored_product_targetings stream has the following schema errors:
columns.txt:./source-amazon-ads.txt:176:Additional properties are not allowed ('expression', 'resolvedExpression' were unexpected)

  1. Add the missing properties indicated by the Additional properties are not allowed ('<column>', 'column' were unexpected) logs to the connector's spec.
  2. Remove fail_on_extra_columns: false from the acceptance-test-config.yml file.
  3. Commit changes to spec and acceptance-test-config.yml and open a PR.
  4. Run tests on the connector, either automatically via CI or manually via the /test command
  5. Profit!

@octavia-squidington-iii octavia-squidington-iii added area/connectors Connector related issues area/documentation Improvements or additions to documentation labels May 9, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 9, 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 and you've followed all steps in the Breaking Changes Checklist
  • Connector version has been incremented in the Dockerfile and metadata.yaml according to our Semantic Versioning for Connectors guidelines
  • 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
  • You, or an Airbyter, have run /test successfully on this PR - or on a non-forked branch
  • You, or an Airbyter, have run /publish successfully on this PR - or on a non-forked branch
  • You've updated the connector's metadata.yaml file (new!)
  • The Octavia bot updated the source_definitions.yaml or destination_definitions.yaml, or you ran processResources manually (deprecated)

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.

@roman-yermilov-gl
Copy link
Contributor Author

roman-yermilov-gl commented May 9, 2023

/test connector=connectors/source-amazon-ads

🕑 connectors/source-amazon-ads https://github.com/airbytehq/airbyte/actions/runs/4926540042
❌ connectors/source-amazon-ads https://github.com/airbytehq/airbyte/actions/runs/4926540042
🐛 https://gradle.com/s/mwz4mymqo2mmw

Build Failed

Test summary info:

	 =========================== short test summary info ============================
	 FAILED unit_tests/test_streams.py::test_streams_displays[sponsored_display_targetings-sd/targets]
	 �[31m================= �[31m�[1m1 failed�[0m, �[32m84 passed�[0m, �[33m1368 warnings�[0m�[31m in 6.78s�[0m�[31m ==================�[0m

@roman-yermilov-gl roman-yermilov-gl linked an issue May 9, 2023 that may be closed by this pull request
@roman-yermilov-gl roman-yermilov-gl self-assigned this May 9, 2023
@roman-yermilov-gl
Copy link
Contributor Author

roman-yermilov-gl commented May 9, 2023

/test connector=connectors/source-amazon-ads

🕑 connectors/source-amazon-ads https://github.com/airbytehq/airbyte/actions/runs/4928616150
✅ connectors/source-amazon-ads https://github.com/airbytehq/airbyte/actions/runs/4928616150
Python tests coverage:

Name                                                              Stmts   Miss  Cover
-------------------------------------------------------------------------------------
source_amazon_ads/utils.py                                           22      0   100%
source_amazon_ads/streams/sponsored_products.py                      41      0   100%
source_amazon_ads/streams/sponsored_display.py                       31      0   100%
source_amazon_ads/streams/sponsored_brands.py                        26      0   100%
source_amazon_ads/streams/report_streams/products_report.py          37      0   100%
source_amazon_ads/streams/report_streams/display_report.py           18      0   100%
source_amazon_ads/streams/report_streams/brands_video_report.py      12      0   100%
source_amazon_ads/streams/report_streams/brands_report.py            12      0   100%
source_amazon_ads/streams/report_streams/__init__.py                  5      0   100%
source_amazon_ads/streams/profiles.py                                21      0   100%
source_amazon_ads/streams/attribution_report.py                      81      0   100%
source_amazon_ads/streams/__init__.py                                 7      0   100%
source_amazon_ads/schemas/sponsored_products.py                      40      0   100%
source_amazon_ads/schemas/sponsored_display.py                       34      0   100%
source_amazon_ads/schemas/sponsored_brands.py                        22      0   100%
source_amazon_ads/schemas/profile.py                                 16      0   100%
source_amazon_ads/schemas/attribution_report.py                      21      0   100%
source_amazon_ads/schemas/__init__.py                                 7      0   100%
source_amazon_ads/constants.py                                        1      0   100%
source_amazon_ads/__init__.py                                         2      0   100%
source_amazon_ads/streams/common.py                                  79      1    99%
source_amazon_ads/schemas/common.py                                  53      1    98%
source_amazon_ads/source.py                                          48      1    98%
source_amazon_ads/streams/report_streams/report_streams.py          255     20    92%
-------------------------------------------------------------------------------------
TOTAL                                                               891     23    97%

Build Passed

Test summary info:

=========================== short test summary info ============================
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/plugin.py:63: Skipping TestIncremental.test_two_sequential_reads: can't populate stream because it requires real ad campaign
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:100: The previous and actual specifications are identical.
=================== 36 passed, 2 skipped in 72.68s (0:01:12) ===================

Copy link
Collaborator

@lazebnyi lazebnyi left a comment

Choose a reason for hiding this comment

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

LGTM! Minor changes needed.

@@ -36,6 +36,9 @@ def schema_extra(cls, schema: Dict[str, Any], model: Type["BaseModel"]) -> None:
if "type" in prop:
if allow_none:
prop["type"] = ["null", prop["type"]]
if prop["type"] == "array" and prop["items"]:
Copy link
Collaborator

Choose a reason for hiding this comment

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

let's add unit tests to check this functionality.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@erohmensing
Copy link
Contributor

erohmensing commented May 10, 2023

@roman-yermilov-gl can you please lay out what changes are made and why, in the PR description? Will remove my request until then so it doesn't show up in my list, but feel free to rerequest

@erohmensing erohmensing removed their request for review May 11, 2023 14:50
@roman-yermilov-gl roman-yermilov-gl changed the title Source Amazon Ads: small schema fixes Source Amazon Ads: set fail_on_extra_columns to false May 12, 2023
@roman-yermilov-gl roman-yermilov-gl changed the title Source Amazon Ads: set fail_on_extra_columns to false Source Amazon Ads: get rid of fail_on_extra_columns: false in SAT May 12, 2023
@roman-yermilov-gl
Copy link
Contributor Author

roman-yermilov-gl commented May 12, 2023

/test connector=connectors/source-amazon-ads

🕑 connectors/source-amazon-ads https://github.com/airbytehq/airbyte/actions/runs/4961317760
✅ connectors/source-amazon-ads https://github.com/airbytehq/airbyte/actions/runs/4961317760
Python tests coverage:

Name                                                              Stmts   Miss  Cover
-------------------------------------------------------------------------------------
source_amazon_ads/utils.py                                           22      0   100%
source_amazon_ads/streams/sponsored_products.py                      41      0   100%
source_amazon_ads/streams/sponsored_display.py                       31      0   100%
source_amazon_ads/streams/sponsored_brands.py                        26      0   100%
source_amazon_ads/streams/report_streams/products_report.py          37      0   100%
source_amazon_ads/streams/report_streams/display_report.py           18      0   100%
source_amazon_ads/streams/report_streams/brands_video_report.py      12      0   100%
source_amazon_ads/streams/report_streams/brands_report.py            12      0   100%
source_amazon_ads/streams/report_streams/__init__.py                  5      0   100%
source_amazon_ads/streams/profiles.py                                21      0   100%
source_amazon_ads/streams/attribution_report.py                      81      0   100%
source_amazon_ads/streams/__init__.py                                 7      0   100%
source_amazon_ads/schemas/sponsored_products.py                      40      0   100%
source_amazon_ads/schemas/sponsored_display.py                       34      0   100%
source_amazon_ads/schemas/sponsored_brands.py                        22      0   100%
source_amazon_ads/schemas/profile.py                                 16      0   100%
source_amazon_ads/schemas/attribution_report.py                      21      0   100%
source_amazon_ads/schemas/__init__.py                                 7      0   100%
source_amazon_ads/constants.py                                        1      0   100%
source_amazon_ads/__init__.py                                         2      0   100%
source_amazon_ads/streams/common.py                                  79      1    99%
source_amazon_ads/schemas/common.py                                  53      1    98%
source_amazon_ads/source.py                                          48      1    98%
source_amazon_ads/streams/report_streams/report_streams.py          255     20    92%
-------------------------------------------------------------------------------------
TOTAL                                                               891     23    97%

Build Passed

Test summary info:

=========================== short test summary info ============================
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/plugin.py:63: Skipping TestIncremental.test_two_sequential_reads: can't populate stream because it requires real ad campaign
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/connector_acceptance_test/tests/test_core.py:100: The previous and actual specifications are identical.
=================== 36 passed, 2 skipped in 71.89s (0:01:11) ===================

@roman-yermilov-gl
Copy link
Contributor Author

roman-yermilov-gl commented May 16, 2023

/publish connector=connectors/source-amazon-ads

🕑 Publishing the following connectors:
connectors/source-amazon-ads
https://github.com/airbytehq/airbyte/actions/runs/4992821105


Connector Version Did it publish? Were definitions generated?
connectors/source-amazon-ads 1.0.5

if you have connectors that successfully published but failed definition generation, follow step 4 here ▶️

@roman-yermilov-gl roman-yermilov-gl force-pushed the ryermilov/source-amazon-ads-fix-schema branch from 1fca5bf to 0448776 Compare May 16, 2023 14:11
@roman-yermilov-gl
Copy link
Contributor Author

roman-yermilov-gl commented May 16, 2023

/publish connector=connectors/source-amazon-ads

🕑 Publishing the following connectors:
connectors/source-amazon-ads
https://github.com/airbytehq/airbyte/actions/runs/4993322355


Connector Version Did it publish? Were definitions generated?
connectors/source-amazon-ads 1.0.6

if you have connectors that successfully published but failed definition generation, follow step 4 here ▶️

@roman-yermilov-gl roman-yermilov-gl force-pushed the ryermilov/source-amazon-ads-fix-schema branch from 0448776 to 3bb4548 Compare May 16, 2023 16:25
@roman-yermilov-gl
Copy link
Contributor Author

roman-yermilov-gl commented May 16, 2023

/publish connector=connectors/source-amazon-ads

🕑 Publishing the following connectors:
connectors/source-amazon-ads
https://github.com/airbytehq/airbyte/actions/runs/4994677879


Connector Version Did it publish? Were definitions generated?
connectors/source-amazon-ads 1.0.6

if you have connectors that successfully published but failed definition generation, follow step 4 here ▶️

@roman-yermilov-gl roman-yermilov-gl merged commit 94d0d61 into master May 16, 2023
22 of 23 checks passed
@roman-yermilov-gl roman-yermilov-gl deleted the ryermilov/source-amazon-ads-fix-schema branch May 16, 2023 17:47
bnchrch pushed a commit that referenced this pull request May 16, 2023
…25913)

* Source Amazon Ads: small schema fixes

* Source Amazon Ads: update changelog

* Source Amazon Ads: update unittest

* Source Amazon Ads: unittest additional property is boolean

* Source Amazon Ads: bump version

* auto-bump connector version

---------

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
bnchrch added a commit that referenced this pull request May 16, 2023
* Remove Definition File References from Python files (#25590)

* Remove check_images_exist.sh

* Update definitions.py

* Update build_report.py

* Update tools/bin/ci_integration_workflow_launcher.py

* Update tools/bin/ci_check_dependency.py

* tools/bin/scan_all_spec_airbyte_secret.py

* Remove qa engine references

* Revert "Remove check_images_exist.sh"

This reverts commit 7675162.

* Improve get url function

* Add test

* remove scan_all_spec_airbyte_secret.py

* add additional test

* Remove check_images_exist.sh (#25593)

* Remove Definition File References from Java files (LocalDefinitionProvider), shell scripts and docs (#25592)

* Remove CombinedConnectorCatalogGenerator.java

* Update local definition provider

* Update local def test

* Add spec mask downloader

* Make downloader work

* Delete generators and add tests

* REMOVE THE YAML FILES

* Roughly update docs

* Update shell scripts

* Remove unused

* Add connector metadata file doc

* Apply suggestions from code review

Co-authored-by: Augustin <augustin@airbyte.io>

* Additional PR comments

* Run format tasks

---------

Co-authored-by: Augustin <augustin@airbyte.io>

* Remove unused import

* bundle registry

* Ignore future updates

* Update registry

* new registry

* Readd maskeddatainterceptor

* Automated Change

* Remove icon validation

* Automated Change

* Automated Change

* Source Amazon Ads: get rid of `fail_on_extra_columns: false` in SAT (#25913)

* Source Amazon Ads: small schema fixes

* Source Amazon Ads: update changelog

* Source Amazon Ads: update unittest

* Source Amazon Ads: unittest additional property is boolean

* Source Amazon Ads: bump version

* auto-bump connector version

---------

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>

* connectors-ci: make spec-cache / metadata bucket and creds not required for pre-release (#26119)

* Automated Change

---------

Co-authored-by: Augustin <augustin@airbyte.io>
Co-authored-by: bnchrch <bnchrch@users.noreply.github.com>
Co-authored-by: Roman Yermilov [GL] <86300758+roman-yermilov-gl@users.noreply.github.com>
Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
marcosmarxm pushed a commit to natalia-miinto/airbyte that referenced this pull request Jun 8, 2023
…irbytehq#25913)

* Source Amazon Ads: small schema fixes

* Source Amazon Ads: update changelog

* Source Amazon Ads: update unittest

* Source Amazon Ads: unittest additional property is boolean

* Source Amazon Ads: bump version

* auto-bump connector version

---------

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
marcosmarxm pushed a commit to natalia-miinto/airbyte that referenced this pull request Jun 8, 2023
* Remove Definition File References from Python files (airbytehq#25590)

* Remove check_images_exist.sh

* Update definitions.py

* Update build_report.py

* Update tools/bin/ci_integration_workflow_launcher.py

* Update tools/bin/ci_check_dependency.py

* tools/bin/scan_all_spec_airbyte_secret.py

* Remove qa engine references

* Revert "Remove check_images_exist.sh"

This reverts commit 7675162.

* Improve get url function

* Add test

* remove scan_all_spec_airbyte_secret.py

* add additional test

* Remove check_images_exist.sh (airbytehq#25593)

* Remove Definition File References from Java files (LocalDefinitionProvider), shell scripts and docs (airbytehq#25592)

* Remove CombinedConnectorCatalogGenerator.java

* Update local definition provider

* Update local def test

* Add spec mask downloader

* Make downloader work

* Delete generators and add tests

* REMOVE THE YAML FILES

* Roughly update docs

* Update shell scripts

* Remove unused

* Add connector metadata file doc

* Apply suggestions from code review

Co-authored-by: Augustin <augustin@airbyte.io>

* Additional PR comments

* Run format tasks

---------

Co-authored-by: Augustin <augustin@airbyte.io>

* Remove unused import

* bundle registry

* Ignore future updates

* Update registry

* new registry

* Readd maskeddatainterceptor

* Automated Change

* Remove icon validation

* Automated Change

* Automated Change

* Source Amazon Ads: get rid of `fail_on_extra_columns: false` in SAT (airbytehq#25913)

* Source Amazon Ads: small schema fixes

* Source Amazon Ads: update changelog

* Source Amazon Ads: update unittest

* Source Amazon Ads: unittest additional property is boolean

* Source Amazon Ads: bump version

* auto-bump connector version

---------

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>

* connectors-ci: make spec-cache / metadata bucket and creds not required for pre-release (airbytehq#26119)

* Automated Change

---------

Co-authored-by: Augustin <augustin@airbyte.io>
Co-authored-by: bnchrch <bnchrch@users.noreply.github.com>
Co-authored-by: Roman Yermilov [GL] <86300758+roman-yermilov-gl@users.noreply.github.com>
Co-authored-by: Octavia Squidington III <octavia-squidington-iii@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.

Source Amazon Ads: Add undeclared columns to spec
4 participants