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

feat(medusa): Improve add line item to cart perf and transaction management + clustering start command #5701

Merged
merged 43 commits into from
Dec 6, 2023

Conversation

adrien2p
Copy link
Member

@adrien2p adrien2p commented Nov 23, 2023

What

  • Improve the transaction management form add to cart end point
  • add a new cluster command to start the server. By default, it will consume all available cpus to start the medusa instances. An option is available to specify the number of CPU to use

Copy link

changeset-bot bot commented Nov 23, 2023

🦋 Changeset detected

Latest commit: 304c3ad

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

This PR includes changesets to release 3 packages
Name Type
@medusajs/medusa Patch
@medusajs/medusa-cli Patch
@medusajs/admin-ui 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

Copy link

vercel bot commented Nov 23, 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 Dec 4, 2023 9:22am
docs-ui ⬜️ Ignored (Inspect) Visit Preview Dec 4, 2023 9:22am
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Dec 4, 2023 9:22am

@adrien2p
Copy link
Member Author

/snapshot-this

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/link-modules@0.2.4-snapshot-20231123103111
yarn add @medusajs/medusa@1.18.1-snapshot-20231123103111
yarn add @medusajs/modules-sdk@1.12.4-snapshot-20231123103111
yarn add @medusajs/orchestration@0.5.0-snapshot-20231123103111
yarn add @medusajs/pricing@0.1.5-snapshot-20231123103111
yarn add @medusajs/product@0.3.5-snapshot-20231123103111
yarn add @medusajs/types@1.11.8-snapshot-20231123103111
yarn add @medusajs/utils@1.11.1-snapshot-20231123103111
yarn add @medusajs/workflows@0.4.0-snapshot-20231123103111

Latest commit: 4fbe02b

@adrien2p
Copy link
Member Author

/snapshot-this

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/link-modules@0.2.4-snapshot-20231123114524
yarn add @medusajs/medusa@1.18.1-snapshot-20231123114524
yarn add @medusajs/modules-sdk@1.12.4-snapshot-20231123114524
yarn add @medusajs/orchestration@0.5.0-snapshot-20231123114524
yarn add @medusajs/pricing@0.1.5-snapshot-20231123114524
yarn add @medusajs/product@0.3.5-snapshot-20231123114524
yarn add @medusajs/types@1.11.8-snapshot-20231123114524
yarn add @medusajs/utils@1.11.1-snapshot-20231123114524
yarn add @medusajs/workflows@0.4.0-snapshot-20231123114524

Latest commit: 180b595

@adrien2p
Copy link
Member Author

/snapshot-this

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/ui@2.2.3-snapshot-20231123124203
yarn add @medusajs/link-modules@0.2.4-snapshot-20231123124203
yarn add @medusajs/medusa@1.18.1-snapshot-20231123124203
yarn add @medusajs/modules-sdk@1.12.4-snapshot-20231123124203
yarn add @medusajs/orchestration@0.5.0-snapshot-20231123124203
yarn add @medusajs/pricing@0.1.5-snapshot-20231123124203
yarn add @medusajs/product@0.3.5-snapshot-20231123124203
yarn add @medusajs/types@1.11.8-snapshot-20231123124203
yarn add @medusajs/utils@1.11.1-snapshot-20231123124203
yarn add @medusajs/workflows@0.4.0-snapshot-20231123124203

Latest commit: b25b29f

@adrien2p
Copy link
Member Author

/snapshot-this

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/ui@2.2.3-snapshot-20231123131030
yarn add @medusajs/link-modules@0.2.4-snapshot-20231123131030
yarn add @medusajs/medusa@1.18.1-snapshot-20231123131030
yarn add @medusajs/medusa-cli@1.3.22-snapshot-20231123131030
yarn add @medusajs/modules-sdk@1.12.4-snapshot-20231123131030
yarn add @medusajs/orchestration@0.5.0-snapshot-20231123131030
yarn add @medusajs/pricing@0.1.5-snapshot-20231123131030
yarn add @medusajs/product@0.3.5-snapshot-20231123131030
yarn add @medusajs/types@1.11.8-snapshot-20231123131030
yarn add @medusajs/utils@1.11.1-snapshot-20231123131030
yarn add @medusajs/workflows@0.4.0-snapshot-20231123131030

