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

Throttle `node-test-commit` jobs on test CI

Abierto
#4,435 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
52/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
git
Área
ci-cd, devops, tooling

Línea de trabajo

Comienza por localizar las definiciones de node-test-pull-request y node-test-commit, y luego lee cómo sus ajustes de executor o de limitación afectan a los jobs de plataforma distribuidos. Verifica el límite elegido teniendo en cuenta el encolado, el uso de disco del workspace, la disponibilidad de los executors y el job post-build-status-update; se considera terminado cuando las pruebas de pull request están acotadas sin bloquear la notificación del estado.

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

Descripción

build-agenda

Executor count on both machines has been dropped back to 25.

I'm tempted to leave the parallelism restrictions on node-test-commit but I'll raise a separate issue to discuss at the next build WG meeting...

Originally posted by @sxa in #4432

I think it makes sense to keep the PR testing throttled. Some background and reasoning:

  • We currently have 75 jenkins-workspace executors across three machines. The node-test-pull-request job spawns one node-test-commit on each run, and most of those will spawn off fanned jobs for windows and arm (*) and all of those use up one executor for each pull request testing job. The post-build-status-update job, when required, also requires a jenkins-workspace executor for a short period to do its work of posting back to the appropriate PR.
  • Throttling node-test-pull-request to 10 would allow at most 50 of those 75 executors to be used for pull request testing, leaving 25 for other jobs that need it a jenkins-workspace node in the CI.
  • I'll also note that while the platform subjobs such as node-test-commit-osx also do some work on the jenkins-workspace nodes they run via a lightweight executor that does not count towards the 25 on each node.
  • Having it as more than 10 is probably counter-productive. While it would allow a higher throughput of some of the faster platforms, the ultimate reporting back of status to the PRs is only done when the jobs is complete, which is gated by the slowest platform. 10 is probably still quite generous given that we don't have more than two machines for any given label.
  • The disk usage on the workspace servers increases if you allow more jobs to execute in parallel. If 10 pull requests are running in parallel the jenkins-workspace node (assuming the worst case that they all end up on the same node) will require ten separate working directories of up to 4GB each (+) - each will go into a directory suffixed by @n.
  • As mentioned earlier the platform specific jobs use a lightweight executor on the jenkins-workspace nodes. They still require space and as an example the OSX job got up to node-test-commit-osx@33 today because so many were in the queue (it had previously reached 35 in September 2024). This demonstrates that without throttling at the top level you can chew up disk space on the workspace servers (each of those takes up 2.5-3GB)
  • I will also note that as a side effect of throttling node-test-commit to 10 for the OSX problem we now have a backlog of over 10 in the queue. This is causing jobs not to be triggered purely due to the delay caused by the backlog of osx jobs. This number will increase over the day. We should consider this when deciding to throttle and perhaps make the metric of queued jobs which are throttled something to actively monitor.
  • Reducing to 10 would likely decrease the probability of hitting the 20 minute timeout occurring on node-test-commit jobs (@)

As part of resolving the problem described in 4432 I throttled node-test-commit, but it makes more sense to throttle at the highest level - node-test-pull-request which implicitly limits those below it. This will resolve the possibility of deadlocks with the executors due to the need to spawn post-build-status-update at the end of the job and also

Side note: Moving to pipelines might help with this as they typically only use lightweight executors too, but that's a separate topic

(*) - I also note that arm32 fanned builds are triggered on node-daily-master even though we don't ship arm32 on that version - it looks like they're still passing though!)u
(+) - here is an example of the space usage from node-test-pull-request - as mentioned the osx one is worse at the moment as it goes up to @35 on the mnx-2 node:

iojs@test-mnx-ubuntu2204-x64-2:~/build/workspace$ du -sk node-test-pull-request* | grep -vw tmp
2333368 node-test-pull-request
2323504 node-test-pull-request@2
2426475 node-test-pull-request@3
2425107 node-test-pull-request@4
3959716 node-test-pull-request@5
3943765 node-test-pull-request@6
1538253 node-test-pull-request@7
1569737 node-test-pull-request@8

(@) - An example happened today in https://ci.nodejs.org/job/node-test-commit/90858/console:

11:45:46  > git fetch --no-tags --force --progress -- git@github.com:nodejs/node.git +refs/heads/*:refs/remotes/origin/* +refs/pull/65426/head:refs/remotes/origin/_jenkins_local_branch # timeout=20
12:05:46 ERROR: Timeout after 20 minutes
12:06:30 ERROR: Error cloning remote repo 'origin'
12:06:30 hudson.plugins.git.GitException: Command "git fetch --no-tags --force --progress -- git@github.com:nodejs/node.git +refs/heads/*:refs/remotes/origin/* +refs/pull/65426/head:refs/remotes/origin/_jenkins_local_branch" returned status code 128:

It had got close before it was killed - 90% through the final Resolving deltas phase:

Resolving deltas:  90% (774742/859022)
fatal: fetch-pack: invalid index-pack output
Lenguaje dominante
Jinja
Estrellas
541
Forks
185
Merge medio
2 d 18 h
PR fusionados (30 d)
6

Guía de contribución

Abrir la guía de contribución

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 nodejs/build

Todos los issues de nodejs/build

Issues similares

Más issues de DevOps

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.