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 Pinterest: enable SAT high strictness #21477

Merged
merged 2 commits into from
Jan 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,72 +1,64 @@
# See [Source Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/source-acceptance-tests-reference)
# for more information about how to configure these tests
connector_image: airbyte/source-pinterest:dev
acceptance_tests:
spec:
basic_read:
tests:
# TODO: remove backward compatibility checks once updated to version `>0.1.3`
# because for OAuth2.0 implementation the specs are different
- spec_path: "source_pinterest/spec.json"
backward_compatibility_tests_config:
disable_for_version: "0.1.2"
- config_path: secrets/config.json
empty_streams:
- bypass_reason: The stream could return 0 records, because of low rate-limits
name: ad_account_analytics
Comment on lines +6 to +7
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you explain this a little more please? Rather than sleep to wait for more rate-limit, the source will give up and return 0 records?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, the rate limits for Pinterest API are quite low, and they are refreshed once a day, so that would be too long of a sleep for tests, that's why streams may return 0 records instead

- bypass_reason: The stream could return 0 records, because of low rate-limits
name: ad_analytics
- bypass_reason: The stream could return 0 records, because of low rate-limits
name: ad_group_analytics
- bypass_reason: The stream could return 0 records, because of low rate-limits
name: ad_groups
- bypass_reason: The stream could return 0 records, because of low rate-limits
name: ads
- bypass_reason: The stream could return 0 records, because of low rate-limits
name: board_section_pins
- bypass_reason: The stream could return 0 records, because of low rate-limits
name: board_sections
- bypass_reason: The stream could return 0 records, because of low rate-limits
name: campaign_analytics
- bypass_reason: The stream could return 0 records, because of low rate-limits
name: campaigns
- bypass_reason: The stream could return 0 records, because of low rate-limits
name: user_account_analytics
timeout_seconds: 1200
expect_records:
path: "integration_tests/expected_records.jsonl"
extra_fields: no
exact_order: no
extra_records: yes
connection:
tests:
- config_path: "secrets/config.json"
status: "succeed"
- config_path: "integration_tests/invalid_config.json"
status: "failed"
- config_path: "secrets/config_oauth.json"
status: "succeed"
- config_path: secrets/config.json
status: succeed
- config_path: integration_tests/invalid_config.json
status: failed
- config_path: secrets/config_oauth.json
status: succeed
discovery:
tests:
# TODO: remove backward compatibility checks once updated to version `>0.1.3`
- config_path: "secrets/config.json"
backward_compatibility_tests_config:
disable_for_version: "0.1.2"
- config_path: "secrets/config_oauth.json"
backward_compatibility_tests_config:
disable_for_version: "0.1.2"
basic_read:
- backward_compatibility_tests_config:
disable_for_version: 0.1.2
config_path: secrets/config.json
- backward_compatibility_tests_config:
disable_for_version: 0.1.2
config_path: secrets/config_oauth.json
full_refresh:
tests:
- config_path: "secrets/config.json"
# empty streams could be produced because of very low rate limits
configured_catalog_path: "integration_tests/configured_catalog.json"
empty_streams:
- name: ad_account_analytics
bypass_reason: "The stream could return 0 records, because of low rate-limits"
- name: ad_accounts
bypass_reason: "The stream could return 0 records, because of low rate-limits"
- name: ad_analytics
bypass_reason: "The stream could return 0 records, because of low rate-limits"
- name: ad_group_analytics
bypass_reason: "The stream could return 0 records, because of low rate-limits"
- name: ad_groups
bypass_reason: "The stream could return 0 records, because of low rate-limits"
- name: ads
bypass_reason: "The stream could return 0 records, because of low rate-limits"
- name: board_pins
bypass_reason: "The stream could return 0 records, because of low rate-limits"
- name: board_section_pins
bypass_reason: "The stream could return 0 records, because of low rate-limits"
- name: board_sections
bypass_reason: "The stream could return 0 records, because of low rate-limits"
- name: boards
bypass_reason: "The stream could return 0 records, because of low rate-limits"
- name: campaign_analytics
bypass_reason: "The stream could return 0 records, because of low rate-limits"
- name: campaigns
bypass_reason: "The stream could return 0 records, because of low rate-limits"
- name: user_account_analytics
bypass_reason: "The stream could return 0 records, because of low rate-limits"

# INFO: `incremental` and `full_refresh` tests are commented out because of very small Rate Limits for Pinterest API
# They simply not going to pass with Trial Account, having 300 api calls in total.
# The basic_read test is totaly enough to verify key things of this connector.
# Once upgraded to Standard Plan - they could be uncomment back.

# incremental:
# - config_path: "secrets/config.json"
# configured_catalog_path: "integration_tests/configured_catalog.json"
# full_refresh:
# - config_path: "secrets/config.json"
# configured_catalog_path: "integration_tests/configured_catalog.json"
- config_path: secrets/config.json
configured_catalog_path: integration_tests/configured_catalog.json
incremental:
tests:
- config_path: secrets/config.json
configured_catalog_path: integration_tests/configured_catalog.json
future_state:
future_state_path: integration_tests/abnormal_state.json
spec:
tests:
- backward_compatibility_tests_config:
disable_for_version: 0.1.2
spec_path: source_pinterest/spec.json
connector_image: airbyte/source-pinterest:dev
test_strictness_level: high
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{"stream": "ad_accounts", "data": {"id": "549761668032", "name": "Airbyte", "owner": {"username": "integrationtest0375"}, "country": "US", "currency": "USD", "permissions": ["OWNER"]}, "emitted_at": 1673949379630}
{"stream": "boards", "data": {"description": "", "owner": {"username": "integrationtest0375"}, "name": "business", "privacy": "PUBLIC", "id": "666743988523388559"}, "emitted_at": 1674035650077}
{"stream": "board_pins", "data": {"media": {"media_type": "image", "images": {"150x150": {"width": 150, "height": 150, "url": "https://i.pinimg.com/150x150/c6/b6/0d/c6b60d6b5f2ec04db7748d35fb1a8004.jpg"}, "400x300": {"width": 400, "height": 300, "url": "https://i.pinimg.com/400x300/c6/b6/0d/c6b60d6b5f2ec04db7748d35fb1a8004.jpg"}, "600x": {"width": 600, "height": 359, "url": "https://i.pinimg.com/600x/c6/b6/0d/c6b60d6b5f2ec04db7748d35fb1a8004.jpg"}, "1200x": {"width": 1200, "height": 718, "url": "https://i.pinimg.com/1200x/c6/b6/0d/c6b60d6b5f2ec04db7748d35fb1a8004.jpg"}, "originals": {"width": 1270, "height": 760, "url": "https://i.pinimg.com/originals/c6/b6/0d/c6b60d6b5f2ec04db7748d35fb1a8004.jpg"}}}, "alt_text": null, "link": "http://airbyte.io/", "parent_pin_id": null, "board_owner": {"username": "integrationtest0375"}, "title": "Airbyte", "board_section_id": "5195034916661798218", "id": "666743919837294988", "board_id": "666743988523388559", "created_at": "2021-06-08T09:37:30", "description": "Data Integration", "dominant_color": "#cacafe"}, "emitted_at": 1674035650432}