Skip to content

[rush] Support percentage-based weights for operationSettings in rush-project.json#5679

Open
LPegasus wants to merge 1 commit intomicrosoft:mainfrom
LPegasus:rush-pr-issue-5607
Open

[rush] Support percentage-based weights for operationSettings in rush-project.json#5679
LPegasus wants to merge 1 commit intomicrosoft:mainfrom
LPegasus:rush-pr-issue-5607

Conversation

@LPegasus
Copy link
Contributor

@LPegasus LPegasus commented Mar 3, 2026

Summary

Add issue #5607 proposal 1 feature.

Details

  • WeightedOperationPlugin: Added a function to convert weight settings in RushProjectConfiguration.operationSettings percentage string to integer based on os.availableParallelism().
  • WeightedOperationPlugin.test.ts: Added some tests.
  • RushProjectConfiguration.ts: Updated IOperationSettings.weight type definition.
  • rush-project.schema.json: Updated weight field json schema.
  • If the calculated result of the specified percentage has decimals, use Math.floor to round down to an integer. Maximize CPU utilization as much as possible.

How it was tested

  • Add unit test cases.
  • Tested in my test rush repo.

Impacted documentation

None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs triage

Development

Successfully merging this pull request may close these issues.

1 participant