-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Conversation
…migrate-product-images-variants-to-bulk
…migrate-product-images-variants-to-bulk
…migrate-product-images-variants-to-bulk
…migrate-product-images-variants-to-bulk
…migrate-product-images-variants-to-bulk
…migrate-product-images-variants-to-bulk
… for the product_images
…migrate-product-images-variants-to-bulk
…migrate-product-images-variants-to-bulk
…migrate-product-images-variants-to-bulk
…migrate-product-images-variants-to-bulk
…migrate-product-images-variants-to-bulk
…ct-images-variants-to-bulk' into strosek/test-conn-err-retry
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
airbyte-integrations/connectors/source-shopify/unit_tests/integration/api/authentication.py
Outdated
Show resolved
Hide resolved
airbyte-integrations/connectors/source-shopify/unit_tests/integration/api/authentication.py
Outdated
Show resolved
Hide resolved
airbyte-integrations/connectors/source-shopify/unit_tests/integration/api/bulk.py
Outdated
Show resolved
Hide resolved
}""" | ||
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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
airbyte-integrations/connectors/source-shopify/unit_tests/integration/api/bulk.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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
Can this PR be safely reverted and rolled back?