Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[rush] Improve task scheduler to handle tasks that consume 100% CPU

Abierto
#5,607 7 comentarios 2 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
30/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
node.js, typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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 default weight, unless it is overridden by rush-project.json.

Such a rule could be configured centrally in a common/config file.

@dmichon-msft

Lenguaje dominante
TypeScript
Estrellas
6.5k
Forks
708
Merge medio
4 d 13 h
PR fusionados (30 d)
62

Preparar el entorno

Aún no hemos revisado los archivos de configuración de este proyecto. Empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de microsoft/rushstack

Todos los issues de microsoft/rushstack

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.