From e7ef6ab85bbc107ba0e53bfc32ec963927dde541 Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 20 May 2026 12:32:30 -0400 Subject: [PATCH] Fix readiness probe for containers without HEALTHCHECK The Go template `{{.State.Health.Status}}` behaves differently across Docker versions when .State.Health is nil (no HEALTHCHECK configured). Some versions return an empty string with exit 0, bypassing the `|| echo "none"` fallback and causing the readiness probe to fail indefinitely for non-SAS apps (jupyter, vscode, etc.). Use a Go template conditional to handle nil .State.Health directly, making the probe work reliably regardless of Docker version. Co-Authored-By: Claude Opus 4.6 --- startupscript/butane/probe-proxy-readiness.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/startupscript/butane/probe-proxy-readiness.sh b/startupscript/butane/probe-proxy-readiness.sh index d124a516a..05b22b028 100644 --- a/startupscript/butane/probe-proxy-readiness.sh +++ b/startupscript/butane/probe-proxy-readiness.sh @@ -11,7 +11,7 @@ set -o xtrace # shellcheck source=/dev/null source /home/core/metadata-utils.sh -APP_HEALTH="$(docker inspect --format='{{.State.Health.Status}}' application-server 2>/dev/null || echo "none")" +APP_HEALTH="$(docker inspect --format='{{if .State.Health}}{{.State.Health.Status}}{{else}}none{{end}}' application-server 2>/dev/null || echo "none")" if docker ps -q --filter "name=proxy-agent" | grep -q . \ && docker ps -q --filter "name=application-server" | grep -q . \