Repository navigation
fix(health): /health/ready 503 on HANA crash-loops every deploy (#2975) - #2995
Merged
Merged
Conversation
…very deploy (#2975) The #2975 readiness gate probes the DB with a bare `SELECT 1`. HANA rejects that ("sql syntax error") — it requires `SELECT 1 FROM DUMMY`. So dbOk was ALWAYS false on HANA, /health/ready stayed 503, and CF's new startup health gate (also #2975) killed tutorials-srv at 60s on every deploy → crash loop. The integration test runs on in-memory SQLite (where bare `SELECT 1` works), so it passed green while the real HANA path was broken — a classic test-environment gap. Fix: add dialect-safe `dbPingSql(kind)` to scheduler-ready.js (`SELECT 1 FROM DUMMY` on hana, `SELECT 1` elsewhere) and use it in both /health/ready and /health/db (the latter had the mirror bug: unconditional `FROM DUMMY`, broken on SQLite). Unit tests cover both dialects. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This was referenced Nov 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The #2975 blue-green readiness gate crash-loops
tutorials-srvon every deploy to a HANA environment (observed on DEV deploy 2026-11-02,instances 0/1, repeatedexit 137)./health/readyprobes the DB with a bareSELECT 1. HANA rejects that —sql syntax error: line 1 col 8; HANA requiresSELECT 1 FROM DUMMY. SodbOkis always false on HANA →/health/readyalways returns 503 → CF's startup health check (added by the same #2975) never passes → CF kills the app at 60s → crash loop. The app never becomes reachable.Confirmed against DEV HANA:
The integration test (
test/integration/health-ready.test.js) runs on in-memory SQLite, where bareSELECT 1works — so it passed green while the real HANA path was broken.Fix
dbPingSql(kind)tosrv/lib/scheduler-ready.js:SELECT 1 FROM DUMMYonhana,SELECT 1otherwise./health/ready(cds.db.kind) — the actual crash fix./health/db, which used an unconditionalSELECT 1 FROM DUMMY(broken on SQLite).Impact
Without this, the #2975 readiness-gate batch cannot deploy to DEV or PROD at all. This blocks the DEV→main release that also carries the #2909 draft-integrity fix (#2992).
Related: #2975.
🤖 Generated with Claude Code