[rush] Improve task scheduler to handle tasks that consume 100% CPU
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 30/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- node.js, typescript
- 領域
- build-system, devtools
調査の方向性
Start by tracing Rush's existing --parallelism and rush-project.json weight handling; the issue names no implementation file or test. Compare the two proposals: percentage weights should resolve against the parallelism limit, while a common/config rule should match package.json scripts and allow rush-project.json overrides.
索引モデルが issue の本文から書いたものです。
説明
Summary
@LPegasus and I recently discussed a problem where certain Rush phase scripts are heavily multithreaded, designed to consume 100% CPU. Examples:
- ESBuild
- Rspack
- Jest
When Rush attempts to run several of these tasks in parallel, it overloads the machine. For ESBuild it was causing Golang deadlocks, perhaps due to an ESBuild bug that causes thread starvation. (?)
Details
This can be avoided by specifying weight=N in rush-project.json, where N is equal to the --parallelism limit. But if CI uses a value like --parallelism=100%, then N is machine dependent.
We can break this problem into two complementary design proposals:
Proposal 1: Allow % units for weight
The rush-project.json file should allow percentage values like "weight": "100%" similar to --parallelism=100%. For example if --parallelism=100% corresponds to a maximum of 8 parallel jobs, then "weight": "75%" would indicate a weight of 6.
Proposal 2: Allow weight to be specified using pattern matching
In order to use the "weight": "100%" feature, we would need to audit every operation script for every project in our monorepo, identify which ones are invoking ESBuild, and then add a corresponding rush-project.json or rig profile to adjust the weight.
However in practice, that work could be captured by a general rule like this:
Examine the package.json shell script: Does it match the RegExp
/\besbuild\b/? If yes, then use "100%" as the defaultweight, unless it is overridden by rush-project.json.
Such a rule could be configured centrally in a common/config file.
@dmichon-msft
- 主要言語
- TypeScript
- スター
- 6.5k
- フォーク
- 708
- 平均マージ
- 4日 13時間
- マージ済み PR(30日)
- 62
環境構築
このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/rushstack のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
microsoft/rushstack#5971 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
microsoft/rushstack#5902 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
microsoft/rushstack#5839 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
microsoft/rushstack#5683 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
microsoft/rushstack の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
opengovsg/FormSG#10118 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
ai-driven-qa bug claude
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
linagora/twake-calendar-frontend#1434 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
check:passed streams:add
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
iptv-org/iptv#52824 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 半日 初心者へのやさしさ 78/100
jaegertracing/jaeger-ui#4512 ·
メンテナーはふだん 1 日以内に返信
-
area:ide documentation enhancement platform:macos platform:vscode
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
anthropics/claude-code#97389 ·
メンテナーはふだん 1 日以内に返信