Repository navigation
refactor(common): split the Envoy-free gRPC server shell out of common/xds (registrar -2.55 MiB, -2 modules) - #1164
Merged
Merged
Conversation
bpalermo
force-pushed
the
refactor/grpcserver-split
branch
2 times, most recently
from
October 4, 2026 02:05
3dfed9c to
980093f
Compare
…n/xds so the registrar stops linking go-control-plane
common/xds held two things: the generic gRPC lifecycle shell (Server,
ServerConfig, ServerCallback, liveness/readiness, the bind gate) and the
Envoy xDS server (XdsServer). The registrar and the agent's CNI server only
embed the shell, but importing the package linked go-control-plane's
pkg/server and pkg/cache, the envoy service protos (ADS/LDS/CDS/EDS/RDS/SDS,
runtime, extension config), the cluster/listener/HCM/accesslog config protos
those pull, and the ratelimit module into the registrar.
The shell moves, unchanged, to common/grpcserver (git mv, history kept);
common/xds keeps XdsServer, which now embeds grpcserver.Server. The logger
name stays "xds" so existing log queries still match. Two read-only
accessors (GRPCServer, Config) replace the unexported-field reads the
XdsServer tests used to make from the same package.
Measured (bazel build, fastbuild, `go version -m` / stat):
registrar 60,274,892 -> 57,596,076 bytes (-2.55 MiB, -4.4%)
105 -> 103 modules (drops github.com/envoyproxy/go-control-plane
and .../ratelimit)
agent 68,869,868 -> 68,873,932 bytes (+4 KiB, the accessors)
`bazel query 'somepath(//registrar/cmd/registrar:registrar,
@com_github_envoyproxy_go_control_plane//...)'` is now empty. The
registrar still links go-control-plane/envoy protos via
common/gammaproject -> common/extensionfilter, which it needs.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
bpalermo
force-pushed
the
refactor/grpcserver-split
branch
from
October 4, 2026 03:00
3126fb0 to
aebbed1
Compare
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.
What
common/xdsheld two unrelated things:Server,ServerConfig,ServerCallback, liveness/readiness, the bind gate), andXdsServer).The registrar and the agent's CNI server embed only (1), but importing the package also linked (2)'s dependencies into the registrar: go-control-plane's
pkg/serverandpkg/cache, every envoy discovery service proto, the cluster/listener/HCM/accesslog config protos those pull, and theratelimitmodule.This PR moves (1), unchanged, to a new Envoy-free
common/grpcserver(renames, so history is kept).common/xdskeepsXdsServer, which now embedsgrpcserver.Server. It is a pure refactor:"xds", so existing log queries still match.GRPCServer(),Config()) replace the unexported-field reads theXdsServertests used to make from inside the same package. No test case was removed.CLAUDE.md, the runbook's race-gate example and the CI race "hot packages" list now namecommon/grpcserver. The CI list keepscommon/xdstoo.Measured
bazel build(fastbuild),stat+go version -m:github.com/envoyproxy/go-control-planeand.../ratelimitBefore this PR,
bazel query 'somepath(//registrar/cmd/registrar:registrar, @com_github_envoyproxy_go_control_plane//...)'wentregistrar/internal/server→common/xds→pkg/cache/v3. It is now empty. The 30 targets onlycommon/xdscontributed to the registrar's closure came from this query (11 go-control-planepkg/*, 16 envoy protos, 2 ratelimit):The registrar still links
go-control-plane/envoyprotos throughcommon/gammaproject→common/extensionfilter(cross-cluster config export), and it needs them.Checks
bazel test --config=race //common/grpcserver:all //common/xds:all //agent/internal/cni/server:all //agent/internal/xds/server:all //registrar/internal/server:all: 5/5 passbazel test //agent/cmd/... //registrar/... //agent/internal/cmd/... //common/...: 47/47 passbazel build //...: okbazel build --config=lint --@aspect_rules_lint//lint:fail_on_violationon the touched trees: cleanmake format-check: cleanFound by the dead-code / dependency audit (2026-10-03).
🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr