Repository navigation
fix(supabase-kong): fail fast on bad declarative config instead of crash-looping - #3534
POWERFULMOVES wants to merge 1 commit into
Conversation
…ash-looping Add make kong-config-check: renders kong.yml in a throwaway supabase-kong container with the node's real env and runs 'kong config parse', naming the known faults (empty DASHBOARD_PASSWORD, new keys aliased to legacy JWTs). supa-start runs it before bringing Kong up (SKIP_KONG_CONFIG_CHECK=1 bypasses). Strip CRs from the vendored kong-entrypoint.sh before exec so a Windows checkout with core.autocrlf=true no longer kills Kong on '#!/bin/sh\r'. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016aNs4mvJxQr1QT3NqGDt3Q
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one): 1
Please check the settings in the CodeRabbit UI or the
|
Docker Hardening ValidationHardening Validation ReportValidated: Wed Nov 25 17:42:42 UTC 2026Services CheckedPMOVES.AI compose hardening ratchet[INFO] Checking: /home/runner/work/PMOVES.AI/PMOVES.AI/pmoves/docker-compose.hardened.yml [INFO] Validating: agent-zero [INFO] Validating: archon [INFO] Validating: channel-monitor [INFO] Validating: comfy-watcher [INFO] Validating: deepresearch [INFO] Validating: extract-worker [INFO] Validating: ffmpeg-whisper [INFO] Validating: grayjay-plugin-host [INFO] Validating: hi-rag-gateway-gpu [INFO] Validating: hi-rag-gateway-v2 [INFO] Validating: hi-rag-gateway-v2-gpu [INFO] Validating: invidious-companion-proxy [INFO] Validating: jellyfin-bridge [INFO] Validating: langextract [INFO] Validating: media-audio [INFO] Validating: media-video [INFO] Validating: mesh-agent [INFO] Validating: nats-echo-req [INFO] Validating: nats-echo-res [INFO] Validating: notebook-sync [INFO] Validating: p7-room-orchestrator [INFO] Validating: pdf-ingest [INFO] Validating: pmoves-yt [INFO] Validating: presign [INFO] Validating: publisher-discord [INFO] Validating: render-webhook [INFO] Validating: retrieval-eval [INFO] Validating: supaserch =================================== |
ORGSIM-MIRROR drift check (advisory, fail-soft)vv3 / 8 files / VERIFIED 124 / DRIFTED 10 / UNDECIDED 29 / digest 78d7977c659a Zero-LLM deterministic audit - unreachable = UNDECIDED, never dead - scripts/runbook_drift.py |
Requested by Russell · project thread
Summary
On 2026-11-25
supabase-kongon the 4090 crash-looped (1,266 restarts in 22h). Z890 hit the same pattern in August (3,924 restarts). Each time the cause was env drift on that one node. Kong exits on a bad declarative config,restart: unless-stoppedrestarts it, and nothing reports the failure. This PR makes those failures stop the startup with a clear error instead of looping.make -C pmoves kong-config-check(newscripts/supabase/kong_config_check.sh): renderskong.ymlinside a throwawaysupabase-kongcontainer (run --rm --no-deps, so it uses the real env, mounts and image), then runskong config parsewithout starting the gateway. It names each known fault and prints its fix: an emptyDASHBOARD_PASSWORD, andSUPABASE_PUBLISHABLE_KEY/SUPABASE_SECRET_KEYholding copies of the legacy JWTs. It also warns when the entrypoint has CRLF line endings.supa-startnow runskong-config-checkbeforeup -d ... supabase-kongand aborts if it fails.SKIP_KONG_CONFIG_CHECK=1bypasses it.docker-compose.ymlanddocker-compose.core.yml): PMOVES-supabase has no.gitattributes. On a Windows checkout withcore.autocrlf=true,kong-entrypoint.shgets#!/bin/sh\rand cannot exec. The service now strips CRs into/tmpand execs that copy.Deliberately not done: a compose-level
${DASHBOARD_PASSWORD:?}guard. Compose resolves variables in every service, including ones whose profile is off (checked against compose v5.7.1). That guard would break everydocker composecommand on nodes that don't run Supabase.Testing
kong_config_check.shwas exercised outside a container against the pinned submodule'skong.ymland a CRLF-converted entrypoint, with a stubkongbinary. All three cases behaved as expected: a good env passes, an empty password fails, and an aliased publishable key fails. Not run: the realkong config parseinsidekong/kong:3.9.3, because this sandbox has no Docker daemon. Runmake -C pmoves kong-config-checkon a node before merging.Required Checks
CHIT Contract CheckReview Coordination
Follow-up Tasks
*.sh text eol=lfto the POWERFULMOVES/PMOVES-supabase fork (outside this repo).make -C pmoves kong-config-checkand apply the fix it names.pmoves-cipherMCP 401 needs aCIPHER_API_TOKENre-sync. This PR does not address it.Reviewer Notes
The entrypoint shim changes how the vendored script is invoked, not its contents, so upstream syncs still flow through. The check refuses to run if upstream ever changes the final
exec /entrypoint.sh kong docker-startline. That way it can never start the gateway by accident.Generated by Claude Code