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

Fix | Source products using intelligent search (IS) #738

Merged
merged 2 commits into from
Jun 15, 2021

Conversation

tlgimenes
Copy link
Contributor

@tlgimenes tlgimenes commented May 26, 2021

What's the purpose of this pull request?

This PR:

  1. Fixes products sourcing
  2. Add retries to graphql queries so we don't break the whole build if something goes wrong on our infra.

How it works?

  1. We were using Solr API for sourcing our products. Basically we make a search and fetch at about 2500 products. To speedup the fetching, we paginate the search and fetch the pages in parallel. Somehow, this API is not reliable for doing such pagination because it would return duplicated products among pages. This caused an unreliable build where consecutive builds would generate a different amount of pages. We fix this problem by using Inteligent Search (IS) instead of Solr.
  2. We add retries to graphql's executor when a non empty errors array is returned or when an http level error occurs.

How to test it?

https://github.com/vtex-sites/marinbrasil.store/pull/510
https://github.com/vtex-sites/btglobal.store/pull/569
https://github.com/vtex-sites/carrefourbrfood.store/pull/712
https://github.com/vtex-sites/storecomponents.store/pull/936

@codesandbox-ci
Copy link

codesandbox-ci bot commented May 26, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 6ede1ca:

Sandbox Source
Store UI Typescript Configuration

@tlgimenes tlgimenes force-pushed the fix/products-sourcing branch from aaf0467 to 1c4bacb Compare June 14, 2021 21:17
@netlify
Copy link

netlify bot commented Jun 14, 2021

✔️ Deploy Preview for storeui ready!

🔨 Explore the source changes: 6ede1ca

🔍 Inspect the deploy log: https://app.netlify.com/sites/storeui/deploys/60c7e39e0e7aac00073870c4

😎 Browse the preview: https://deploy-preview-738--storeui.netlify.app

@tlgimenes tlgimenes force-pushed the fix/products-sourcing branch from 1c4bacb to 85962e7 Compare June 14, 2021 22:27
This was linked to issues Jun 15, 2021
@tlgimenes tlgimenes marked this pull request as ready for review June 15, 2021 12:16
@tlgimenes tlgimenes requested a review from a team as a code owner June 15, 2021 12:16
Copy link
Contributor

@cezar-guimaraes cezar-guimaraes left a comment

Choose a reason for hiding this comment

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

LGTM

@tlgimenes tlgimenes merged commit 9066e55 into master Jun 15, 2021
@tlgimenes tlgimenes deleted the fix/products-sourcing branch June 15, 2021 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Retry on source VTEX Unreliable source VTEX
2 participants