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(devkit): combineAsyncIterable should not be blocking when error occurs #21393 #23400

Merged
merged 1 commit into from
May 21, 2024

Conversation

Coly010
Copy link
Contributor

@Coly010 Coly010 commented May 15, 2024

Current Behavior

combineAsyncIterators has a finally block which is blocking execution waiting for all iterators to be done so it can call the return function as cleanup.
This leads to prolonged execution when unnecessary, such as when an error has occurred.

Expected Behavior

finally block should be non-blocking allowing errors to be immediately surfaced and execution to stop.

Related Issue(s)

Fixes #21393

@Coly010 Coly010 requested review from a team as code owners May 15, 2024 11:30
@Coly010 Coly010 self-assigned this May 15, 2024
@Coly010 Coly010 requested a review from jaysoo May 15, 2024 11:30
Copy link

vercel bot commented May 15, 2024

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

1 Ignored Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview May 16, 2024 2:03pm

@Coly010 Coly010 force-pushed the module-federation/fix-dev-remotes branch 2 times, most recently from 8d21565 to fa383b2 Compare May 16, 2024 12:06
@Coly010 Coly010 requested a review from a team as a code owner May 16, 2024 12:06
@Coly010 Coly010 requested a review from FrozenPandaz May 16, 2024 12:06
@Coly010 Coly010 changed the title fix(module-federation): devRemotes error should error serve immediately #21393 fix(devkit): combineAsyncIterable should not be blocking when error occurs #21393 May 16, 2024
@Coly010 Coly010 force-pushed the module-federation/fix-dev-remotes branch from fa383b2 to 7c7e109 Compare May 16, 2024 14:01
@Coly010 Coly010 requested a review from jaysoo May 16, 2024 14:52
@Coly010 Coly010 enabled auto-merge (squash) May 16, 2024 15:06
@jaysoo jaysoo disabled auto-merge May 21, 2024 14:36
@jaysoo jaysoo merged commit 4442945 into master May 21, 2024
6 checks passed
@jaysoo jaysoo deleted the module-federation/fix-dev-remotes branch May 21, 2024 14:36
FrozenPandaz pushed a commit that referenced this pull request May 21, 2024
…ccurs #21393 (#23400)

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

## Current Behavior
<!-- This is the behavior we have today -->
`combineAsyncIterators` has a `finally` block which is blocking
execution waiting for all iterators to be `done` so it can call the
`return` function as cleanup.
This leads to prolonged execution when unnecessary, such as when an
error has occurred.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
`finally` block should be non-blocking allowing errors to be immediately
surfaced and execution to stop.

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #21393

(cherry picked from commit 4442945)
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Module Federation Dev server does not error out if a dev remote fails to start.
4 participants