Commit Graph

38 Commits

Author SHA1 Message Date
Carlos R. L. Rodrigues
6fa98b6a4d chore(orchestration): modules method context (#9669)
** What **
* Test to check if the MedusaContext is being injected when calling a Module's method
2024-10-18 21:08:06 +00:00
Carlos R. L. Rodrigues
d3c1580c06 fix(orchestration): local workflow proxy (#9664) 2024-10-18 13:30:16 +00:00
Adrien de Peretti
34d57870ad chore: workflow internals improvementss (#9455) 2024-10-10 09:11:56 +02:00
Carlos R. L. Rodrigues
f9e8403d29 fix(orchestrator, workflows-sdk): skip async step (#9482) 2024-10-07 07:35:30 -03:00
Oli Juhl
f7472a6fa6 fix: Idempotent cart completion (#9231)
What
- Store result of cart-completion workflow for three days by default
  - This enables the built-in idempotency mechanism to kick-in, provided the same transaction ID is used on workflow executions
- Return order from cart-completion workflow if the cart has already been completed
  - In case transaction ID is not used on workflow executions, we still only want to complete a cart once
2024-10-04 12:01:09 +00:00
Carlos R. L. Rodrigues
8155c4e9ee fix(workflows-sdk): when then return value (#9427) 2024-10-02 07:40:39 -03:00
Adrien de Peretti
02629625ec feat(orchestration): Provide hint in workflows error (#9400)
* feat(orchestration): Provide hint in workflows error

* remove log

* fix tests

* improve stack

* fix type

* formatting

---------

Co-authored-by: Riqwan Thamir <rmthamir@gmail.com>
2024-10-02 11:54:07 +02:00
Adrien de Peretti
358435d715 chore: Move graphl to a single place (#9303)
* chore: Move graphl to a single place

* add new line
2024-09-25 12:04:25 +02:00
Adrien de Peretti
802f204d31 fix(orchestration): Throw if not exists using filters (#9275) 2024-09-24 17:12:04 +02:00
Adrien de Peretti
79e3578932 refactor(orchestration): Align configuration and fixes (#9242)
RESOLVES FRMW-2712

**What**
Refactor orchestration packages to use the latest configuration of typescript and fixes issues
2024-09-23 10:36:05 +00:00
Carlos R. L. Rodrigues
1215a7c094 chore(orchestrator): remote joiner using entitymap (#9205) 2024-09-20 05:30:08 -03:00
Harminder Virk
653a4bff71 feat: add tracing to workflow steps (#9140) 2024-09-17 11:35:38 +05:30
Carlos R. L. Rodrigues
ef8dc4087e feat: run nested async workflows (#9119) 2024-09-16 13:06:45 +00:00
Carlos R. L. Rodrigues
8829f89402 chore: query graph api (#9125)
CLOSES: FRMW-2704

**What**
Re-structure the Query graph API as well as introduce dynamic typing from schemas on the filters and better handling of relation treatment for fields/filters inference

Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
2024-09-16 11:32:44 +00:00
Carlos R. L. Rodrigues
950cf9af79 chore: remove container registration name (#9137) 2024-09-16 06:22:24 -03:00
Carlos R. L. Rodrigues
fdd0543011 chore: joiner config entity property (#9084) 2024-09-11 06:25:25 -03:00
Carlos R. L. Rodrigues
afb83b2408 fix(orchestration): filter out undefined items (#9046) 2024-09-08 07:58:48 -03:00
Carlos R. L. Rodrigues
6cfe9bd874 fix(orchestration): remote joiner alias conflict (#8844) 2024-08-28 11:34:22 -03:00
Adrien de Peretti
b09c19912b fix(orchestration, workflow-sdk): Local workflow separated orchestrator (#8765)
FIXES TRI-174

**What**
Currently, every time a Local workflow is being instantiated, it will grab the global workflow definition including the orchestrator instance. This leads to issues when we have concurrent running workflows which all register their event listeners to this single orchestrator instance which can lead to exhausting the listerners. 
With this fix, every local workflow will have a copy of the global workflow definition plus a new instance (cloned) of the orchestrator meaning that from now on, every local workflow will have its own orchestrator.
2024-08-27 08:59:56 +00:00
Carlos R. L. Rodrigues
058378970a chore: dependecies reorg (#8535) 2024-08-23 07:16:04 -03:00
Stevche Radevski
4155d0354f fix: Use a global reference to distributed transaction and scheduler (#8462)
* fix: Add storage cleanup on scheduled jobs

* fix: Use a global reference to distributed transaction and scheduler classes
2024-08-06 14:14:51 +02:00
Carlos R. L. Rodrigues
48663479a9 chore(core-flows): cancel claims (#8342)
What:
* `DELETE /admin/claims/:id/request`
* `POST /admin/claims/:id/cancel`
2024-07-30 08:59:02 +00:00
Carlos R. L. Rodrigues
24c105f288 feat(orchestration,workflows-sdk): Skip step (#8334) 2024-07-29 14:26:47 -03:00
Carlos R. L. Rodrigues
1acfdc4ffe chore(core-flows, medusa): cancel request return (#8153)
* fix(core-flow): request item return reason

* chore(core-flows): cancel request return
2024-07-17 09:35:46 +01:00
Riqwan Thamir
04819107dd feat(core-flows,types): add workflow to request item return (#8098) 2024-07-11 19:45:40 +02:00
Carlos R. L. Rodrigues
5600e58b7f chore(orchestration): idempotent (#7771) 2024-06-25 10:34:00 -03:00
Riqwan Thamir
03924a4ff6 chore: move to swc/jest (#7739)
* chore: move to swc

* chore: fix tax rate tests

* chore: undo failed test

* chore: fix unit tests script

* chore: use node 20

* Update scripts/run-workspace-unit-tests-in-chunks.sh
2024-06-20 12:59:33 +02:00
Carlos R. L. Rodrigues
d6c6f5998c chore(orchestration): remote joiner - relationships as map (#7752) 2024-06-17 16:11:42 -03:00
Adrien de Peretti
dd0b9f0805 feat: workflows release events (#7664)
* feat: Release grouped events once a worfklow finish

* update common step

* update types

* tests

* optionality

* fies

* cancel flow on release failure

* clear events on fail

* more tests

* log errors

* log more errors

* update missing interface method declaration

* fix missing return

* update mock

* fix tests
2024-06-11 15:48:15 +02:00
Adrien de Peretti
afae395fea chore: ensure the event group id is kept for async workflow (#7668)
* chore: ensure the event group id is kept for async workflow

* revert test

* fix tests

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Riqwan Thamir <rmthamir@gmail.com>
2024-06-11 13:20:17 +02:00
Stevche Radevski
3d72002c28 fix: Remove scheduled workflows if they no longer exist when executed (#7673) 2024-06-11 12:57:25 +02:00
Stevche Radevski
69410162f6 feat: Add support for scheduled workflows (#7651)
We still need to:
But wanted to open the PR for early feedback on the approach
2024-06-10 14:49:52 +00:00
Carlos R. L. Rodrigues
41df24e2dc chore(workflows-sdk): check exported workflow (#7592) 2024-06-04 07:18:40 -03:00
Carlos R. L. Rodrigues
122186a78d chore(order): cancel order (#7586) 2024-06-03 12:31:33 -03:00
Carlos R. L. Rodrigues
f3d19f5394 fix(workflows-sdk): use loaded modules when container is empty (#7422) 2024-05-23 08:26:16 -03:00
Carlos R. L. Rodrigues
70fd355e46 chore(order): link order and payment collection (#7334) 2024-05-14 20:37:27 +00:00
Oli Juhl
1366e2efad fix: Retrieve ancestors and/or descendants on product categories (#7226) 2024-05-03 18:09:04 +02:00
Adrien de Peretti
bbccd6481d chore(): start moving some packages to the core directory (#7215) 2024-05-03 13:37:41 +02:00