Latest commit: b25b29f

@adrien2p
Copy link
Member Author

/snapshot-this

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.9-snapshot-20231123162346
yarn add @medusajs/ui@2.2.3-snapshot-20231123162346
yarn add @medusajs/link-modules@0.2.4-snapshot-20231123162346
yarn add @medusajs/medusa@1.18.1-snapshot-20231123162346
yarn add @medusajs/medusa-cli@1.3.22-snapshot-20231123162346
yarn add @medusajs/modules-sdk@1.12.4-snapshot-20231123162346
yarn add @medusajs/orchestration@0.5.0-snapshot-20231123162346
yarn add @medusajs/pricing@0.1.5-snapshot-20231123162346
yarn add @medusajs/product@0.3.5-snapshot-20231123162346
yarn add @medusajs/types@1.11.8-snapshot-20231123162346
yarn add @medusajs/utils@1.11.1-snapshot-20231123162346
yarn add @medusajs/workflows@0.4.0-snapshot-20231123162346

Latest commit: 1e39a95

…medusajs/medusa into feat/improve-create-line-item-end-point
Copy link
Contributor

@pKorsholm pKorsholm left a comment

Choose a reason for hiding this comment

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

LGTM! just a minor nit 😄

packages/medusa/src/strategies/cart-completion.ts Outdated Show resolved Hide resolved
@adrien2p
Copy link
Member Author

Before merging I am just looking at another point

@olivermrbl
Copy link
Contributor

olivermrbl commented Nov 27, 2023

@adrien2p do you think we should include this in the Recap release?

I think we should exclude this from the upcoming release, which has already been through testing. So please do not merge before 1.18.1 is out :)

@adrien2p
Copy link
Member Author

@adrien2p do you think we should include this in the Recap release?

I think we could, especially the cluster start command wdyt?

I am also looking at some points in the create cart workflow cause there is currently multiple duplication which could be prevented. But I am just doing some tests and it would eventually be a different pr

@adrien2p
Copy link
Member Author

@olivermrbl should we also stress the user that using the cluster in product is best practice? see

@adrien2p adrien2p force-pushed the feat/improve-create-line-item-end-point branch 2 times, most recently from 53da101 to 21f3987 Compare November 27, 2023 10:49
Copy link
Contributor

@olivermrbl olivermrbl left a comment

Choose a reason for hiding this comment

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

LGTM, with comments. Great work :)

@@ -233,6 +233,42 @@ function buildLocalCommands(cli, isLocalProject) {
})
),
})
.command({
Copy link
Contributor

Choose a reason for hiding this comment

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

comment: needs documentation

@adrien2p adrien2p requested a review from olivermrbl December 4, 2023 09:21
@olivermrbl
Copy link
Contributor

/snapshot-this

Copy link
Contributor

github-actions bot commented Dec 4, 2023

🚀 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@7.1.9-snapshot-20231204150103
yarn add @medusajs/admin-ui@2.1.10-snapshot-20231204150103
yarn add @medusajs/link-modules@0.2.5-snapshot-20231204150103
yarn add @medusajs/medusa@1.19.0-snapshot-20231204150103
yarn add @medusajs/medusa-cli@1.3.22-snapshot-20231204150103
yarn add medusa-payment-klarna@1.4.0-snapshot-20231204150103
yarn add medusa-react@9.0.12-snapshot-20231204150103
yarn add @medusajs/modules-sdk@1.12.5-snapshot-20231204150103
yarn add @medusajs/pricing@0.1.6-snapshot-20231204150103
yarn add @medusajs/product@0.3.6-snapshot-20231204150103
yarn add @medusajs/utils@1.11.2-snapshot-20231204150103

Latest commit: 5d0e9ac

@olivermrbl olivermrbl merged commit 6975eac into develop Dec 6, 2023
15 checks passed
@olivermrbl olivermrbl deleted the feat/improve-create-line-item-end-point branch December 6, 2023 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants