Github Actions: Automatically retry CI jobs that a spot instance claim killed
Mi CI corre en un runner spot ARM64 autoalojado. Cuando AWS se lleva la instancia de vuelta a media corrida, GitHub muestra una X roja en cualquier paso que estuviera corriendo, y se ve idéntico a una prueba que falla. Esto es un workflow que lee el log del job, reconoce esa falla específica, y re-corre los jobs fallidos por su cuenta. Las fallas de prueba reales se quedan en rojo. Stack: GitHub…
A GitHub Actions workflow that detects and reruns jobs that fail due to a self-hosted runner being terminated by AWS while running is described. The runner, which is part of an Auto Scaling Group, was terminated while executing a test, causing GitHub to display a red X indicating a failed test. To address this, a workflow was created that checks the job logs for specific error messages indicating a runner shutdown and reruns the failed jobs.
The workflow uses a Python script and a YAML configuration file. Additionally, changes were made to the infrastructure, including updating the Auto Scaling Group configuration and runner registration, to prevent similar issues in the future.
Written by urgent.news from Dev.to's report — not a translation of it. Machine-written — may contain errors; check the original before relying on it.