Skip to content

gateway: keep /healthz as a deprecated alias of /health - #5

Merged
blakebauman merged 1 commit into
mainfrom
compat/healthz-alias
Aug 7, 2026
Merged

blakebauman merged 1 commit into
mainfrom
compat/healthz-alias

Conversation

@blakebauman

Copy link
Copy Markdown
Member

Follow-up to #3, which renamed /healthz to /health outright. That removed an endpoint the README freezes as v1 wire surface, so under fold's own deprecation policy it needed a major. The rename is worth keeping and a major isn't worth spending on a health-path rename — so this restores the old path as a deprecated alias and the next release stays in the v1 line as v1.5.0.

GET /health    200   canonical
GET /healthz   200   deprecated alias
               Deprecation: true
               Link: </health>; rel="successor-version"

Plus one log line on first use, so an operator can find whatever still probes it before the path goes away:

/healthz is deprecated and will be removed in the next major version; probe /health instead

It serves the same bytes rather than redirecting. Kubelet probes and most load-balancer health checks don't follow redirects, so a 301 would read as a failure on exactly the deployments the alias exists to protect.

fold-discovery needed this more than the gateway did

Its handler serves the upstreams document on any GET that isn't the health path. So after #3, /healthz there didn't 404 — it fell through and started returning the document, with a 200. An existing probe would have gone on reporting healthy while scraping content it never meant to fetch. That's a worse failure than a clean 404, because nothing looks wrong. Aliased explicitly, with a test that asserts both paths return the health summary and not the document.

Docs

Helm probes, compose, and all examples stay on /health. The deprecation and an upgrade note are recorded in README "API stability", operations.md, deploy.md, and discovery-controller.md.

Side effect worth noting

The demo can now be redeployed from main without touching fold.run first — demo.fold.run/healthz keeps answering, so the status checks and container probe won't 404 mid-deploy. Moving them to /health becomes cleanup rather than a prerequisite.

Gate

make check clean (0 lint issues, -race) · conformance 40/40 · added p50 177 µs vs the 5 ms gate · helm-check clean.

🤖 Generated with Claude Code

Renaming the health path outright removed an endpoint the README freezes
as v1 wire surface, which under fold's own deprecation policy needs a
major. The rename is worth keeping and a major is not worth spending on
it, so /health stays canonical and /healthz answers identically again,
marked on its way out: RFC 8594 Deprecation and Link headers on the
response, and one log line on first use so an operator can find whatever
still probes it before the path goes away.

It serves the same bytes rather than redirecting. Kubelet probes and most
load-balancer health checks do not follow redirects, so a 301 would read
as a failure on exactly the deployments the alias exists to protect.

fold-discovery needed the alias more than the gateway did. Its handler
serves the document on any GET that is not the health path, so after the
rename /healthz stopped 404ing and started returning the upstreams
document — an existing probe would have gone on reporting 200 while
scraping content it never meant to fetch. That is a worse failure than a
clean 404, because nothing looks wrong.

Helm probes, compose, and the docs stay on /health; the deprecation and
the upgrade note are recorded in README "API stability", operations.md,
deploy.md, and discovery-controller.md.

make check clean, conformance 40/40, added p50 177us against the 5ms
gate, helm-check clean.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@blakebauman
blakebauman merged commit 91a5243 into main Aug 7, 2026
6 checks passed
@blakebauman
blakebauman deleted the compat/healthz-alias branch August 7, 2026 22:38
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