Loading
feat(v2/httpserver): include build info in health responses
What this MR does
Adds Version, Commit, and BuildDate fields to httpserver.Config. When set, these are included in the /-/liveness and /-/readiness JSON response bodies so operators can confirm which build is running without inspecting the binary directly.
Fields are omitted from the response when empty, so existing callers require no changes.
Config
httpserver.NewWithConfig(&httpserver.Config{
Version: app.Version,
Commit: app.Commit,
BuildDate: app.BuildDate,
})Response shape
{
"status": "ok",
"version": "v1.2.3",
"commit": "abc1234",
"build-date": "2026-05-07T00:00:00Z"
}How to test
cd v2 && go test ./httpserver/... -v -run TestLiveness_IncludesBuildInfo -run TestReadiness_IncludesBuildInfoEdited by Elliot Forbes