Repository navigation
chore: remove the shadow GAMMA export encoder and superseded SPIRE TLS helpers; deprecate the --readiness-check shims (#772) - #775
Merged
Conversation
…helpers (#772) Phase D1 of the 2026-09-15 review. Three removals, all unreachable from production, plus a deprecation warning on the two compat probe flags. agent/internal/xds/proxy/projection.go: delete ToConfigProjection, gammaRouteToProto and headerMutationToProto — a SECOND Go-struct -> proto encoder for GammaRoute shadowing common/gammaproject. The real exporter (registrar/internal/configexport/controller.go:151,169,210) builds *registryv1.GammaRoute via gammaproject.ProjectHTTPRule/ProjectGRPCRule and constructs the ServiceConfigProjection inline; it never called this. Its only caller was projection_test.go, whose round-trip read like a proposal-026 wire-format guard but exercised a path nobody takes: a field added to the projector would diverge from the importer's decoder with the test still green. projection_test.go is rewritten against the path that actually runs — the real gammaproject projector's proto, stamped into a ServiceConfigProjection the way applyDesired does, decoded by FromConfigProjection (what agent/internal/configimport/importer.go:139 calls), then materialised through BuildOutboundServiceVirtualHost so the decoded rules are asserted as Envoy routes. Adds a GRPCRoute case (ProjectGRPCRule) the old test had no equivalent of. FromConfigProjection/GammaRouteFromProto are unchanged and still the only decoder. agent/internal/edge/gatewayapi/attachment/refs.go: delete firstBackendService (U1000 with -tests=false; its production caller is gone, all 4 call sites were in attachment_test.go) with TestFirstBackendService and the now-unused backend() helper it was the last user of. test/envoy_validate/builders.go: delete externalHTTPSPort, the only `staticcheck -checks U1000` finding in the module. Http1ProtocolOptions, meshdns.NewServer and meshdns.WithInstanceID are deliberately left alone (report: keep / needs-check). The two `--readiness-check` compat flags stay functional (a chart predating #673/#683 probes with them) but are now cobra MarkDeprecated, so using one prints a warning naming the replacement prober. charts/ never sets either flag (grep: one comment in mesh-dns-daemonset.yaml, no --readiness-check argument), so no chart bump is needed and no warning can appear in production logs. docs/configuration.md records the new warning + help-hiding. Verification: bazel test //agent/internal/xds/proxy:proxy_test //agent/internal/edge/gatewayapi/attachment:attachment_test //agent/internal/cmd/... //agent/cmd/mesh-dns/... //test/envoy_validate/... -> 6/6 pass; bazel run //:gazelle (BUILD deps updated); bazel run //:format.check clean. Full-tree verification runs on the final commit. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
…elper (#772) Phase D2 of the 2026-09-15 review — the identity path, kept in its own commit. common/spire/tls.go: - NewSource: unreachable even from tests (`deadcode` with and without -test). Since #740 every binary builds its identity source through WaitingSource, which calls NewSourceWithTimeout(ctx, socket, 0) — an unbounded wait off the startup path — so the 25s-bounded blocking constructor has no caller left. - SourceTimeout: its only reader was NewSource. The 25s deadline existed to keep the blocking startup wait below the chart's liveness budget (#662); with the wait no longer on the startup path there is nothing left to bound. - ServerTLSConfig: superseded by ServerTLSConfigForOwnTrustDomain (#740), which resolves the peer trust domain at handshake time instead of at construction so a source that has no SVID yet can still build a server config. `grep -w ServerTLSConfig` found only its own declaration and doc comment. Verified first that nothing references them: no Go call sites (including common/spire/spiretest and every _test.go), no docs, no charts. The four remaining mentions were doc comments describing "the code this replaces" — agent/internal/cmd/root.go:344, plus the #740 regression tests in agent/internal/cmd/edge_identity_test.go, registrar/internal/cmd and controller/internal/cmd/spire_identity_test.go — rewritten to describe the old bounded blocking wait without naming symbols that no longer exist. The NewSourceWithTimeout doc absorbed what NewSource's said (socketPath forms) and now explains why a non-positive timeout is the live caller's choice. No behaviour change: nothing executed any of this. ClientTLSConfig and the shared authorizer() (the RootCATrustDomain sentinel path) are untouched. Verification (full bar, whole tree): bazel build //... //test/e2e:e2e_test OK; bazel test //... --test_output=errors -> 98/98 pass (incl. //common/spire:spire_test); bazel run //:format.check clean; bazel build --config=lint --@aspect_rules_lint//lint:fail_on_violation //... OK; bazel run //:gazelle and bazel mod tidy produce no churn; scripts/go-deps-audit.sh exit 0. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
bpalermo
added a commit
that referenced
this pull request
Sep 30, 2026
…lias, supervisor and mesh-dns --readiness-check (#1080) - Drop the `agent proxy-supervisor` alias (#772/#790) and the /proxy-ready layer on the agent image that only it read; the chart stages proxy-ready from the proxy-supervisor image. The agent image test now asserts /proxy-ready is absent, and a test pins the subcommand as retired. - Drop the supervisor's deprecated --readiness-check (#673/#775); replace TestDeprecatedFlagsStayRegistered with TestRetiredFlagsGone. - Drop mesh-dns's deprecated --readiness-check (#683), with a matching TestRetiredFlagsGone, and fix the stale meshdns.WithReadyMarker comment. - Update docs/configuration.md, CLAUDE.md, AGENTS.md and common/readymarker comments accordingly. charts/ is intentionally untouched. Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Phase D (D1 + D2) of #772.
chore(agent,test): delete the shadow GammaRoute encoder and two dead helpers (#772)
Phase D1 of the 2026-09-15 review. Three removals, all unreachable from
production, plus a deprecation warning on the two compat probe flags.
agent/internal/xds/proxy/projection.go: delete ToConfigProjection,
gammaRouteToProto and headerMutationToProto — a SECOND Go-struct -> proto
encoder for GammaRoute shadowing common/gammaproject. The real exporter
(registrar/internal/configexport/controller.go:151,169,210) builds
*registryv1.GammaRoute via gammaproject.ProjectHTTPRule/ProjectGRPCRule and
constructs the ServiceConfigProjection inline; it never called this. Its only
caller was projection_test.go, whose round-trip read like a proposal-026
wire-format guard but exercised a path nobody takes: a field added to the
projector would diverge from the importer's decoder with the test still green.
projection_test.go is rewritten against the path that actually runs — the real
gammaproject projector's proto, stamped into a ServiceConfigProjection the way
applyDesired does, decoded by FromConfigProjection (what
agent/internal/configimport/importer.go:139 calls), then materialised through
BuildOutboundServiceVirtualHost so the decoded rules are asserted as Envoy
routes. Adds a GRPCRoute case (ProjectGRPCRule) the old test had no equivalent
of. FromConfigProjection/GammaRouteFromProto are unchanged and still the only
decoder.
agent/internal/edge/gatewayapi/attachment/refs.go: delete firstBackendService
(U1000 with -tests=false; its production caller is gone, all 4 call sites were
in attachment_test.go) with TestFirstBackendService and the now-unused backend()
helper it was the last user of.
test/envoy_validate/builders.go: delete externalHTTPSPort, the only
staticcheck -checks U1000finding in the module.Http1ProtocolOptions, meshdns.NewServer and meshdns.WithInstanceID are
deliberately left alone (report: keep / needs-check).
The two
--readiness-checkcompat flags stay functional (a chart predating#673/#683 probes with them) but are now cobra MarkDeprecated, so using one
prints a warning naming the replacement prober. charts/ never sets either flag
(grep: one comment in mesh-dns-daemonset.yaml, no --readiness-check argument),
so no chart bump is needed and no warning can appear in production logs.
docs/configuration.md records the new warning + help-hiding.
Verification: bazel test //agent/internal/xds/proxy:proxy_test
//agent/internal/edge/gatewayapi/attachment:attachment_test //agent/internal/cmd/...
//agent/cmd/mesh-dns/... //test/envoy_validate/... -> 6/6 pass;
bazel run //:gazelle (BUILD deps updated); bazel run //:format.check clean.
Full-tree verification runs on the final commit.
chore(spire): delete the pre-#740 source constructor and server TLS helper (#772)
Phase D2 of the 2026-09-15 review — the identity path, kept in its own commit.
common/spire/tls.go:
deadcodewith and without -test).Since agent: startup is fatally coupled to the SPIRE Workload API — a 25 s SVID wait exits the process (2–4 restarts per node on every cold boot; #662 family) #740 every binary builds its identity source through WaitingSource,
which calls NewSourceWithTimeout(ctx, socket, 0) — an unbounded wait off the
startup path — so the 25s-bounded blocking constructor has no caller left.
keep the blocking startup wait below the chart's liveness budget (agent startup is fatally coupled to OTel export: a shedding collector crash-loops agents and takes out a node's xDS #662); with
the wait no longer on the startup path there is nothing left to bound.
resolves the peer trust domain at handshake time instead of at construction
so a source that has no SVID yet can still build a server config.
grep -w ServerTLSConfigfound only its own declaration and doc comment.Verified first that nothing references them: no Go call sites (including
common/spire/spiretest and every _test.go), no docs, no charts. The four
remaining mentions were doc comments describing "the code this replaces" —
agent/internal/cmd/root.go:344, plus the #740 regression tests in
agent/internal/cmd/edge_identity_test.go, registrar/internal/cmd and
controller/internal/cmd/spire_identity_test.go — rewritten to describe the old
bounded blocking wait without naming symbols that no longer exist. The
NewSourceWithTimeout doc absorbed what NewSource's said (socketPath forms) and
now explains why a non-positive timeout is the live caller's choice.
No behaviour change: nothing executed any of this. ClientTLSConfig and the
shared authorizer() (the RootCATrustDomain sentinel path) are untouched.
Verification (full bar, whole tree): bazel build //... //test/e2e:e2e_test OK;
bazel test //... --test_output=errors -> 98/98 pass (incl. //common/spire:spire_test);
bazel run //:format.check clean; bazel build --config=lint
--@aspect_rules_lint//lint:fail_on_violation //... OK; bazel run //:gazelle and
bazel mod tidy produce no churn; scripts/go-deps-audit.sh exit 0.
🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr