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 google-analytics-data-api: fix max time #43929

Conversation

aldogonzalez8
Copy link
Contributor

@aldogonzalez8 aldogonzalez8 commented Aug 12, 2024

What

I've noticed some syncs are failing without giving a chance to wait one hour for quota recovery after it runs out. This is due to a miss in the CDK upgrade, where the max_time is set to the default of 10 minutes rather than setting an acceptable time to check for quota recovery, which is one hour.


2024-08-08 16:42:58 source > Giving up _send(...) after 2 tries (airbyte_cdk.sources.streams.http.exceptions.UserDefinedBackoffException: Your API key has reached its limit for the hour. Wait until the quota refreshes in an hour to retry.)
2024-08-08 16:42:58 source > Max retry limit reached in 1801.214154s. Request: <preparedrequest>, Response: <response>
2024-08-08 16:42:58 source > Encountered an exception while reading stream demographic_age_report

How

Amend max_time and add test for this behavior.

Review guide

  1. airbyte-integrations/connectors/source-google-analytics-data-api/source_google_analytics_data_api/source.py: set error handler max time to one hour.
  2. airbyte-integrations/connectors/source-google-analytics-data-api/unit_tests/test_source.py: add testing for this scenario.

User Impact

Syncs that reach their limit for the hour can back off and complete after the quota refreshes.

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

@aldogonzalez8 aldogonzalez8 requested a review from a team August 12, 2024 15:51
@aldogonzalez8 aldogonzalez8 self-assigned this Aug 12, 2024
Copy link

vercel bot commented Aug 12, 2024

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

Name Status Preview Comments Updated (UTC)
airbyte-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 13, 2024 0:51am

@octavia-squidington-iii octavia-squidington-iii added the area/documentation Improvements or additions to documentation label Aug 12, 2024
@aldogonzalez8 aldogonzalez8 changed the title Source google-analytics-data-api: fix max time 🐛 Source google-analytics-data-api: fix max time Aug 12, 2024
@bazarnov
Copy link
Collaborator

bazarnov commented Aug 13, 2024

/approve-regression-tests

Check job output.

✅ Approving regression tests

@aldogonzalez8 aldogonzalez8 merged commit e4623e8 into master Aug 13, 2024
39 checks passed
@aldogonzalez8 aldogonzalez8 deleted the aldogonzalez8/source/google-analytics-data-api/fix-max-time branch August 13, 2024 19:52
LouisAuneau pushed a commit to LouisAuneau/airbyte that referenced this pull request Aug 13, 2024
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/google-analytics-data-api
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants