Skip to content

fix(vtex): add fast health response for k8s readiness probes#342

Open
tlgimenes wants to merge 2 commits intomainfrom
tlgimenes/debug-vtex-k8s-probes
Open

fix(vtex): add fast health response for k8s readiness probes#342
tlgimenes wants to merge 2 commits intomainfrom
tlgimenes/debug-vtex-k8s-probes

Conversation

@tlgimenes
Copy link
Copy Markdown
Contributor

@tlgimenes tlgimenes commented Mar 31, 2026

K8s readiness probes were failing with context deadline exceeded when hitting GET / on the VTEX MCP pod. The @decocms/runtime only handles /_healthcheck as a fast health path — GET / goes through the full middleware stack and returns 404, which either times out under the probe's deadline or fails with non-2xx. This adds a short-circuit in vtex/server/main.ts that returns 200 OK immediately for GET / before delegating to the runtime.


Summary by cubic

Return a fast 200 OK for GET / in the VTEX server to keep K8s readiness/liveness probes from timing out. This short-circuits before @decocms/runtime and leaves other routes unchanged.

  • Bug Fixes

    • Added an early handler in vtex/server/main.ts that responds "OK" to GET /.
    • Prevents probes from traversing middleware and returning 404; /_healthcheck stays with @decocms/runtime.
  • Refactors

    • Applied oxfmt formatting across the repo (docs/configs), no behavior changes.

Written for commit 7636bff. Summary will update on new commits.

tlgimenes and others added 2 commits March 31, 2026 17:56
K8s probes hitting GET / were timing out because the runtime only
handles /_healthcheck, leaving GET / to traverse the full middleware
stack and return 404. Added a short-circuit before the runtime so
probes get an immediate 200 OK.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 345 files

Note: This PR contains a large number of files. cubic only reviews up to 75 files per PR, so some files may not have been reviewed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant