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(default-search-plugin, elasticsearch-plugin) Adding StockMovement… #3113

Open
wants to merge 3 commits into
base: minor
Choose a base branch
from

Conversation

LeftoversTodayAppAdmin
Copy link

Adding StockMovementEvent to search

Description

Using ElasticSearch or the defaultsearch plugin as the search backend and when I use Stripe Plugin to successfully complete a purchase, the search index for that product variant is not updated. As a result, the search results still have the inStock value set to true and shows an out of stock item in the search results. The products API shows the correct stock level immediately after the transaction and when the stock is allocated.

#3066

Breaking changes

Does this PR include any breaking changes we should be aware of?
No, it does not have any breaking changes.

Screenshots

You can add screenshots here if applicable.
image
image

Checklist

📌 Always:
[✅] I have set a clear title
[✅] My PR is small and contains a single feature
[✅] I have checked my own PR

👍 Most of the time:

  • I have added or updated test cases
  • I have updated the README if needed

Copy link

vercel bot commented Oct 6, 2024

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

Name Status Preview Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview Oct 6, 2024 11:38pm

@LeftoversTodayAppAdmin
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

@LeftoversTodayAppAdmin
Copy link
Author

LeftoversTodayAppAdmin commented Oct 8, 2024

Summary of the issues during E2E testing:

  • There are 20 products in the node_modules/@vendure/elasticsearch-plugin/e2e/data/elasticsearch-plugin-uuid.e2e-spec.ts.sqlite file but only 15 of the products get loaded into ElasticSearch causing all the test cases to break. Similar issue with the node_modules/@vendure/elasticsearch-plugin/e2e/data/elasticsearch-plugin.e2e-spec.ts.sqlite file as well.
  • Unsure why all the available data is not getting loaded.
  • I even tried using ES ver 7.7 to ensure its well below the 7.10 upper limit version and it does not solve the issue.
  • As a workaround I have directly edited the plugin package using patch-package and I have tested it. It is fully working, see attached video.
Screen.Recording.2024-10-08.at.3.05.23.AM.mov

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.

1 participant