actions / runner

The Runner for GitHub Actions :rocket:
https://github.com/features/actions
MIT License
4.64k stars 892 forks source link

[Issue:3308] SIGTERM Graceful shutdown functionality #3340

Open jaswanthikolla opened 2 weeks ago

jaswanthikolla commented 2 weeks ago

This is to make runner compatible with Kubernetes' Karpenter, and in general k8s pod movement . This fixes the https://github.com/actions/runner/issues/3308 by handling graceful shutdown of the runner. It does following.

  1. If the runner is just listening for jobs and Idle, It will just exit.
  2. If the runner is running a job, It will wait RUNNER_GRACEFUL_STOP_TIMEOUT seconds before terminating or job completion whichever happens first.
jaswanthikolla commented 5 days ago

Any ETA on when can we expect a review on this PR?