Highlights
Introducing Worker Mode
This release ships Worker Mode, a new runtime mode for Medusa instances.
Worker Mode allows you to start a Medusa instance in a process separate from the main application process. An instance running in Worker Mode is useful for executing long-running or resource-heavy tasks in the background. Those tasks are offloaded to a separate process and will not affect the performance of the main application. Examples of tasks are importing data or updating a search index. While Worker Mode is especially good for resource-intensive tasks, we recommend always starting an instance in this mode if possible.
Worker Mode introduces three new runtime modes for your Medusa instance:
server
: API Routes are registered, and no workers are started.worker
: API Routes are not registered, and workers are started.shared
: API routes are registered, and workers are started (the regular runtime mode + default).
The worker mode is configured in medusa-config.js
:
// medusa-config.js
const projectConfig = {
...,
database_url: "...",
worker_mode: "worker",
};
In this release, the Redis Event Bus has been updated to leverage the worker architecture. Instantiating a Medusa instance with worker_mode: "server"
and a different one with worker_mode: "worker"
will separate background job processing from the public-facing main application, given that the Redis Event Bus module is installed.
Features
- feat: Update the signatures for variants and options to follow convention by @sradevski in #6748
- feat(fulfillment): Events management by @adrien2p in #6730
- feat: Init. v2 implementation in admin by @olivermrbl in #6715
- feat(medusa, core-flows): add Update inventory item endpoint in api-v2 by @pKorsholm in #6735
- feat(utils): autogenerates create and update methods when dto is provided by @riqwan in #6751
- feat: Align the product module HTTP API to follow our conventions by @sradevski in #6759
- feat(pricing): pricing models are made soft deletable by @riqwan in #6732
- Feat(workflows-sdk): additional properties to context by @carlos-r-l-rodrigues in #6760
- feat: shard modules and API integration tests by @riqwan in #6775
- feat: v2 - add worker mode by @srindom in #6739
- Feat(user): Invite expiration fix by @pKorsholm in #6758
- feat: List products middleware by @olivermrbl in #6769
- feat(core-flows): Use remote link methods to dismiss all links related to inventory item by @pKorsholm in #6737
- Feat(orchestration,workflows-sdk,core-flows): workflow cancel by @carlos-r-l-rodrigues in #6778
- feat(dashboard) admin 3.0 return creation by @fPolic in #6713
- feat(core-flows, types, medusa): Add Update location level endpoint for api-v2 by @pKorsholm in #6743
- feat: Add
successRedirectUrl
to auth options by @olivermrbl in #6792 - update prefix for inventory-next reservation item by @pKorsholm in #6816
- feat(dashboard): Price List configurations section by @kasperkristensen in #6663
- feat(dashboard, ui): Product image modals by @kasperkristensen in #6779
- feat(core-flows, medusa): add create stock location endpoint for api-v2 by @pKorsholm in #6787
- feat(create-medusa-app): Added --v2 option by @shahednasser in #6729
- feat(core-flows,medusa,types,utils): rename psma to prices by @riqwan in #6796
- feat(medusa-payment-paypal,medusa-payment-stripe): speed up unit tests in CI by @riqwan in #6806
- feat(dashboard): Order timeline by @kasperkristensen in #6815
- feat(types, medusa, core-flows): add delete-stock-location endpoint to api-v2 by @pKorsholm in #6801
- feat(medusa, core-flows): add retrieve stock location endpoint to api-v2 by @pKorsholm in #6791
- feat(dashboard): Draft orders create by @kasperkristensen in #6680
- feat(medusa): migrate medusa unit tests / plugins integration tests to swc jest by @riqwan in #6820
- feat: Create user account by @olivermrbl in #6819
- chore(dashboard): render main layout as home page for v2 by @riqwan in #6823
Bugs
- fix(orchestration): Properly handle select all by @adrien2p in #6742
- fix(link-modules): recreate dismissed link by @carlos-r-l-rodrigues in #6764
- fix: revert no server start by @srindom in #6790
- fix: make module test runner configurable by @srindom in #6803
- fix(medusa-oas-cli): fix tool not working in Medusa backends by @shahednasser in #6812
- Fix/pricing create price lists by @adrien2p in #6818
- fix(medusa): migrate with feature flag by @srindom in #6771
Chores
- chore: Deprecate extra in favor of driver options by @adrien2p in #6772
- chore: merge money amounts and price set money amounts by @riqwan in #6768
- chore: pricing models uses standardized relationships attributes by @riqwan in #6767
- chore: update naming in abstract service to dto specifics by @riqwan in #6763
- chore: add TSDocs to the API Key Module by @shahednasser in #6785
- chore(docs): Updated UI Reference by @github-actions in #6754
Documentation
New Contributors
Full Changelog: v1.20.3...v1.20.4