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(module-federation): use nx run-many to build static remotes in parallel #19987

Merged

Conversation

Coly010
Copy link
Contributor

@Coly010 Coly010 commented Nov 1, 2023

  • feat(angular): use nx run-many to build remotes in parallel
  • feat(react): use nx run-many to build remotes in parallel

Current Behavior

We currently spin up a new forked process for every build of a static remote. This impacts resources and memory consumption when there are a lot of remotes in the workspace.

Expected Behavior

We should use nx run-many instead to manage parallel builds of static remotes allowing for users to find the perfect number of parallel processes that they can use to build static remotes locally.

Related Issue(s)

Fixes #

@Coly010 Coly010 requested review from a team as code owners November 1, 2023 23:15
@Coly010 Coly010 requested a review from xiongemi November 1, 2023 23:15
@Coly010 Coly010 self-assigned this Nov 1, 2023
Copy link

vercel bot commented Nov 1, 2023

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

Name Status Preview Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview Nov 3, 2023 11:31am

@Coly010 Coly010 force-pushed the feat/module-federation-parallel-static-builds branch from fcf14cb to 8b2758e Compare November 3, 2023 11:24
ndcunningham

This comment was marked as duplicate.

Copy link
Contributor

@ndcunningham ndcunningham left a comment

Choose a reason for hiding this comment

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

Looks fine just not sure what ANSII_CODE_REGEX means.

@Coly010
Copy link
Contributor Author

Coly010 commented Nov 6, 2023

It's a regex to find the codes that output certain strings in the terminal in different colors or as bold text.

They aren't being stripped without that regex and therefore matching strings fails because

Successfully ran target build is actually [32mSuccessfully ran target \u001b[1mbuild it just gets rendered correctly in the terminal but the raw output contains them, so doing any kind of equality or lookup fails.

There's a similar util used in our e2e suites

@ndcunningham ndcunningham reopened this Nov 6, 2023
@Coly010 Coly010 merged commit 1338a7c into nrwl:master Nov 6, 2023
3 checks passed
@Coly010 Coly010 deleted the feat/module-federation-parallel-static-builds branch November 6, 2023 16:25
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 Nov 12, 2023
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.

3 participants