Repository navigation
gateway: keep /healthz as a deprecated alias of /health - #5
Merged
Merged
Conversation
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]>
This was referenced Aug 11, 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.
Follow-up to #3, which renamed
/healthzto/healthoutright. 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.Plus 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 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,
/healthzthere 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, anddiscovery-controller.md.Side effect worth noting
The demo can now be redeployed from
mainwithout touchingfold.runfirst —demo.fold.run/healthzkeeps answering, so the status checks and container probe won't 404 mid-deploy. Moving them to/healthbecomes cleanup rather than a prerequisite.Gate
make checkclean (0 lint issues,-race) · conformance 40/40 · added p50 177 µs vs the 5 ms gate ·helm-checkclean.🤖 Generated with Claude Code