Repository navigation
refactor(registry): drop the DynamoDB backend (#760) - #764
Merged
Merged
Conversation
The dynamodb backend only ever implemented the base registry.Registry interface. Everything the registrar gained since June is etcd-only: watch-driven sync (ChangeNotifier, #174), the cross-cluster config plane (ConfigExporter/ConfigImporter, proposal 026), ServiceExporter, and the multi-region mirror (proposal 006). On DynamoDB the registrar fell back to the 5 s poll and config propagation did not work at all. The 2026-06-13 directive already ruled out global tables for multi-region, talos-main has been on etcd since rev 47, and the chart default is the zero-infra kubernetes backend. Supported backends are now kubernetes and etcd — the same shape as the Cloud Map removal (#150). Backend + Go code - Delete registry/internal/ddb/ (dynamodb.go, dynamodb_test.go, BUILD.bazel). - registry/backend/backend.go: drop the dynamodb case and the AWS config loading; error text is now "supported: kubernetes, etcd". ctx is unused by the two remaining constructors, so the parameter is kept but blanked. - registrar/internal/cmd: flag help + comments -> "kubernetes or etcd"; config_test's round-trip case switches to etcd. - common/constants: remove DefaultDynamoDBServiceTableName. registry.go held only the package doc afterwards, so it is renamed to doc.go. - Comment-only rewording: registry/registry.go, registry/registrytest, registry/registrarclient, registrar/internal/server/{server,sync}.go, agent/internal/cmd/root.go. Codegen - api/aether/registry/v1/service.proto: drop the proto/dynamo/v1 import and the (dynamo.v1.msg).key option. Edition stays 2023 (gRPC still caps there; never lower an edition). - api/aether/registry/v1/BUILD.bazel: drop the protoc-gen-dynamo proto dep and //bazel/go:go_dynamo from compilers. - Delete bazel/go:go_dynamo, the two root gazelle:resolve directives for proto/dynamo/v1, the go_dynamo entry in gazelle:go_proto_compilers, and the .pb.dynamo.go exclusion in bazel/lint/gocognit.bzl. - The api/aether/{agent,config}/v1 BUILD comments explaining why those packages avoid go_dynamo are moot; the per-package gazelle:go_proto_compilers directives they carried are now the root default, so both go with them. Dependencies - Removed direct: aws-sdk-go-v2, /config, /credentials, /feature/dynamodb/attributevalue, /service/dynamodb, pquerna/protoc-gen-dynamo, testcontainers-go/modules/dynamodb. - Removed indirect: aws-sdk-go-v2/{feature/ec2/imds, internal/configsources, internal/endpoints/v2, internal/ini, internal/v4a, service/dynamodbstreams, service/internal/accept-encoding, service/internal/endpoint-discovery, service/internal/presigned-url, service/signin, service/sso, service/ssooidc, service/sts}, aws/smithy-go, dave/jennifer, lyft/protoc-gen-star/v2 — and with it the pquerna protoc-gen-star fork replace directive. - klauspost/compress is KEPT (moby/go-archive needs it) but demoted to indirect. The Masterminds/sprig chain (semver, sprig, aokoli/goutils, huandu/xstrings, imdario/mergo) is KEPT: pseudomuto/protoc-gen-doc, the website API-doc generator, needs it. - bazel mod tidy dropped 8 use_repo(go_deps, ...) entries: the five AWS repos, com_github_klauspost_compress, com_github_pquerna_protoc_gen_dynamo, com_github_testcontainers_testcontainers_go_modules_dynamodb. - go.mod 251 -> 209 lines. go.sum is unchanged: pruning it needs `go mod tidy`, which is forbidden here and would additionally strip the repo's Bazel-only direct requires (protoc-gen-doc, protokit). The stale entries are inert. - The cel.dev/expr gazelle_override is unrelated (cel-go#1184) and stays. Chart (0.92.14 -> 0.92.16) - values.yaml: backend enum comment -> "kubernetes, etcd"; delete the registrar.aws block; reword the agent's AWS-credentials note. - registrar-serviceaccount.yaml: drop the IRSA eks.amazonaws.com/role-arn annotation block. - registrar-deployment.yaml: drop the AWS_REGION env block. Docs - docs/registry-backend-evolution.md: status line now lists kubernetes + etcd, section 3 is marked dropped, and a new dated section 5 records the removal and its rationale in the style of the Cloud Map entry. - docs/{runbook,getting-started,configuration}.md, README.md, AGENTS.md, CLAUDE.md: backend lists, AWS values, and protoc-gen-dynamo mentions. - docs/proposals/* left untouched (historical). Verification - bazel build //... green; bazel test //... 98/98 pass, including the etcd testcontainers integration test and the chart lint/template tests. - make format-check clean; bazel build --config=lint //... clean. - make gazelle idempotent (diff hash identical across two runs); bazel mod tidy idempotent. - scripts/check-chart-version-bump.sh origin/upgrade/go-1.27: 0.92.15 -> 0.92.16 OK. - The issue's grep gate returns only explainable hits: "writeRawState" and "withdraws" (substring false positives) and the edge Gateway TLS SECRET_PROVIDER_AWS_SECRETS_MANAGER enum, a reserved, not-implemented provider unrelated to the registry backend. Out of scope per the issue: the registrar's write-behind pending-shield and the out-of-repo AetherService table / IAM role cleanup. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
bpalermo
force-pushed
the
upgrade/drop-dynamodb
branch
from
September 12, 2026 22:13
b0a4b4c to
bc61c7b
Compare
This was referenced Sep 12, 2026
bpalermo
added a commit
that referenced
this pull request
Sep 13, 2026
…oval (#767) (#769) * chore(deps): add a repeatable Go dependency audit (#767) `go mod tidy` is structurally unusable in this repository: the generated proto packages `aethermesh.dev/api/aether/*/v1` exist only as Bazel outputs, so the Go tool fails with "no matching versions for query latest" on every import of them, and `go mod tidy -e` strips modules that only generated code or a BUILD file needs (which then breaks the `gazelle_override`s and `bazel mod tidy`). So drive the audit from the module graph and the Bazel graph instead: * stale go.sum modules = go.sum modules outside `go list -m all` (fatal); * direct requires with no Go import, no `@repo//` reference in any BUILD/.bzl file and no `tool` directive (fatal); * direct requires with no Go import that ARE Bazel-referenced and are not annotated `// bazel-only:` (warning) — the fix for a version pin is to reclassify it as indirect, never to delete it. `go list -m all` runs as a subprocess of `bazel run`, so `--repo_env` does not reach it; the script exports GOPROXY itself. Wired as `make deps-audit` and as a `deps-audit` job in ci.yaml (in the `ci` fan-in's needs). Deliberately cheap: `go list -m all` plus greps, no bazel build. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr * chore(deps): prune 27 stale modules from go.sum (#767) Every one of these modules is outside the module build list (`go list -m all`), i.e. nothing in go.mod can resolve to them any more — residue left by the DynamoDB removal (#764) and by earlier bumps that `bazel mod tidy` does not prune and `go mod tidy` cannot be run to prune: the whole aws-sdk-go-v2 tree, smithy-go, protoc-gen-dynamo, protoc-gen-star, jennifer, the dynamodb/localstack testcontainers modules, otelzap and kr/pty. -243 lines (1,458 -> 1,215), 277 -> 250 modules. Verified that nothing removed was needed: `go mod download` over all 318 modules of the build list succeeds and adds no line back, `bazel build //... //test/e2e:e2e_test` is green (gazelle's go_deps verifies every module it fetches against go.sum), `bazel test //...` is 98/98, and `bazel mod tidy` is a no-op. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr * chore(deps): drop the unused embedded-etcd modules (#767) `go.etcd.io/etcd/server/v3` and `go.etcd.io/raft/v3` came in with the original etcd backend (#20) for an embedded etcd server that was never used: neither is imported by any .go file and neither is reachable from `deps(//... + //test/e2e:e2e_test + //website:all)`. The registry backend and the testcontainers etcd module use only `client/v3` + `api/v3`, which stay. `go get <mod>@none` is NOT usable here: `@none` downgrades every module that requires the removed one, and k8s.io/[email protected] requires etcd/server/v3 — it took controller-runtime 0.25.0 -> 0.9.7, e2e-framework 0.7.0 -> 0.0.5 and apiextensions-apiserver -> 0.22.0-alpha.3 with it. `go mod edit -droprequire` removes the requirement without touching anyone's selected version, which is what is wanted. Also dropped the 22 indirect requires that existed only to satisfy those two (bbolt, etcd/pkg/v3, cmux, probing, grpc-websocket-proxy, golang-jwt/v5, groupcache, btree, go-humanize, gogo/protobuf, clockwork, afero, go-strcase, vtprotobuf, morikuni/aec, pkg/errors, google/cel-go, go-cmp, easyjson, intern, go-grpc-middleware v1 and its prometheus provider) — each verified absent from the Bazel build graph first — and the two now-dangling `go_deps.gazelle_override` blocks plus the `io_etcd_go_etcd_server_v3` `use_repo` entry, without which the go_deps extension fails with "Some gazelle_overrides did not target a Go module with a matching path". go.mod 207 -> 183 requires (75 -> 74 direct, 132 -> 109 indirect); the module build list 318 -> 295; go.sum 1,215 -> 1,189 lines after re-running the stale-module prune (18 more modules fell out of the graph). etcd/server/v3 itself stays in the build list at v3.7.0 as a transitive requirement of apiextensions-apiserver — it is simply no longer ours, and gazelle no longer generates a repository for it. Verified: `bazel build //... //test/e2e:e2e_test`, `bazel test //...` 98/98 (incl. //registry/internal/etcd:etcd_test and //website:site_test), `bazel run //:gazelle` no churn, `bazel mod tidy` idempotent, and `go mod download` over all 295 modules adds nothing back. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr * chore(deps): reclassify pinned-but-unimported requires as indirect (#767) 21 direct requires have no Go import anywhere in the repo, no BUILD/.bzl reference and no `tool` directive. They exist to force a CVE-clean version through MVS, so the rule is reclassify, never drop: the pin (and therefore the selected version) survives, only the directness changes. Moved to the indirect block: golang.org/x/crypto, golang.org/x/time, github.com/go-jose/go-jose/v4, github.com/go-openapi/swag and its 11 sub-modules, github.com/moby/spdystream, github.com/mxk/go-flowrate, github.com/vladimirvivien/gexe, github.com/zeebo/errs, github.com/blang/semver/v4 and k8s.io/component-base. Diffing the module/version pairs before and after (including after `bazel mod tidy`) shows the only change is the `// indirect` markers — not one version moved. Annotated, and kept direct: * buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go — `// bazel-only:`, it is only ever named by the `gazelle:resolve` directive in //BUILD.bazel; * github.com/uudashr/gocognit — `// bazel-only:`, the lint aspect's binary (//bazel/lint/linters.bzl); it is also a `tool` directive. The other two "Bazel-only" tools in #767, protoc-gen-doc and protokit, turn out to be genuine Go imports — //bazel/protodoc/main.go wraps them — so they are marked `// build tooling:` instead of `// bazel-only:`, which would have been untrue. `bazel mod tidy` then dropped the 21 corresponding `use_repo` entries: 75 -> 53. go.mod is 183 requires, 53 direct / 130 indirect. scripts/go-deps-audit.sh is now clean (exit 0) on the whole tree. Verified: `bazel build //... //test/e2e:e2e_test`, `bazel test //...` 98/98, `bazel run //:gazelle` no churn, `bazel mod tidy` idempotent, `make format-check`. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr * chore(deps): bump github.com/moby/go-archive to v0.3.3 (#767) Closes the one open Go Dependabot alert: GHSA-hfg8-hc9c-6c3h, high, `< 0.3.0`, reached indirectly through testcontainers-go. testcontainers-go v0.44.0 is the newest release and still pins go-archive v0.2.0, so there is no upstream bump to ride — the floor has to be raised here. * github.com/moby/go-archive v0.2.0 -> v0.3.3 (>= the 0.3.0 fix) * github.com/moby/sys/user v0.4.0 -> v0.4.1 (pulled by the above) `go get` marks what it fetches as a direct require; nothing imports go-archive, so it is put back in the indirect block — it is a pure MVS floor, the same shape as the other CVE pins, and leaving it direct would (rightly) fail scripts/go-deps-audit.sh. Verified: `bazel build //... //test/e2e:e2e_test`, `bazel test //...` 98/98 with //registry/internal/etcd:etcd_test and //registrar/internal/replicator:replicator_test actually re-executed (the testcontainers path changed), `bazel run //:gazelle` no churn, `bazel mod tidy` idempotent, `scripts/go-deps-audit.sh` exit 0. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr * docs: write down why `go mod tidy` is forbidden here (#767) A "Go dependency hygiene" subsection in the developer runbook: what `make deps-audit` reports and why it exists, why `go mod tidy` (and especially `go mod tidy -e`) cannot be trusted in this module, the reclassify-don't-drop rule for CVE version pins, why `go get` needs its `// indirect` marker put back by hand, why removals use `go mod edit -droprequire` rather than `go get <mod>@none`, and what a `// bazel-only:` annotation means. AGENTS.md and CLAUDE.md pointed at `make tidy` as the way to "update go.mod dependencies", which it is not — it syncs MODULE.bazel's use_repo. Both now say what it does, mention `make deps-audit`, and state the `go mod tidy` prohibition where an agent will actually read it. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr --------- Co-authored-by: Claude Fable 5.1 <[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.
Part 2/2 of the follow-up stack to the 2026-09-12 dependency upgrades: nogo → drop-dynamodb. Base:
upgrade/nogo. Implements #760.The dynamodb backend only ever implemented the base registry.Registry
interface. Everything the registrar gained since June is etcd-only:
watch-driven sync (ChangeNotifier, #174), the cross-cluster config plane
(ConfigExporter/ConfigImporter, proposal 026), ServiceExporter, and the
multi-region mirror (proposal 006). On DynamoDB the registrar fell back to
the 5 s poll and config propagation did not work at all. The 2026-06-13
directive already ruled out global tables for multi-region, talos-main has
been on etcd since rev 47, and the chart default is the zero-infra
kubernetes backend. Supported backends are now kubernetes and etcd — the
same shape as the Cloud Map removal (#150).
Backend + Go code
loading; error text is now "supported: kubernetes, etcd". ctx is unused by
the two remaining constructors, so the parameter is kept but blanked.
config_test's round-trip case switches to etcd.
only the package doc afterwards, so it is renamed to doc.go.
registry/registrarclient, registrar/internal/server/{server,sync}.go,
agent/internal/cmd/root.go.
Codegen
the (dynamo.v1.msg).key option. Edition stays 2023 (gRPC still caps there;
never lower an edition).
and //bazel/go:go_dynamo from compilers.
proto/dynamo/v1, the go_dynamo entry in gazelle:go_proto_compilers, and the
.pb.dynamo.go exclusion in bazel/lint/gocognit.bzl.
packages avoid go_dynamo are moot; the per-package
gazelle:go_proto_compilers directives they carried are now the root default,
so both go with them.
Dependencies
/feature/dynamodb/attributevalue, /service/dynamodb, pquerna/protoc-gen-dynamo,
testcontainers-go/modules/dynamodb.
internal/endpoints/v2, internal/ini, internal/v4a,
service/dynamodbstreams, service/internal/accept-encoding,
service/internal/endpoint-discovery, service/internal/presigned-url,
service/signin, service/sso, service/ssooidc, service/sts}, aws/smithy-go,
dave/jennifer, lyft/protoc-gen-star/v2 — and with it the pquerna
protoc-gen-star fork replace directive.
indirect. The Masterminds/sprig chain (semver, sprig, aokoli/goutils,
huandu/xstrings, imdario/mergo) is KEPT: pseudomuto/protoc-gen-doc, the
website API-doc generator, needs it.
repos, com_github_klauspost_compress, com_github_pquerna_protoc_gen_dynamo,
com_github_testcontainers_testcontainers_go_modules_dynamodb.
go mod tidy,which is forbidden here and would additionally strip the repo's Bazel-only
direct requires (protoc-gen-doc, protokit). The stale entries are inert.
Chart (0.92.14 -> 0.92.16)
registrar.aws block; reword the agent's AWS-credentials note.
annotation block.
Docs
section 3 is marked dropped, and a new dated section 5 records the removal
and its rationale in the style of the Cloud Map entry.
CLAUDE.md: backend lists, AWS values, and protoc-gen-dynamo mentions.
Verification
testcontainers integration test and the chart lint/template tests.
bazel mod tidy idempotent.
0.92.16 OK.
"withdraws" (substring false positives) and the edge Gateway TLS
SECRET_PROVIDER_AWS_SECRETS_MANAGER enum, a reserved, not-implemented
provider unrelated to the registry backend.
Out of scope per the issue: the registrar's write-behind pending-shield and
the out-of-repo AetherService table / IAM role cleanup.
Note: go.sum is left as-is (pruning it needs
go mod tidy, which this repo forbids because it would also strip the Bazel-only direct requires protoc-gen-doc/protokit); the stale entries are inert.Closes #760.
🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr