-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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(utils): Introduce promiseAll util #5543
Conversation
🦋 Changeset detectedLatest commit: de32729 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
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 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Ignored Deployments
|
@olivermrbl @carlos-r-l-rodrigues what do you think about it? |
I ve done an example with the order service, let see the tests |
If we agree on the approach, then we can start fixing all the places |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
should we update all places if everybody aggree? |
ps: I haven't changes everywhere if I thought it wasnt making too much sense |
@olivermrbl I had to add the utils package as a dep in some plugins. Don't think it should be a problem for those. Though, I ve used the |
Perhaps, we should add a note on this in our troubleshooting section. Although, not directly related to Medusa, it would be good to be able to point somewhere in case developers experience similar issues working with our services. |
Sure @olivermrbl , is there a bit more context to the exact problem or error that occurs (which makes it easier for people to find) and the proposed solution? |
Aside from the original issue, this Typeorm issue and this SO submission do a good job of explaining the issue succinctly. I don't think we need to go into depth about how |
Sure, but a troubleshooting guide should provide some direction for a solution, could be just an alternative of using |
My bad, I should have mentioned this previously. We should recommend the util function introduced in this PR |
…nto feat/utils-promise-all
What
Promise.all with typeorm transaction does not play well in case of nesetd promises. A rejection does not necessarely rollback all queries since the nested promises will run on an orphan transaction resulting in them being commited. This utils aim to replace all promise.all usage