Repository navigation
fix: refuse a service nothing serves; reset every listener at Init; no HTTP in a listener-less image - #115
Merged
Conversation
…o 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>
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-ups to #113 from its review (r76). Each one is a fix in the agent that owns the behaviour.
api: rest/api: http) and no gRPC endpoint forgrpc-serverto serve. Builder and runtime Load both returnnothing would serve this service: …(Service.unservedError). Before, a manifest that lost its endpoints loaded, and Start launched a process with nothing to wait on.TestGRPCOnlyStartWaitsOnTheGRPCServerdrives Init and Start for a gRPC-only service and checks that readiness waits on the address Init resolved.TestInitDropsTheListenersAReloadRemovedruns Init with a Connect face, then again without it. Start then waits on gRPC only, and the process gets noCODEFLY_CONNECT_PORT.127.0.0.1with port0, as a native start does, instead of0.0.0.0:8080(DockerTemplating.NoHTTPEndpoint). An HTTP service's Dockerfile is byte-identical: the existing goldens pass unchanged.TestImageServesNoHTTPWithoutAnHTTPEndpointchecks the new case.Each new test fails with its line removed. I checked this for the gRPC address store, the Connect reset, and the builder and runtime refusals, one at a time.
Reused: core's
FindEndpointsByAPI, the existing Init/Start fakes, the recipe and golden helpers, and #113's mapping helper. Nothing new beyond the three checks.Checks
go build,go vet,gofmt,go mod tidy -diff,go test ./...(Docker and uv tests included) andgo test -race -short ./....TestConnectOnlyServiceStartsonce, from fix: a service whose faces are gRPC and Connect alone loads, syncs and starts #113, and I did not capture why. It passed 6 of 6 runs in isolation and on a full-suite rerun, so I could not reproduce it.🤖 Generated with Claude Code