Autoscaling Runner Sets not scaling down after long jobs

Abierto
#4,193 2 comentarios 3 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
github-actions, go, kubernetes

Línea de trabajo

Comienza con el ciclo de vida de EphemeralRunnerSet, el comportamiento del listener y los logs vinculados del controller y del listener; compara el caso de un trabajo largo con el caso en que un trabajo nuevo activa la reducción de escala. Verifica la configuración minRunners: 0 del chart y determina por qué se pierde el mensaje del trabajo completado. Se considera terminado cuando un conjunto de runners inactivo reduce su escala de un runner a cero de forma fiable después de un workflow largo, sin requerir otro trabajo.

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

Descripción

bug gha-runner-scale-set needs triage
Checks
Controller Version

0.12.1

Deployment Method

Kustomize

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
The issue is happening intermittently, so I haven't been able to create a simple example to reliably reproduce it.
It seems to happen more often with long running jobs (>5 hours).
Describe the bug

When the job finishes successfully, the existing runner pod is removed. The EphemeralRunnerSet then immediately creates a new runner pod, as desired replicas is set to 1. This new runner pod remains idle until another workflow uses it. If no jobs request that runner set the idle runner remains indefinitely, despite minRunners being set to 0.

Describe the expected behavior

We set minRunners: 0 when deploying the gha-runner-scale-set chart, so we expect the EphemeralRunnerSet should scale down to 0 after the workflow finishes.

Additional Context
Listener logs
The listener never receives the message for the completed job.
https://gist.github.com/crystalthenR2R/d3c779ceb2bc14b9fec3a3e6f3fb5fa7

Running a new job on the runner immediately triggers a scale down:
https://gist.github.com/crystalthenR2R/870c6760f38bd2170e725681ba3c7288

Unfortunately this is happening with our larger sized runners with long/infrequent jobs. So they sometimes stick around for a very long time consuming a large amount of resources.
Controller Logs
Controller logs
https://gist.github.com/crystalthenR2R/a9e3010a78042178828146c81fa85454

The runner (nrxkx-runner-2cwzh) is marked as Finished at 2025-07-31 20:05:50, and a new runner is immediately created (nrxkx-runner-gfphq)
Runner Pod Logs
n/a
Lenguaje dominante
Go
Estrellas
6.7k
Forks
1.5k
Merge medio
1 h 34 min
PR fusionados (30 d)
5

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 actions/actions-runner-controller

Todos los issues de actions/actions-runner-controller

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.