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

Collection of ideas that could improve CI reliability, performance and cost.

Abierto
#4,529 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Activo
Stack tecnológico
github-actions, node.js
Área
ci-cd, devops

Línea de trabajo

The issue lists seven broad CI improvement ideas and links prior work in nodejs/node#65927 and nodejs/build#3056; start by reading those discussions and the existing CI build and test configurations. Choose one idea for investigation and measure its effects on CI time, reliability, or cost. Done means reporting evidence and a focused follow-up proposal or linked issue; no specific files or acceptance criteria are named here.

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

Descripción

The collaborator summits repeatedly bring up "CI flakiness" as a general topic as a pain point for collaborators. While this could mean different things to different people (Time to complete CI runs, unreliability of parts of the infrastructure, flaky tests needing re-runs) there are a few things that we could potentially look at. This issue includes a selection of things I've consindered that could potentially improve CI efficiency and they range from simple to wacky. These are high level ideas and are not yet fleshed out but I'm sharing them as a discussion starter for anyone who wants to pick them up and run with them or to provide any other thoughts.

  1. Find a way to stop the build process rebuilding so much when nothing has changed (For example why should it need to relink the node binary when you want to run make test?). There was some experimentation in this area by James in https://github.com/nodejs/node/pull/65927 who was looking to reduce redundancy but perhaps we could benefit from taking a closer look at this approach and whether it can be enhanced/expanded.
  2. The standard problem with tq-csa files typically being the limit of how much parallelism you can run in the builds due to memory constraints as those files use a lot of RAM when being compiled (Although this week on a -j4 system with 8GB I hit a limit earlier in the build so it may not just be those files that cause particularly high memory usage). If we could limit those parts with large memory use then we could potentially increase the -j values that we use on some systems.
  3. Could we run some of the sequential test suite along side other things e.g. wpt so that things in the sequential stuff wouldn't interfere with each other? (I don't know the answer and I suspect it hasn't been looked at). Risky, but perhaps worthy of consideration and evaluation now that we have over 7500 tests on main
  4. How much could we gain in using more "fanned" builds (Build once, test in multiple OSs as we do on Windows) instead of building on each system? While fanned builds can be a bit troublesome it could reduce overall machine time (and cost). Do we care about verifying the build process on every Linux distribution for example? We'd want to understand the difference in build/test times but I think we're typically running at about 50/50 now unless a lot needs to be recompiled. If we took such an approach we could potentially give a subset of machines doing the builds higher specifications to allow the builds to progress faster although it's not clear that such segregation would be a good idea from a resource utilisation perspective. It would aoso make it easier to track the amount of time spent on build vs test to determine where efforts can/should be focussed on for any further optimisations.
  5. Automatic re-runs of failing tests. for each failing test at the end of the run, re-run it ten times and declare a pass if any of them worked. There's a reasonable chance that could avoid a lot of reruns. There has been some trialling of this on windows by Antoine which has been in place for the last three years via the --measure-flakiness option on the test runner, although at present that does not give a "success" result for the job overall if it was shown to pass in the re-runs.
  6. Do we need to revisit the configurations we build on? There are two aspects to this: Platform/distribution coverage and "alternative" builds such as the ones we mostly do in containers (plus builds with pointer compression enabled) Reducing the matrix would reduce the chances of failures, but also run the risk of functionality not working. We could still run some of them in the "daily" builds if desired with the corresponding risk of having to figure out where any failures that occurred were introduced.
  7. Another possible option (which I know Richard isn't in favour of but it's still worth putting out there for consideration int eh current climate) would be that instead of running all variants on every PR we could pick a subset e.g. select one "other" Linux distributions (via a genericlinux-x64 or similar label) for each PR as well as the release one. That would reduce the load on the CI and reduce the number of machines we need. As per the last point it would have a corresponding risk of not being able to uniquely identify when any build fault on those platforms was introduced. This could be combined with point 4 regarding fanned builds.

On point 1 I've just looked at a typical Linux/x64 build and here are some lines from the CI job. While it's about 1-2 minutes and so not huge in the 40 minute process it is still potentially wasted machine time:

13:19:46   LINK(target) /home/iojs/build/workspace/node/out/Release/node
13:19:55 make test-ci -j1
13:20:59   LINK(target) /home/iojs/build/workspace/node/out/Release/node

For point 5 I had a look at one windows job which had an example of a failed test which was auto-re-run 10 times:

08:45:26  failed 4 out of 10
08:45:26 not ok 909 parallel/test-process-finalization
[...]
08:49:13 Failed tests:
08:49:13 d:\workspace\node-test-binary-windows-js-suites\node\Release\node.exe --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout d:\workspace\node-test-binary-windows-js-suites\node\test\parallel\test-process-finalization.mjs

In this case it failed 4/10 so appears to be a flaky test. it we were to allow this to be treated as a pass for the purposes of allowing the CI to be landed then it could save a significant amount of rebuild time from having to resume CI jobs. We'd need to decide whether to have a specific threshold for this. This has not yet been tested on non-Windows platforms though as far as I'm aware..

If anyone wants to take a look at any of these feel free to report back in this issue and/or create another linked issue for your investigations.

Lenguaje dominante
Jinja
Estrellas
542
Forks
184
Merge medio
4 d 16 h
PR fusionados (30 d)
11

Preparar el entorno

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.