You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4c7c542
Browse filesBrowse the repository at this point in the historyBrowse files
fix: refuse a service nothing serves; reset every listener at Init; no HTTP in a listener-less image
Follow-ups to #113's review (r76):
- Load (builder and runtime) refuses a service with no HTTP endpoint and no
gRPC endpoint for grpc-server to serve, by name: a manifest that lost its
endpoints no longer starts a process nothing reaches.
- Init resets the gRPC and Connect ports and addresses with the HTTP ones, so
a reload that drops an endpoint cannot leave Start binding or waiting on it.
The gRPC-only readiness path is now tested through Init and Start.
- The Dockerfile of a service with no HTTP endpoint starts uvicorn on a
loopback port the system picks, as a native start does, instead of binding
0.0.0.0:8080. The goldens of an HTTP service are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
returnnil, fmt.Errorf("the app serves one HTTP listener, and the service declares %d HTTP endpoints (%s): keep one with api: rest or api: http", len(found), strings.Join(names, ", "))
205
205
}
206
206
207
+
// unservedError refuses a service nothing would serve: no HTTP endpoint, and
208
+
// no gRPC endpoint for a gRPC server to serve. A manifest that lost its
209
+
// endpoints would otherwise start a process nobody can reach, and Start would
210
+
// have nothing to wait on before it answered STARTED.
returnfmt.Errorf("nothing would serve this service: it declares no HTTP endpoint (api: rest or api: http) and no gRPC endpoint with %s.enabled", GRPCServer)
219
+
}
220
+
207
221
// connectSettingError refuses a Connect face with no gRPC server to transcode
208
222
// onto: the face serves the gRPC server's API, never one of its own.
0 commit comments