Listener not aware of pending work after restart/reinstall

Aperta
#4,027 9 commenti 7 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
github-actions, go, helm, kubernetes

Direzione di ricerca

Riproduci gli scenari di riavvio, reinstallazione e aggiornamento del listener descritti nell’issue, poi inizia dai log di avvio del listener e dal passaggio “Getting next message” usando lastMessageID 0. Traccia come viene individuato il lavoro in sospeso dopo l’avvio; il lavoro è completato quando un workflow accodato mentre il listener era offline viene acquisito senza annullarlo o rieseguirlo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug gha-runner-scale-set
Checks
Controller Version

0.9.3

Deployment Method

Helm

Checks
  • This isn't a question or user support case (For Q&A and community support, go to Discussions).
  • I've read the Changelog before submitting this issue and I'm sure it's not due to any recently-introduced backward-incompatible changes
To Reproduce
1. I have ARC setup working fine
2. I am unistalling runnerset X
3. Triggering workflow that awaits for runner X
4. I'm installing runnerset X again (no changes in runnerset configuration)
5. The workflow awaits forever
6. After clicking Cancel/Rerun on the workflow, listener sees new work to be done and all works fine again

It also happens in such scenario:

1. I have ARC setup working fine
2. I am updating runnerset X - new listener is being created
3. Triggering workflow that awaits for runner X
4. The new (updated) listener is up
5. The workflow awaits forever
6. After clicking Cancel/Rerun on the workflow, listener sees new work to be done and all works fine again
Describe the bug

The listener is not aware of the work and runners needed, if the work was scheduled when listener was offline.
After cancel/rerun on the job all works fine.

Describe the expected behavior

The work should be picked up by the listener once it is online, no matter if it was scheduled when listener was up or not.

Additional Context
Listener logs:

{"severity":"info","ts":"2025-04-09T09:31:33Z","logger":"listener-app","message":"app initialized"}
{"severity":"info","ts":"2025-04-09T09:31:33Z","logger":"listener-app","message":"Starting listener"}
{"severity":"info","ts":"2025-04-09T09:31:33Z","logger":"listener-app","message":"refreshing token","githubConfigUrl":"https://github.com/REDACTED"}
{"severity":"info","ts":"2025-04-09T09:31:33Z","logger":"listener-app","message":"getting access token for GitHub App auth","accessTokenURL":"https://api.github.com/app/installations/REDACTED"}
{"severity":"info","ts":"2025-04-09T09:31:33Z","logger":"listener-app","message":"getting runner registration token","registrationTokenURL":"https://api.github.com/orgs/REDACTED/actions/runners/registration-token"}
{"severity":"info","ts":"2025-04-09T09:31:34Z","logger":"listener-app","message":"getting Actions tenant URL and JWT","registrationURL":"https://api.github.com/actions/runner-registration"}
{"severity":"info","ts":"2025-04-09T09:31:34Z","logger":"listener-app.listener","message":"Current runner scale set statistics.","statistics":"{\"totalAvailableJobs\":0,\"totalAcquiredJobs\":0,\"totalAssignedJobs\":0,\"totalRunningJobs\":0,\"totalRegisteredRunners\":0,\"totalBusyRunners\":0,\"totalIdleRunners\":0}"}
{"severity":"info","ts":"2025-04-09T09:31:34Z","logger":"listener-app.worker.kubernetesworker","message":"Calculated target runner count","assigned job":0,"decision":0,"min":0,"max":3,"currentRunnerCount":0,"jobsCompleted":0}
{"severity":"info","ts":"2025-04-09T09:31:34Z","logger":"listener-app.worker.kubernetesworker","message":"Compare","original":"{\"metadata\":{\"creationTimestamp\":null},\"spec\":{\"replicas\":-1,\"patchID\":-1,\"ephemeralRunnerSpec\":{\"metadata\":{\"creationTimestamp\":null},\"spec\":{\"containers\":null}}},\"status\":{\"currentReplicas\":0,\"pendingEphemeralRunners\":0,\"runningEphemeralRunners\":0,\"failedEphemeralRunners\":0}}","patch":"{\"metadata\":{\"creationTimestamp\":null},\"spec\":{\"patchID\":0,\"ephemeralRunnerSpec\":{\"metadata\":{\"creationTimestamp\":null},\"spec\":{\"containers\":null}}},\"status\":{\"currentReplicas\":0,\"pendingEphemeralRunners\":0,\"runningEphemeralRunners\":0,\"failedEphemeralRunners\":0}}"}
{"severity":"info","ts":"2025-04-09T09:31:34Z","logger":"listener-app.worker.kubernetesworker","message":"Preparing EphemeralRunnerSet update","json":"{\"spec\":{\"patchID\":0,\"replicas\":null}}"}
{"severity":"info","ts":"2025-04-09T09:31:34Z","logger":"listener-app.worker.kubernetesworker","message":"Ephemeral runner set scaled.","namespace":"REDACTED","name":"REDACTED","replicas":0}
{"severity":"info","ts":"2025-04-09T09:31:34Z","logger":"listener-app.listener","message":"Getting next message","lastMessageID":0}

I use fork, no changes in the listener code.
Newest runner image in use.

Controller Logs
Controller logs look normally. Only listener is not picking up work
Runner Pod Logs
N/A
Lingua principale
Go
Stelle
6.7k
Fork
1.5k
Merge medio
1h 34m
PR unite (30g)
5

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di actions/actions-runner-controller

Tutte le issue di actions/actions-runner-controller

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.