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 Mixpanel: reimplement backoff strategy #27752

Merged

Conversation

davydov-d
Copy link
Collaborator

@davydov-d davydov-d commented Jun 27, 2023

What

https://github.com/airbytehq/oncall/issues/2363

How

The root cause of the issue is we're exceeding the number of retries because we're exceeding the rate limits. Therefore:

  • Partially revert changes that were made in version 0.1.32: sleep after making every request as it is supposed by the Mixpanel API docs

This brings in a contradictory condition: one one hand we should wait after each api call, on the other hand the connector can time out when running CAT or during check() or discover() regarding changes made in version 0.1.35 (extra api calls added for both check() and discover()). That's why more changes were made:

  • Sleep for 1 min after making each api call
  • Timeouts for check and discover increased in the CAT config
  • Skip sleeping when calling check or discover only in prod mode (do sleep when running tests)
  • Use cache for the Cohorts stream
  • Replace all iterators with generators where possible to not make unnecessary extra api calls
  • Do not use constructions like "list(read_full_refresh(...))" to not make unnecessary extra api calls

upd:

🚨 User Impact 🚨

No negative impact

@octavia-squidington-iii
Copy link
Collaborator

source-stripe test report (commit 4f619c4944) - ❌

⏲️ Total pipeline duration: 33.36s

Step Result
Validate airbyte-integrations/connectors/source-stripe/metadata.yaml
Connector version semver check
QA checks
Code format checks
Connector package install
Build source-stripe docker image for platform linux/x86_64
Unit 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-stripe test

@octavia-squidington-iii
Copy link
Collaborator

source-mixpanel test report (commit 4f619c4944) - ❌

⏲️ Total pipeline duration: 116mn22s

Step Result
Validate airbyte-integrations/connectors/source-mixpanel/metadata.yaml
Connector version semver check
QA checks
Code format checks
Connector package install
Build source-mixpanel docker image for platform linux/x86_64
Unit 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-mixpanel test

@octavia-squidington-iii
Copy link
Collaborator

source-mixpanel test report (commit 6438b657a3) - ❌

⏲️ Total pipeline duration: 09mn07s

Step Result
Validate airbyte-integrations/connectors/source-mixpanel/metadata.yaml
Connector version semver check
QA checks
Code format checks
Connector package install
Build source-mixpanel docker image for platform linux/x86_64
Unit 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-mixpanel test

@octavia-squidington-iii
Copy link
Collaborator

source-mixpanel test report (commit 2835add735) - ❌

⏲️ Total pipeline duration: 195mn35s

Step Result
Validate airbyte-integrations/connectors/source-mixpanel/metadata.yaml
Connector version semver check
QA checks
Code format checks
Connector package install
Build source-mixpanel docker image for platform linux/x86_64
Unit 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-mixpanel test

@octavia-squidington-iii
Copy link
Collaborator

source-mixpanel test report (commit 443781eaa9) - ❌

⏲️ Total pipeline duration: 67mn16s

Step Result
Validate airbyte-integrations/connectors/source-mixpanel/metadata.yaml
Connector version semver check
QA checks
Code format checks
Connector package install
Build source-mixpanel docker image for platform linux/x86_64
Unit 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-mixpanel test

@octavia-squidington-iii
Copy link
Collaborator

source-mixpanel test report (commit c638de35fb) - ❌

⏲️ Total pipeline duration: 69mn22s

Step Result
Validate airbyte-integrations/connectors/source-mixpanel/metadata.yaml
Connector version semver check
QA checks
Code format checks
Connector package install
Build source-mixpanel docker image for platform linux/x86_64
Unit 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-mixpanel test

@octavia-squidington-iii
Copy link
Collaborator

source-mixpanel test report (commit 5c326966eb) - ✅

⏲️ Total pipeline duration: 132mn36s

Step Result
Validate airbyte-integrations/connectors/source-mixpanel/metadata.yaml
Connector version semver check
QA checks
Code format checks
Connector package install
Build source-mixpanel docker image for platform linux/x86_64
Unit 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-mixpanel test

@davydov-d davydov-d merged commit 7ae4f86 into master Jul 18, 2023
24 of 27 checks passed
@davydov-d davydov-d deleted the ddavydov/#2363-source-mixpanel-reimplement-backoff-strategy branch July 18, 2023 11:02
efimmatytsin pushed a commit to scentbird/airbyte that referenced this pull request Jul 27, 2023
* Connector health: source hubspot, gitlab, snapchat-marketing: fix builds

* Add stream ShippingRates

* airbytehq#2363 source mixpanel: reimplement backoff strategy

* airbytehq#2363 source mixpanel: upd changelog

* airbytehq#2363 source mixpanel: revert v0.1.32

* rework rate limits

* wait only when running CAT + increase timeouts

* airbytehq#2363 return backoff time

* code format

* use env variable instead of a hidden field in the config

* review comments

* review fixes

* fix reading env var

* Resolve conflicts, Bump version

* Attempt to bump version to avoid caching

* split test config into to projects

* rollback version

* undo non related changes

* remove non related changes

* revert new line

* fix funnel slice patching

* fix funnel slice patching

* do not use stream state for generating request params!

* fix updating state

* Revert "do not use stream state for generating request params!"

This reverts commit 443781e.

* revert prev commits

* fix timestamp filtering

---------

Co-authored-by: btkcodedev <btk.codedev@gmail.com>
Co-authored-by: Augustin <augustin@airbyte.io>
Co-authored-by: maxi297 <maxime@airbyte.io>
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/mixpanel connectors/source/stripe
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants