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 Facebook Marketing: restore reduced request record limit after successful response #27979

Merged

Conversation

bazarnov
Copy link
Collaborator

@bazarnov bazarnov commented Jul 5, 2023

What

Resolving:

How

  • introduced new attributes request_record_limit_is_reduced and last_api_call_is_successfull to manage the state of the flow in the api.py
  • added the _should_restore_default_page_size method to api.py to check whether the revert process should be triggered
  • modified the call method to check for reverting conditions and inject the default_page_size
  • modified the api.py __init___ method to provide the api.py module with the config.page_size value supplied by the customer and further use it as the default_page_size attribute.
  • extended the backoff_policy with "An unknown error occurred" error pattern to track in reduce_request_record_limit from common.py
  • added the revert_request_record_limit method to common.py to handle backoff(...on_success=...) scenario.
  • covered the case with unit_test
  • adjusted old tests up to the changes.

Recommended reading order

  1. y.python

🚨 User Impact 🚨

No user impact is expected - no breaking changes.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 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
  • The connector tests are passing in CI
  • You've updated the connector's metadata.yaml file (new!)
  • 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.

@octavia-squidington-iii octavia-squidington-iii added the area/documentation Improvements or additions to documentation label Jul 5, 2023
@bazarnov bazarnov marked this pull request as ready for review July 5, 2023 14:43
@octavia-squidington-iii
Copy link
Collaborator

source-facebook-marketing test report (commit 3f1b3a83ac) - ✅

⏲️ Total pipeline duration: 57mn32s

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

🔗 View the logs here

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-facebook-marketing test

@octavia-squidington-iii
Copy link
Collaborator

source-facebook-marketing test report (commit 42fcdfd542) - ✅

⏲️ Total pipeline duration: 55mn34s

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

🔗 View the logs here

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-facebook-marketing test

@bazarnov bazarnov merged commit 9675cc1 into master Jul 7, 2023
22 checks passed
@bazarnov bazarnov deleted the baz/source-fb-marketing-restore-req-limit-after-200 branch July 7, 2023 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Source Facebook Marketing: Retry pattern not working for unknown errors
4 participants