mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-16 21:03:43 +00:00
feat: add runner health admission checks (#1090)
Opt-in local task-admission checks under a `health_check` config section (disabled by default): - pause new task fetching when free disk space on the workspace volume is below the configured minimum - optional executable health-check script — a non-zero exit, timeout, or start failure marks the runner unavailable - checks run only while the runner is idle; the last result is reused while a job is active, and polling resumes automatically on recovery - `/readyz` reports task-admission readiness (reusing the poll loop's last check); `/healthz` stays a process-liveness endpoint --------- Co-authored-by: silverwind <[email protected]> Reviewed-on: https://gitea.com/gitea/runner/pulls/1090 Reviewed-by: silverwind <[email protected]>
This commit is contained in:
1 parent
7bec310002
commit
c43cbe87ca
16 files changed
+753
-32
No files matched your search
@@ -81,7 +81,7 @@ func TestRegisterRunningJobsFuncZeroCapacity(t *testing.T) {
|
||||
|
||||
func TestStartServerCanBeCancelled(t *testing.T) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
StartServer(ctx, "127.0.0.1:0")
|
||||
StartServer(ctx, "127.0.0.1:0", nil)
|
||||
cancel()
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user