pr_checker: ignore superseded GitHub Actions check suites when a head SHA is reused
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 68/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- github-actions, javascript
Línea de trabajo
Comienza con lib/pr_checker.js: checkGitHubCI() itera sobre las suites devueltas por lib/queries/PRCommits.gql. Usa los ejemplos enlazados de nodejs/node para entender las ejecuciones duplicadas para un mismo head SHA y, después, verifica que solo la ejecución aplicable más reciente de cada workflow afecte al resultado, y que las ejecuciones antiguas reemplazadas no impidan la aceptación.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
PRChecker.checkGitHubCI() can incorrectly report a PR as having failed GitHub CI when its current head commit has both:
- an older cancelled/failed GitHub Actions run; and
- a newer successful run of the same workflow.
This can happen when a PR branch is force-pushed away from a commit and later force-pushed back to exactly the same SHA. GitHub
keeps both sets of check suites attached to that commit.
This occurred on nodejs/node#64803, https://github.com/nodejs/node/pull/64601 whose current head SHA is:
ee1ca501264411a3e993d4ed487f833fb0ffa841
a23d7a9a84a190e3804f9b2fb200feb833f3114a
Timeline:
- An Actions run was started for this SHA:
https://github.com/nodejs/node/actions/runs/30359390795 - The PR branch was updated, causing that run to be cancelled by the workflow's
cancel-in-progressconfiguration. - The branch was subsequently force-pushed back to the same SHA:
https://github.com/nodejs/node/pull/64803#event-28598521231 - A new run for the same SHA completed successfully:
https://github.com/nodejs/node/actions/runs/30360481950 - The latest Jenkins CI also completed successfully:
https://ci.nodejs.org/job/node-test-pull-request/75495/
However, the commit queue reported one failed and 15 cancelled GitHub Actions jobs from the older, superseded runs:
https://github.com/nodejs/node/pull/64803#issuecomment-5226872042
The commit checks page contains both the old cancelled suites and the newer successful suites:
https://github.com/nodejs/node/commit/ee1ca501264411a3e993d4ed487f833fb0ffa841/checks
The reported macOS failure was also produced while the old workflow was being cancelled, rather than by a test failure:
https://github.com/nodejs/node/actions/runs/30359390795/job/90275679554
The GraphQL query retrieves up to 100 check suites associated with the current commit:
https://github.com/nodejs/node-core-utils/blob/v7.0.1/lib/queries/PRCommits.gql#L28-L44
checkGitHubCI() then iterates over every GitHub Actions suite and treats any non-successful historical suite as a current
failure:
https://github.com/nodejs/node-core-utils/blob/v7.0.1/lib/pr_checker.js#L461-L515
It does not identify whether an older suite has been superseded by a newer run of the same workflow.
As a result, an obsolete cancelled or failed run can permanently prevent the commit queue from accepting that SHA, even though
all current CI runs succeeded.
For each GitHub Actions workflow, only the latest applicable run for the current head SHA should determine the CI result. Older
runs superseded by a newer run of the same workflow should be ignored.
Refs: https://github.com/nodejs/node/pull/64601#issuecomment-5226071594
Refs: https://github.com/nodejs/node/pull/64803#issuecomment-5226872042
- Lenguaje dominante
- JavaScript
- Estrellas
- 313
- Forks
- 137
- Merge medio
- 2 d 8 h
- PR fusionados (30 d)
- 24
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de nodejs/node-core-utils
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
nodejs/node-core-utils#664 · 1 comentario ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 65/100
nodejs/node-core-utils#1164 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 68/100
nodejs/node-core-utils#1160 · 3 comentarios ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
nodejs/node-core-utils#1063 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
nodejs/node-core-utils#967 · 4 comentarios ·
Todos los issues de nodejs/node-core-utils
Issues similares
-
curation good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
amponce/archive-movie-browser#186 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
clerk/javascript#9852 ·
-
bug p1 tools
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
HarperFast/skills#96 ·
-
factory-active factory-automatic task-bug-reproduction-cannot-reproduce task-identify-harness-labels-done task-identify-issue-type-done
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100