Skip to content

Drop the DynamoDB registry backend (stack follow-up to #747–#758) #760

Closed

Description

@bpalermo

Why

The dynamodb registry backend implements only the base registry.Registry interface (register / unregister / list). Everything the registrar has gained since June is etcd-only: watch-driven sync (ChangeNotifier, #174, the fix that closed the last-old-exit skew), the cross-cluster config plane (ConfigExporter / ConfigImporter, proposal 026), ServiceExporter, and the multi-region mirror (proposal 006). On DynamoDB the registrar is back to the 5 s poll and config propagation does not work at all. The 2026-06-13 directive already ruled out DynamoDB global tables for multi-region; talos-main has been on etcd since rev 47; the chart default is the zero-infra kubernetes backend. Nobody runs it, and it no longer meets the propagation-time requirement.

Removing it also deletes the largest single block of third-party code in the module: the AWS SDK (5 direct + ~14 indirect modules, 19 go.mod / 182 go.sum lines), smithy-go, protoc-gen-dynamo (a protoc-gen-star fork that ships legacy go_default_library BUILD files and is one of the two toolchains capping our protos at edition 2023), and the testcontainers dynamodb module with the DynamoDB Local integration test.

Supported backends after this: kubernetes and etcd. Same shape as the Cloud Map removal (#150).

Sequencing

One PR, opened only after the upgrade stack (#747–#758) has fully merged: #752 (AWS SDK bump) is mid-stack and a removal branch would conflict with it. #752 becomes throwaway but harmless.

Verified before planning: helm get values aether -n aether-system on talos-main carries no registrar.aws.* keys (only registryBackend: etcd + etcdEndpoints), so the chart-key removal does not touch the live release. Chart.yaml gets its patch bump as usual.

Plan (single PR, one commit per bullet is fine)

  1. Backend + Go code

    • Delete registry/internal/ddb/ (dynamodb.go, dynamodb_test.go, BUILD.bazel).
    • registry/backend/backend.go: drop the dynamodb case, the AWS config loading (awsCfg), and the doc comment; error text becomes supported: kubernetes, etcd.
    • registrar/internal/cmd/config.go:46,66, root.go:88,449: flag help + comments → kubernetes, etcd; config_test.go:105-107 switch the round-trip case to etcd.
    • common/constants/registry.go:14-15: remove DefaultDynamoDBServiceTableName.
    • Comment-only mentions to reword (no behaviour): registry/registry.go:3,56,99,133, registrar/internal/server/server.go:330, registrar/internal/server/sync.go:85, agent/internal/cmd/root.go:768, registry/registrytest/contract.go:2,27.
  2. Codegen

    • api/aether/registry/v1/service.proto: remove import "proto/dynamo/v1/dynamo.proto" and the option (dynamo.v1.msg).key = {...} block.
    • api/aether/registry/v1/BUILD.bazel: drop the @com_github_pquerna_protoc_gen_dynamo//proto/dynamo/v1:v1_proto dep and //bazel/go:go_dynamo from compilers.
    • Delete bazel/go:go_dynamo (bazel/go/BUILD.bazel) and the .pb.dynamo.go exclusion in bazel/lint/gocognit.bzl:69.
    • The comments in api/aether/agent/v1/BUILD.bazel and api/aether/config/v1/BUILD.bazel explaining why those packages avoid go_dynamo become moot — delete them.
    • Nothing is checked in: the *.pb.dynamo.go files are build outputs only.
  3. Dependencies (bazel run @rules_go//go -- get <mod>@none, then make tidy + make gazelle; never go mod tidy)

    • Direct: github.com/aws/aws-sdk-go-v2, /config, /credentials, /feature/dynamodb/attributevalue, /service/dynamodb, github.com/pquerna/protoc-gen-dynamo, github.com/testcontainers/testcontainers-go/modules/dynamodb.
    • Expect tidy to drop the indirect AWS sub-modules, smithy-go, dave/jennifer, lyft/protoc-gen-star/v2, klauspost/compress (if only protozstd pulled it; verify), and the matching use_repo(go_deps, …) entries in MODULE.bazel.
    • Check whether the go_deps.gazelle_override for cel.dev/expr and the edition-2023 cap in api/buf.yaml / proto headers were justified by protoc-gen-dynamo alone; if the gRPC toolchain still caps at 2023, leave the cap and just fix the comment (feedback_proto_edition_2024 rule: never proto3).
  4. Chart (+ charts/aether/Chart.yaml patch bump)

    • values.yaml:610-611,637-643: backend enum comment → kubernetes, etcd; delete the registrar.aws block.
    • templates/registrar-serviceaccount.yaml:8-13: drop the IRSA eks.amazonaws.com/role-arn annotation block.
    • templates/registrar-deployment.yaml:107-110: drop the AWS_REGION env block.
    • values.yaml:299-300 (agent): reword the "AWS is used only by the registrar's dynamodb backend" note.
  5. Docs

    • docs/registry-backend-evolution.md: update the status line (supported backends) and add a "DynamoDB removed" section with this rationale, like the Cloud Map entry.
    • docs/runbook.md, docs/getting-started.md, docs/configuration.md: remove the backend option and AWS values.
    • Proposals 000/006/015/024/031 are historical; leave them untouched.
    • AGENTS.md / CLAUDE.md: "Service registry interface with DynamoDB … and etcd" → kubernetes + etcd; drop the protoc-gen-dynamo mentions.
  6. Verification bar

    • bazel build //..., bazel test //... (the etcd testcontainers test still runs; the dynamodb one is gone), make format-check, make lint, make gazelle no churn, bazel mod tidy idempotent.
    • grep -rn -i 'dynamo\|aws' --include='*.go' --include='*.bzl' --include='*.bazel' --include='*.proto' --include='*.yaml' . returns nothing outside docs/proposals/.
    • Chart: //charts/aether:*_lint_test / *_template_test green; scripts/check-chart-version-bump.sh.
    • Deploy: normal publish → helm upgrade with helm get values -o yaml as -f (never --reuse-values); registrar rolls hitless (watch-driven etcd sync unchanged).

Explicitly out of scope

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions