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

conclusion job: collect_usage_artifact_files.sh calls bare `node` (exit 127) on runners without node on PATH

Cerrado Apto para principiantes
#65,105 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

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

Línea de trabajo

Comience con actions/setup/sh/collect_usage_artifact_files.sh y las pruebas de shell relacionadas, como check_mcp_servers_test.sh. Ejecute el script primero con un PATH temporal sin node y después con un node simulado, y verifique la advertencia, el estado de salida, el listado y el comportamiento sin cambios del resumen; ejecute también las comprobaciones relevantes de pkg/workflow/evals_steps_test.go.

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

Descripción

ai-inspected

Analysis

The conclusion job runs actions/setup/sh/collect_usage_artifact_files.sh (step built by buildUsageArtifactCollectionStep() in pkg/workflow/notify_comment.go). Its last real step is a bare node call (line 89 on main):

mkdir -p /tmp/gh-aw/usage/activity
node "${RUNNER_TEMP}/gh-aw/actions/generate_usage_activity_summary.cjs"
find /tmp/gh-aw/usage -type f -print | sort

Unlike the agent, detection and other jobs, the conclusion job gets no GenerateNodeJsSetupStep() (pkg/workflow/nodejs.go); its github-script steps use the runner's bundled node internally. On a self-hosted runner whose image has no node on PATH (the stock ghcr.io/actions/actions-runner image that ARC scale sets use ships node only under /home/runner/externals/node*), the call fails:

/home/runner/_work/_temp/gh-aw/actions/collect_usage_artifact_files.sh: line 73: node: command not found
##[error]Process completed with exit code 127.

The step is continue-on-error: true, so the job stays green, but every run carries an ##[error] annotation, usage/activity/summary.json is never produced, and the trailing find listing is skipped. The summary is best-effort by design (that is why the step is continue-on-error), so a missing node should degrade to a warning, not an error.

Reproduction

  1. Compile any workflow and run it on a self-hosted runner image where node is not on PATH (e.g. ghcr.io/actions/actions-runner as the ARC scale-set runner image).
  2. Open the conclusion job log: step "Collect usage artifact files" fails with exit code 127 as above.

Observed with gh-aw-actions/setup v0.90.0, engine: pi, runner.topology: arc-dind; the script on main still has the unguarded call.

Implementation Plan

Preferred: guard the call in the script (smallest change, works for every runner and topology, no extra setup step in every conclusion job).

  1. Guard the call (actions/setup/sh/collect_usage_artifact_files.sh, the node ...generate_usage_activity_summary.cjs line):
    if command -v node >/dev/null 2>&1; then
      node "${RUNNER_TEMP}/gh-aw/actions/generate_usage_activity_summary.cjs"
    else
      echo "::warning::node not found on PATH; skipping the usage activity summary"
    fi
    find /tmp/gh-aw/usage -type f -print | sort
    
    Keep the find listing running in both cases.
  2. Add a test actions/setup/sh/collect_usage_artifact_files_test.sh, in the style of the sibling *_test.sh scripts (e.g. check_mcp_servers_test.sh): run the script with a temporary PATH that contains the coreutils it needs but no node; assert exit code 0, the ::warning:: line is printed, and the find listing still appears. Add a second case with a stub node on PATH asserting it is invoked.
  3. Check pkg/workflow/evals_steps_test.go (it reads this script) still passes, and recompile the lock files that embed it.

Alternative (heavier, not preferred): prepend GenerateNodeJsSetupStep() to the conclusion job in notify_comment.go, which adds a setup step to every run just for a best-effort summary.

Acceptance Criteria

  • On a runner without node on PATH, "Collect usage artifact files" exits 0 and logs a ::warning::; no ##[error] annotation.
  • On a runner with node, behavior is unchanged and usage/activity/summary.json is generated.
  • The new shell test covers both cases.

Workaround on our side: a node symlink on PATH in the runner image.

Lenguaje dominante
Go
Estrellas
5.4k
Forks
584
Merge medio
3 h 16 min
PR fusionados (30 d)
829

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

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 github/gh-aw

Todos los issues de github/gh-aw

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.