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 Shopify: add resiliency on some transient errors using the HttpClient #38084

Merged
merged 44 commits into from
Jun 6, 2024

Conversation

strosek
Copy link
Contributor

@strosek strosek commented May 9, 2024

What

The scope of this PR has changed. I has been used to integrate the HttpClient in order for us to retry on connection errors.

Initial part:
Add tests for reading records from a GraphQL bulk in Shopify. Those were added as part of https://github.com/airbytehq/airbyte-internal-issues/issues/7084

Added part:

How

Initial part

Created an integration tests file for testing the entrypoint read() function. A couple tests were added, one with a successful mock and one with an ConnectionError raised when the mocker tries to build a response.

Review guide

The small changes mentioned above have all been reviewed in their own PR. Hence, there should be nothing to review in this one

User Impact

  • The transient errors should now be flagged as transient instead of config errors
  • Add retries on 429 + 5XX errors for bulk job HTTP requests and access scope requests

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

bazarnov and others added 29 commits May 1, 2024 17:08
…ct-images-variants-to-bulk' into strosek/test-conn-err-retry
Copy link

vercel bot commented May 9, 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 Jun 5, 2024 1:32pm

@octavia-squidington-iii octavia-squidington-iii added the area/documentation Improvements or additions to documentation label May 24, 2024
@maxi297 maxi297 marked this pull request as ready for review May 25, 2024 16:44
@maxi297 maxi297 requested a review from a team May 25, 2024 16:44
}"""
inner_query = inner_query.replace("%LOWER_BOUNDARY_TOKEN%", lower_boundary.isoformat())
inner_query = inner_query.replace("%UPPER_BOUNDARY_TOKEN%", upper_boundary.isoformat())
outer_query = outer_query.replace("%INNER_QUERY_TOKEN%", inner_query)
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can also leverage the stream_slices() method, to produce 1 slice, or multiple slices, instead of directly injecting the date-time str.

Copy link
Contributor

@maxi297 maxi297 May 27, 2024

Choose a reason for hiding this comment

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

It feels like we like this isn't reducing the readability of the test and that we should not rely on the source code to create our expectations for the slices that will be produced

@maxi297 maxi297 requested a review from bazarnov May 27, 2024 16:34
Copy link
Collaborator

@bazarnov bazarnov left a comment

Choose a reason for hiding this comment

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

LGTM

@maxi297 maxi297 changed the title Strosek/test conn err retry ✨ Source Shopify: add resiliency on some transient errors using the HttpClient Jun 5, 2024
@maxi297 maxi297 merged commit 64d39cb into master Jun 6, 2024
33 checks passed
@maxi297 maxi297 deleted the strosek/test-conn-err-retry branch June 6, 2024 12:39
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/shopify
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants