Repository navigation
chore: remove dead code surfaced by the improvement sweep - #614
Merged
Merged
Conversation
Verified via golang.org/x/tools/cmd/deadcode across all 7 main packages plus grep cross-checks (zero non-test references for every item): - attachment: firstBackendPort, firstBackendNamespace (edge Phase 1 leftovers; the live selection logic is in the projector) - gamma reconciler: backendServiceKey, backendPermitted (duplicates of the live copies in common/gammaproject and l4route) + serviceref import - proxy: EdgeGatewayListener struct (superseded by discrete params, 021), UDPServiceRoute (parked UDP data plane uses the map form), waypointTunnelChainName (name is built inline; drop the test's symmetry line) - cni: checkValidCNIConfig (istio-derived stub returning nil), function-local ctStateEstablishedRelated const (mask is hardcoded) - constants: DefaultEtcdKeyPrefix (stale AND misleading — the real default is registry/internal/etcd DefaultKeyPrefix "/aether/v1/regions") - telemetry: AttrNodeName/AttrClusterName/AttrServiceName (never emitted) - spire: Bridge.NodeSpiffeID getter (field stays; it is read internally) - agent --mesh-dns-upstream flag + Config.MeshDNSUpstream + doc row: orphaned by the mesh-DNS decouple (#578) — the daemon registers its own flag; the chart only passes it to the mesh-dns container Deletion-only (no behavior change); make gazelle dropped the stale gamma->serviceref BUILD dep. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01EioJVuoepwStjHoRLB52WR
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.
Summary
Dead-code cohort. Every deletion was verified two ways:
golang.org/x/tools/cmd/deadcodeacross all 7 main packages (includingagent/cmd/mesh-dnsandprober— omitting them produces ~70 false hits), then grep for zero non-test references. Deletion-only; −146 lines, no behavior change.attachment.firstBackendPort/firstBackendNamespacebackendServiceKey/backendPermitted(+servicerefimport)common/gammaprojectandl4routeproxy.EdgeGatewayListenerstructproxy.UDPServiceRoutemap[string][]L4BackendwaypointTunnelChainName(+ test symmetry line)"ew_" + fqdncheckValidCNIConfigreturn nilctStateEstablishedRelatedlocal constconstants.DefaultEtcdKeyPrefix/aether/v1/regionsinregistry/internal/etcdtelemetry.AttrNodeName/AttrClusterName/AttrServiceNamespire.Bridge.NodeSpiffeIDgetter--mesh-dns-upstreamflag +Config.MeshDNSUpstream+ doc rowFlag-removal note: the chart only passes
--mesh-dns-upstreamto the mesh-dns container (agent-daemonset.yamlmentions it in a comment only), so in-repo deployment is unaffected. Cobra hard-errors on unknown flags, so any out-of-tree agent manifest still passing it would crash-loop at startup — flagging since it's technically user-visible.Deliberately NOT deleted (test-only, judgment calls — say the word and they go too):
proxy.ToConfigProjection+ 2 helpers — the export half is production-dead (registrar's configexport builds protos directly); only a round-trip test uses it. Deleting means deletingprojection_test.go's round-trip too.attachment.firstBackendService— same family as the two deleted here, but it has dedicated tests.config.Http1ProtocolOptions,meshdns.NewServer,ddb.WithTableName,storage.MockStorage,registry/registrytest— legit test seams / symmetric API; keep.Zero whole files or packages were deletable — the tree is clean after all the refactor waves.
Testing
bazel run //:gazelle(dropped the stale gamma→serviceref BUILD dep) +bazel run //:formatbazel test --test_output=errors //...— 79/79 pass🤖 Generated with Claude Code
https://claude.ai/code/session_01EioJVuoepwStjHoRLB52WR