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(medusa, modules-sdk, modules): Module loading missing dependencies + remote query reference issue #5468

Merged
merged 8 commits into from
Oct 26, 2023

Conversation

adrien2p
Copy link
Member

@adrien2p adrien2p commented Oct 25, 2023

What
At the moment, the modules are expecting some dependencies such as the event bus module, but they fail silently since it is not a required deps. On the other hand, if the deps is required then it create some issues since the dep is missing. Also, the remote query was mutating the reference of an array object and leading to unexpected side effects.

This pr aims to resolve the dependency issues for the modules as well as the remote query reference mutation issue.

I ve moved this to a separate pr to not hold on it in the search module pr

…ected dependencies and remote query reference fix
@changeset-bot
Copy link

changeset-bot bot commented Oct 25, 2023

🦋 Changeset detected

Latest commit: 3605a18

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 11 packages
Name Type
@medusajs/medusa Patch
@medusajs/cache-inmemory Patch
@medusajs/cache-redis Patch
@medusajs/event-bus-local Patch
@medusajs/event-bus-redis Patch
@medusajs/inventory Patch
@medusajs/link-modules Patch
@medusajs/modules-sdk Patch
@medusajs/pricing Patch
@medusajs/product Patch
@medusajs/stock-location Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Oct 25, 2023

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

3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Visit Preview Oct 26, 2023 1:13pm
docs-ui ⬜️ Ignored (Inspect) Visit Preview Oct 26, 2023 1:13pm
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Oct 26, 2023 1:13pm

@adrien2p adrien2p marked this pull request as ready for review October 25, 2023 08:06
@adrien2p adrien2p requested a review from a team as a code owner October 25, 2023 08:06
@adrien2p adrien2p changed the title fix(medusa, modules-sdk, modules): Module loading was missing the expected dependencies and remote query reference fix fix(medusa, modules-sdk, modules): Module loading missing dependencies + remote query reference issue Oct 25, 2023
@adrien2p
Copy link
Member Author

/snapshot-this

@adrien2p
Copy link
Member Author

Before merging I d like to run some tests with the snapshot

@github-actions
Copy link
Contributor

🚀 A snapshot release has been made for this PR

Test the snapshots by updating your package.json with the newly published versions:

yarn add @medusajs/admin-ui@2.1.6-snapshot-20231025100647
yarn add @medusajs/cache-inmemory@1.8.9-snapshot-20231025100647
yarn add @medusajs/cache-redis@1.8.9-snapshot-20231025100647
yarn add @medusajs/event-bus-local@1.9.7-snapshot-20231025100647
yarn add @medusajs/event-bus-redis@1.8.10-snapshot-20231025100647
yarn add @medusajs/inventory@1.11.2-snapshot-20231025100647
yarn add @medusajs/link-modules@0.2.2-snapshot-20231025100647
yarn add @medusajs/medusa@1.17.3-snapshot-20231025100647
yarn add @medusajs/modules-sdk@1.12.2-snapshot-20231025100647
yarn add @medusajs/orchestration@0.4.3-snapshot-20231025100647
yarn add @medusajs/pricing@0.1.2-snapshot-20231025100647
yarn add @medusajs/product@0.3.2-snapshot-20231025100647
yarn add @medusajs/stock-location@1.11.1-snapshot-20231025100647

Latest commit: 8bb8eb5

Copy link
Contributor

@carlos-r-l-rodrigues carlos-r-l-rodrigues left a comment

Choose a reason for hiding this comment

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

LGTM

@adrien2p
Copy link
Member Author

@olivermrbl can we merge this?

@olivermrbl
Copy link
Contributor

olivermrbl commented Oct 26, 2023

Fine by me, but I don't know if this leads to conflicts with other Pricing Module related PRs. Have you coordinated with the guys?

Copy link
Contributor

@riqwan riqwan left a comment

Choose a reason for hiding this comment

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

Had one question, but lgtm

packages/modules-sdk/src/medusa-module.ts Outdated Show resolved Hide resolved
@adrien2p adrien2p force-pushed the fix/medusa-app-lading-deps-issues branch from b096249 to fe4e250 Compare October 26, 2023 13:01
@adrien2p adrien2p requested a review from riqwan October 26, 2023 15:27
@olivermrbl
Copy link
Contributor

LGTM, should we merge?

@olivermrbl olivermrbl merged commit a45da92 into develop Oct 26, 2023
12 checks passed
@olivermrbl olivermrbl deleted the fix/medusa-app-lading-deps-issues branch October 26, 2023 18:24
This was referenced Oct 26, 2023
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.

4 participants