Repository navigation
feat(template): declare a health check in app.yaml - #695
Merged
Merged
Conversation
Without a health_check, Databricks Apps switches traffic to a new or waking app before its server listens, so the first request can fail with an empty 502. The server plugin already serves GET /health, so declaring it makes the runtime wait until the app answers before routing traffic to it. Signed-off-by: Pedro Figueiredo <pedro.figueiredo@databricks.com>
Contributor
🤖 AppKit PR bot🔬 Run evalsStart an eval for this PR from the evals-monitor app: Go to Evals Monitor → 📦 Try this PR's app templateScaffolds a new app from this PR's SDK build. Run it in any folder (requires the GitHub CLI — gh run download 40685395914 -R databricks/appkit -n appkit-template-0.89.0-pr.993a268-template-health-check-695 -D appkit-pr-695 \
&& unzip -o "appkit-pr-695/appkit-template-0.89.0-pr.993a268-template-health-check-695.zip" -d "appkit-pr-695" \
&& databricks apps init --template "appkit-pr-695"The template pins |
MarioCadenas
approved these changes
Oct 28, 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.
Why
Databricks Apps only waits for an app to answer before routing traffic to it when
app.yamldeclares ahealth_check. Without one, a new or waking app can receive traffic before its server listens, and the first page is an empty 502. Apps that scale to zero hit this on wake.What
The template's
app.yamlnow declares:The server plugin already registers
GET /health, which returns a static 200, and the server only starts listening once setup finishes. So a new app passes the check as soon as it is up, and the runtime routes traffic only after that.Notes:
app.yaml./health, its deploys wait for the health check timeout (300 seconds by default) and then fail.tools/generate-app-templates.tscarries the change to them.Testing
Rendered the template with
databricks apps init(CLI 1.20.0), once with noenvblock and once with the analytics feature. Both produce valid YAML withhealth_check.path: /healthand the expectedcommand.