Failing steps lose $GITHUB_OUTPUT and $GITHUB_ENV in novolume mode
I maintainer di solito rispondono entro 5 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 66/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- github-actions, typescript
Direzione di ricerca
Start with packages/k8s/src/hooks/run-script-step.ts, especially the runScriptStep error path around execPodStep and execCpFromPod; compare the behavior with the novolume package change mentioned in issue #445. Reproduce the failed-step case with the provided workflow and check whether output, environment, path, and summary files are copied back after failure. Done means copy failures are logged without hiding the original step error, with a deadline on that failure-path copy.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
If a run: step writes to $GITHUB_OUTPUT and then exits non-zero, the runner never sees what it wrote. Same for $GITHUB_ENV, $GITHUB_PATH and $GITHUB_STEP_SUMMARY. On GitHub-hosted runners the output is there. Nothing is logged about the drop either, so it's easy to miss.
Setup: ARC gha-runner-scale-set chart 0.14.2, runner 2.338.2, /home/runner/k8s-novolume from a build of main after v0.8.1 (same code for this function as v0.8.1), job has a container:.
on: workflow_dispatch
jobs:
repro:
runs-on: <novolume scale set>
container:
image: <any image with bash>
steps:
- id: failing
continue-on-error: true
run: |
echo "a=written-before-failure" >> "$GITHUB_OUTPUT"
exit 1
- id: control
run: echo "c=written-then-exit-0" >> "$GITHUB_OUTPUT"
- run: |
echo "failing.outputs.a='${{ steps.failing.outputs.a }}'"
echo "control.outputs.c='${{ steps.control.outputs.c }}'"
I get failing.outputs.a='' and control.outputs.c='written-then-exit-0'. The failing step's log ends with Error: failed to run script step: command terminated with non-zero exit code: command terminated with exit code 1. The control step in the same pod is fine, so the copy-back itself works.
In runScriptStep the catch around execPodStep throws before the execCpFromPod(... _runner_file_commands ...) call, which sits after the try/catch: https://github.com/actions/runner-container-hooks/blob/v0.8.1/packages/k8s/src/hooks/run-script-step.ts#L77-L106. main has the same code for this function, apart from how the error message is formatted.
The fix I'd try is doing the copy on the failure path too, before throwing the step error, and warning instead of throwing if the copy fails so it doesn't hide the real error. execCpFromPod has no overall timeout, so I'd put a deadline on it in that path.
#445 looks like it already copies after a failed step in the novolume package. Is that on purpose? I can send a PR for this against main, but #445 moves the file.
- Lingua principale
- TypeScript
- Stelle
- 156
- Fork
- 122
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di actions/runner-container-hooks
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
actions/runner-container-hooks#455 ·
I maintainer di solito rispondono entro 5 giorni
-
Pod template `imagePullSecrets` silently overwrites `container.credentials` — should union the listsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
actions/runner-container-hooks#447 ·
I maintainer di solito rispondono entro 5 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
actions/runner-container-hooks#442 ·
I maintainer di solito rispondono entro 5 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
actions/runner-container-hooks#416 ·
I maintainer di solito rispondono entro 5 giorni
-
Surface pod Events (FailedScheduling, etc.) on waitForPodPhases timeoutForse già presa @remidebette l’ha presa 167 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
actions/runner-container-hooks#366 · 3 reazioni ·
I maintainer di solito rispondono entro 5 giorni
Tutte le issue di actions/runner-container-hooks
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
solidjs/solid-docs#1716 ·
I maintainer di solito rispondono entro 1 giorno
-
bug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Progress indicated by console logs is off by oneForse già presa @marceliwac l’ha presa oggi. Apertabug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
aws-samples/aws-cdk-examples#1336 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
melgarafael/DeskcommCRM#4999 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 2 giorni