Make a failed pr dispatch comment carry no ref time

Abierto Apto para principiantes
#544 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
64/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
github-actions
Área
ci-cd

Línea de trabajo

Comienza en .github/workflows/benchmark.yml, en el job de comentarios de la ruta workflow_dispatch, y encuentra dónde se construye el marcador <!-- elfuse-benchmark-ref-time: ... --> en cada comentario publicado. Compáralo con el cambio #543 en .github/workflows/bench-report.yml, que escribe ese marcador solo cuando existen mediciones, y con la guarda PR_TIME que se usa al negarse a reemplazar un comentario. Hecho significa que el job de dispatch escribe el tiempo de referencia solo cuando report está establecido, dejando intacta la comprobación del lado entrante.

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

Descripción

Problem

The comment job of .github/workflows/benchmark.yml, for a workflow_dispatch run with pr, writes <!-- elfuse-benchmark-ref-time: ... --> into every comment it posts, including "The benchmark did not complete at this commit, so it has no measurements." Since #543, .github/workflows/bench-report.yml writes the ref time only into a comment that carries measurements. Both writers refuse to replace a comment whose ref time is later than their own. So the report of an earlier pull_request run replaces a "did not complete" comment that a later pull_request run left, but not one that a later pr dispatch left. For that to happen, the dispatch would have to fail (for example in a step before the measurement) and post its comment before the earlier run reports; that run's report is then dropped with the notice "Comment N reports a merge ref from ...". Found by reading daf19f0; not run.

The dispatch job does not have the case that made #543 change bench-report.yml: its if requires !cancelled(), so a dispatch run replaced while pending posts nothing.

Proposal

Write the ref time in the dispatch job only when report is set, and keep the PR_TIME check on the incoming side, so that both writers follow one rule: a comment with no measurements keeps out no report.

Alternatives

Keep the dispatch job as it is, on the ground that a later merge ref that failed matters more than an earlier one's measurements, and then say so in both writers' comments.

Origin

Follow-up from #543 (https://github.com/sysprog21/elfuse/pull/543).

Lenguaje dominante
C
Estrellas
287
Forks
33
Merge medio
2 d 17 h
PR fusionados (30 d)
18

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 sysprog21/elfuse

Todos los issues de sysprog21/elfuse

Issues similares

Más issues de C

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.