From c5c68f22e98d981ba7221d36b2987ac422da9222 Mon Sep 17 00:00:00 2001 From: John Coffey Date: Sat, 15 Aug 2026 17:17:28 -0700 Subject: [PATCH] Stop enterprise-api panicking on startup from a duplicate /healthz route main.go registered GET /healthz explicitly, on top of the one queryapi.Handler.RegisterRoutes already registers -- net/http's ServeMux panics on a duplicate pattern, so enterprise-api could never actually start. Every previous "built" claim for this binary had only ever been a successful go build, never a successful process start; caught the first time this ran against a real docker-compose stack. --- enterprise/cmd/enterprise-api/main.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/enterprise/cmd/enterprise-api/main.go b/enterprise/cmd/enterprise-api/main.go index ddf3d91..225c77d 100644 --- a/enterprise/cmd/enterprise-api/main.go +++ b/enterprise/cmd/enterprise-api/main.go @@ -158,9 +158,8 @@ func main() { dashboardsHandler := dashboards.NewHandler(logger, dashboards.NewStore(pgPool), authorizer, rbacstore.NewDashboardPermissions(rbac)) mux := http.NewServeMux() - queryHandler.RegisterRoutes(mux) + queryHandler.RegisterRoutes(mux) // also registers GET /healthz dashboardsHandler.RegisterRoutes(mux) - mux.HandleFunc("GET /healthz", func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(http.StatusOK) }) srv := &http.Server{ Addr: cfg.HTTPListenAddr,