Skip to content

feat(global-router): add a DynamoDB registration store to the Global Discovery Service - #17691

Merged
atchernych merged 19 commits into
mainfrom
estroz/gds-dynamodb-store
Nov 5, 2026
Merged

atchernych merged 19 commits into
mainfrom
estroz/gds-dynamodb-store

Conversation

@estroz

@estroz estroz commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Adds --registration-storage dynamodb to the Global Discovery Service as an alternative to memory for --pool-discovery registrations. Registrations live in one DynamoDB table that any number of service replicas share, in one region or across regions through a Global Table. The service survives restarts, every replica serves the same pool list, and GET /pools reports complete: true from the first read, since Completeness::Exact is defined as "read from a shared store".

The HTTP contract does not change. POST /pools still answers the configured Lease, GET /pools lists live pools, GET /routers comes from --router. The memory store stays the default.

Design: lib/global-discovery-service/docs/dynamodb-store.md.

Key Changes

  • Add backends::dynamodb::DynamoDbPoolStore implementing PoolRegistrar and Directory<PoolListing, PoolKey>: one item per pool key (pk = "pool", sk = <cluster>#<namespace>#<dgd> with \# and \\ escaping); register is one unconditional UpdateItem (last writer wins, as with the memory store); list is a paginated Query that drops expired items at read time on the reader's clock with --lease-skew-secs; list_and_watch polls the table and diffs, with local writes published immediately; every SDK error maps to DiscoveryError::Unavailable (503).
  • Add backends::clock::{Clock, SystemClock, ManualClock} so lease expiry is testable without wall-clock waits.
  • Add flags under the registrations heading: --dynamodb-table, --dynamodb-region, --dynamodb-endpoint, --dynamodb-poll-interval-secs (default 2), --dynamodb-ensure-table, --lease-skew-secs (default 2). They are rejected with the memory store; the poll interval must be below the heartbeat; a missing table without --dynamodb-ensure-table fails at startup with the create-table and update-time-to-live commands to run.
  • The TTL attribute expires_at is garbage collection only (last renewal plus 7 days); the lease is never expired by the store.
  • Dependencies: aws-sdk-dynamodb 1.105.0 and aws-config 1.8.14 (already locked) as workspace dependencies, with default-features = false and the smithy default HTTPS client to avoid the legacy hyper 0.14 and rustls 0.21 path; blake3 for the change hash; serde_json moves from dev-dependencies to dependencies. No version bumps in Cargo.lock.
  • Tests: a conformance suite written once and run against both stores (tests/common, tests/memory_conformance.rs); dynamodb-local integration tests (tests/dynamodb_store.rs, tests/http_dynamodb.rs) gated by GDS_TEST_DYNAMODB_ENDPOINT against an existing DynamoDB Local instance; unit tests for key escaping, codec, liveness and the CLI.
  • Docs: a crate README.md; docs-site pages kubernetes/kv-aware-routing/global-discovery-service-storage.md (table creation, IAM, deployment, operations) and reference/components/global-discovery-service-configuration.md (every flag, endpoints, item layout); code ownership under global-router.

Validation

In the pinned rust:1.96.1-trixie image (the crate's dependency tree does not build natively on macOS):

  • cargo fmt --check, cargo clippy --tests -D warnings: clean.
  • cargo test -p dynamo-global-discovery-service with dynamodb-local: lib 64 passed, bin 10 passed, dynamodb_store 19 passed, http_dynamodb 1 passed, memory_conformance 8 passed. Without the endpoint variable the DynamoDB suites skip and report why.
  • Manual: a missing table exits with the create-table commands; --dynamodb-ensure-table creates it; POST /pools on replica A then GET /pools on replica B returns the pool with complete: true; /healthz 200.
  • Docs: docs_lint.py 0 errors, fern check 0 errors, fern docs broken-links passes; build_codeowners.py --strict 100 percent owned, emit_codeowners.py no drift.

Not run: the GitHub workflow jobs (needs a maintainer's /ok to test <sha>), and a real AWS Global Table (the multi-region behaviour is argued in the design doc from DynamoDB's documented last-writer-wins; the integration tests cover one dynamodb-local).

Issues and Ongoing Work

Pull Request Checklist
  • I used Dynamo's /pr-checklist skill.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added a Global Discovery Service for pool registration and discovery, with in-memory or DynamoDB-backed storage and Kubernetes Karmada or MCS discovery options.
    • Added HTTP endpoints for registration, pool and router listings, and health checks, with optional TLS.
    • Added service deployment options for Kubernetes, including a DynamoDB-backed configuration.
    • HTTP services now support graceful shutdown and expose request lifecycle and load information.
  • Documentation
    • Added setup, configuration, and operational guides for the Global Discovery Service and its storage options.

@github-actions github-actions Bot added feat documentation Improvements or additions to documentation container labels Oct 30, 2026
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

@devin-ai-integration

Copy link
Copy Markdown
Contributor

❌ Dynamo PR CI failed — run 41089691909 (attempt 1) on ca8d3f7665

Gate checks: ❌ backend-status-check · ❌ deploy-status-check · ❌ dynamo-status-check

Other Jobs
changed-files ❌ 1

Failure details

1 job failed: the changed-files filter-coverage check rejected container/global-discovery-service-dynamodb.yaml because no CI filter covers it, so all downstream jobs were skipped.

❌ changed-files: file not covered by any CI filter

Job: changed-files · Failed step: Check for changes · Logs: gh run view --job 124180032015 -R ai-dynamo/dynamo --log-failed

##[error]The following files are not covered by any CI filter:
"container/global-discovery-service-dynamodb.yaml"
Add these paths to .github/filters.yaml. See .github/FILTERS.md.
##[error]Process completed with exit code 1.

The report.py coverage check in .github/actions/changed-files requires every modified file to match a filter in .github/filters.yaml; the new container/global-discovery-service-dynamodb.yaml matches none. Adding that path (or a matching glob) to an appropriate filter in .github/filters.yaml (see .github/FILTERS.md) should clear this; the other 56 jobs were skipped as a result, not run.

For agents
{"pr": 17691, "run_id": 41089691909, "run_attempt": 1, "head_sha": "ca8d3f766517ad945d8272e030f8b7321d067609",
 "failures": [{"job": "changed-files", "job_id": 124180032015, "failed_step": "Check for changes", "signature": "File not covered by any CI filter: container/global-discovery-service-dynamodb.yaml (add to .github/filters.yaml)", "tests": [], "log_cmd": "gh run view --job 124180032015 -R ai-dynamo/dynamo --log-failed"}]}

Posted automatically by Devin for run 41089691909. Updated on every full-CI run of this PR.

@sachalmalick
sachalmalick marked this pull request as ready for review October 31, 2026 00:39
@sachalmalick
sachalmalick requested review from a team as code owners October 31, 2026 00:39
Base automatically changed from atchernych/global-discovery-http to main November 2, 2026 21:59
@estroz
estroz requested review from a team as code owners November 2, 2026 21:59
@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Walkthrough

The change adds a Global Discovery Service with memory, Kubernetes EndpointSlice, and DynamoDB backends. It adds HTTP routes, deployment manifests, operational documentation, and tests. It also adds an HTTP server library with lifecycle, TLS, shutdown, load-reporting, and connection-timeout support.

Changes

Global Discovery Service

Layer / File(s) Summary
HTTP server lifecycle and transport
Cargo.toml, lib/http-server/*
The workspace adds dynamo-http-server. The library adds HTTP and TLS serving, graceful shutdown, request lifecycle tracking, disconnect monitoring, load-report types, request helpers, and write deadlines.
Discovery contracts, HTTP API, and CLI
lib/global-discovery-service/Cargo.toml, lib/global-discovery-service/src/lib.rs, lib/global-discovery-service/src/pool_discovery/*, lib/global-discovery-service/src/service.rs, lib/global-discovery-service/src/main.rs
The service defines registration and directory interfaces, serves pool, router, and health endpoints, and validates CLI options for discovery and storage modes.
Memory store and discovery watch streams
lib/global-discovery-service/src/backends/clock.rs, lib/global-discovery-service/src/backends/memory.rs, lib/global-discovery-service/src/backends/stream.rs, lib/global-discovery-service/tests/common/*, lib/global-discovery-service/tests/memory_conformance.rs
The memory store manages registrations and lease expiry. Watch streams provide snapshots and resynchronization. Shared conformance tests cover registration, renewal, expiry, and completeness.
Kubernetes MCS discovery
lib/global-discovery-service/src/backends/kubernetes/*, lib/global-discovery-service/src/main.rs
The backend builds pool listings and router replicas from Standard MCS and Karmada EndpointSlices. It maintains a shared cache and reports completeness as watches fail and recover.
DynamoDB registration storage
Cargo.toml, lib/global-discovery-service/src/backends/dynamodb*, lib/global-discovery-service/src/main.rs, lib/global-discovery-service/scripts/dynamodb-local.sh, lib/global-discovery-service/tests/*dynamodb*
The backend stores and queries registrations, applies lease and skew checks, validates table setup, and polls for changes. Tests cover the store and its HTTP integration.
Container and Kubernetes deployment
container/*global-discovery-service*, .github/codeowners/areas.yaml, CODEOWNERS
The change adds a service image and manifests for EndpointSlice and DynamoDB deployments. Ownership rules cover the service, manifests, documentation, and shared paths.
Service and storage documentation
lib/global-discovery-service/README.md, lib/global-discovery-service/docs/*, docs/fern/index.yml, docs/fern/pages/kubernetes/kv-aware-routing/*, docs/fern/pages/reference/components/*
The new pages describe service modes, HTTP behavior, DynamoDB configuration, table and IAM requirements, lease semantics, and operations.

Estimated code review effort: 5 (Critical) | ~120 minutes

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 52.99% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly identifies the primary change: adding a DynamoDB registration store to the Global Discovery Service.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description follows the repository template in structure. It has Overview, Key Changes, Validation, and Issues and Ongoing Work sections, plus the checklist. It explains the feature, the flags, th…
Full details: Description check

Explanation

The description follows the repository template in structure. It has Overview, Key Changes, Validation, and Issues and Ongoing Work sections, plus the checklist. It explains the feature, the flags, the dependency choices, and how it was tested. The Issues section does not contain a closing reference such as "Closes #XXXX". It links related work with "Relates to #17371" and "#17601" instead. The template marks this link as advisory today and required when release/1.7.0 is cut. The pull request checklist item is unchecked.

Full details: Docstring Coverage

Explanation

Docstring coverage is 52.99% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 134 functions across 34 files. (13 skipped: 13 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Review coverage is incomplete: 1 file could not be fully reviewed. Findings from completed review steps are included; see review info for details.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between b751c95 and ca8d3f7.

Files ignored due to path filters: 1
  • Cargo.lock is excluded by !**/*.lock
Files selected for processing: 48
  • .github/codeowners/areas.yaml
  • CODEOWNERS
  • Cargo.toml
  • container/Dockerfile.global-discovery-service
  • container/global-discovery-service-dynamodb.yaml
  • container/global-discovery-service.yaml
  • docs/fern/index.yml
  • docs/fern/pages/kubernetes/kv-aware-routing/global-discovery-service-storage.md
  • docs/fern/pages/reference/components/global-discovery-service-configuration.md
  • lib/global-discovery-service/Cargo.toml
  • lib/global-discovery-service/README.md
  • lib/global-discovery-service/docs/dynamodb-store.md
  • lib/global-discovery-service/scripts/dynamodb-local.sh
  • lib/global-discovery-service/src/backends.rs
  • lib/global-discovery-service/src/backends/clock.rs
  • lib/global-discovery-service/src/backends/dynamodb.rs
  • lib/global-discovery-service/src/backends/dynamodb/codec.rs
  • lib/global-discovery-service/src/backends/dynamodb/keys.rs
  • lib/global-discovery-service/src/backends/dynamodb/table.rs
  • lib/global-discovery-service/src/backends/kubernetes.rs
  • lib/global-discovery-service/src/backends/kubernetes/cache.rs
  • lib/global-discovery-service/src/backends/kubernetes/endpoints.rs
  • lib/global-discovery-service/src/backends/kubernetes/hub.rs
  • lib/global-discovery-service/src/backends/kubernetes/mcs.rs
  • lib/global-discovery-service/src/backends/memory.rs
  • lib/global-discovery-service/src/backends/stream.rs
  • lib/global-discovery-service/src/lib.rs
  • lib/global-discovery-service/src/main.rs
  • lib/global-discovery-service/src/pool_discovery.rs
  • lib/global-discovery-service/src/pool_discovery/pools.rs
  • lib/global-discovery-service/src/pool_discovery/registrar.rs
  • lib/global-discovery-service/src/pool_discovery/replicas.rs
  • lib/global-discovery-service/src/pool_discovery/watch.rs
  • lib/global-discovery-service/src/service.rs
  • lib/global-discovery-service/tests/common/dynamodb.rs
  • lib/global-discovery-service/tests/common/mod.rs
  • lib/global-discovery-service/tests/dynamodb_store.rs
  • lib/global-discovery-service/tests/http_dynamodb.rs
  • lib/global-discovery-service/tests/memory_conformance.rs
  • lib/http-server/Cargo.toml
  • lib/http-server/src/disconnect.rs
  • lib/http-server/src/lib.rs
  • lib/http-server/src/lifecycle.rs
  • lib/http-server/src/load.rs
  • lib/http-server/src/metrics.rs
  • lib/http-server/src/request.rs
  • lib/http-server/src/server.rs
  • lib/http-server/src/write_timeout.rs
Files not fully reviewed because their changes were unavailable: 1
  • lib/http-server/src/metrics.rs

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 2 remain after this review.

@coderabbitai coderabbitai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Fix comments: Fix CodeRabbit comments on this PR

…Discovery Service

Adds `--registration-storage dynamodb` as an alternative to `memory` for
`--pool-discovery registrations`. Registrations live in one DynamoDB
table that any number of service replicas share, in one region or across
regions through a Global Table, so the service survives restarts and
lists `complete: true` from its first read.

One item per pool key; `register` is one unconditional UpdateItem
(last writer wins, as with the memory store); leases are evaluated at
read time on the reader's clock with a skew allowance; the TTL attribute
is garbage collection only; `list_and_watch` polls the table and diffs.
Six new flags under the registrations heading, a `Clock` abstraction for
deterministic tests, a conformance suite shared with the memory store,
dynamodb-local integration tests gated by GDS_TEST_DYNAMODB_ENDPOINT, a
crate README, a design doc, two docs-site pages, an example manifest and
code ownership.

Relates to #17371

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Eric Stroczynski <[email protected]>
@sachalmalick
sachalmalick force-pushed the estroz/gds-dynamodb-store branch from ca8d3f7 to 4e7eb76 Compare November 3, 2026 19:57
@copy-pr-bot

copy-pr-bot Bot commented Nov 3, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@nnshah1 nnshah1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving: this is opt-in behind --registration-storage dynamodb, the memory store stays the default,
and the HTTP contract is unchanged. Thanks for the clock abstraction and the conformance tests.

Six comments inline. F1–F3 (P1/P2) are about what complete: true promises a router; F4–F6 (P3) are
cost and churn issues that should be small to fix. None block merge, but F1 should land before the Global Frontend trusts complete (the pools-as-workers stack in DEP #17638
depends on it). Findings come from reading the code, not from a run against a real table.

Not inline: CI changed-files fails because container/global-discovery-service-dynamodb.yaml is not
in .github/filters.yaml.

@atchernych atchernych left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes for one thing: DynamoDB storage has to work with --pool-discovery karmada and mcs too (inline comment). More comments will follow as plain comments, not blocking.

@atchernych atchernych left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The places that tie the DynamoDB flags to --pool-discovery registrations, file by file. They go with the blocking comment on line 26 of the configuration page.

Comment thread lib/global-discovery-service/README.md Resolved

@atchernych atchernych left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking findings from a review of 4e7eb76, separate from the DynamoDB-with-Karmada comment. I left out what the F1–F6 comments and CodeRabbit already cover.

  • CI hasn't built or tested this code yet. changed-files fails because .github/filters.yaml doesn't cover container/global-discovery-service-dynamodb.yaml (CodeRabbit's comment on that file), so pre-merge-status-check fails and rust-tests, clippy and the docs checks were skipped. The lychee failure is a dead link in the v1.4.0 release notes, not this PR.
  • Adding to F3: the readiness probe also keeps the default timeoutSeconds: 1, so a Query that takes more than a second fails readiness even when it succeeds.

atchernych and others added 3 commits November 4, 2026 09:20
… pool discovery mode

The DynamoDB flags were under the `With --pool-discovery registrations`
heading, so `parse_args` refused them with `karmada` and `mcs`, and Karmada
could not use DynamoDB at all, although `mcs_backend` already builds its
store with `registration_storage()`. They now have their own heading,
`With --registration-storage dynamodb`, which `parse_args` checks only
against the storage. The docs list them in their own section, say the store
works in every mode, and show a Karmada example.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Anna Tchernych <[email protected]>
…moDB table check

`connect` made DynamoDB calls before the SIGTERM handler was installed, and
it can wait up to 300 s for a table that is being created. As PID 1, the
process ignored SIGTERM until then, so Kubernetes killed it at the end of the
grace period. The handler is now installed first, and startup is raced
against it.

A short DynamoDB or STS outage at startup also exited the process, leaving
the Pod in CrashLoopBackOff after the table was back. `connect` now tells a
configuration that cannot work (`ConnectError::Config`, such as no AWS
region) from a table that cannot be checked yet (`ConnectError::Table`),
and the binary retries the latter with kube's `DefaultBackoff`. Nothing
listens until it succeeds, so the Pod stays unready meanwhile.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Anna Tchernych <[email protected]>
`--dynamodb-endpoint dynamodb-local:8000` parsed, with `dynamodb-local` as
the URL scheme, and failed only inside the SDK. It now needs an http or
https URL, as `--router` does. An empty `--dynamodb-table` or
`--dynamodb-region` is a usage error too; an empty region passed the "no
AWS region" check.

The poll interval check refused setups for a poller that never runs: with
`--pool-discovery registrations` the service only lists and registers, and
with `--heartbeat-interval-secs 1` no interval passed. It now applies only
with `karmada` and `mcs`, whose join with MCS watches the table, and as a
usage error from `parse_args` instead of an exit without usage text.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Anna Tchernych <[email protected]>
atchernych and others added 4 commits November 4, 2026 10:36
…able replication lags

With a DynamoDB Global Table, each region's replica gets the other regions'
writes asynchronously. When replication fell behind by more than the lease
and the skew, a service replica saw an old `renewed_at` for a pool that
still heartbeated in another region, dropped it as expired, and called the
list `Exact`, so a router that trusts `complete` dropped a live pool until
replication caught up.

Each registration now records the region of the table replica it was
written through (`written_in`). A reader keeps a pool written through
another region listed for `--dynamodb-replication-grace-secs` (default 60)
past its lease and the skew, and lists are `Estimated` while any pool is
listed that way, so routers keep it without being told the list is
complete. Past the grace the pool is dropped, which bounds how long a pool
that really stopped stays listed. A pool written through the reader's own
region, or an item written before this change, follows its lease alone. 0
turns the grace off.

The design doc no longer says that a registration is at most one heartbeat
old across regions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Anna Tchernych <[email protected]>
Every `GET /pools` paged the whole `pk = "pool"` partition, though each
replica already keeps a view of the table that its poller refreshes. Read
cost grew with clients times pools instead of replicas times pools per poll
interval, and every request was exposed to throttling.

`list()` now answers from that view, as the watch does. The first call
reads the table and starts the poller, so the table is read only before the
first poll. Reads leave out a pool whose lease lapsed since the last poll at
once, and say `Estimated` while a call to the table has failed or a pool
from another region is listed on trust. A pool registered through another
replica shows within a poll interval, and during an outage `GET /pools`
keeps answering from the last view, with `complete: false`.

Since lists in every mode now come from polls, the poll interval check is
the one that keeps a live pool listed between polls, in every mode: poll
interval plus heartbeat interval less than lease plus skew. It replaces the
check that the poll interval is below the heartbeat interval with `karmada`
or `mcs`, and a 1 s heartbeat works again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Anna Tchernych <[email protected]>
… registrations

Several PoolRelays may register one pool, and the last write wins. If their
registrations differ, for example in the frontends each relay sees or the
capacity it counts, the pool's item switches between their versions at
every heartbeat, and every replica's watchers see the pool change at almost
every poll. Lists in another order were already the same registration,
since `register` sorts and deduplicates them before it hashes.

The DynamoDB store now warns, once per pool, when a pool's changes go back
to the version before twice in a row, naming the pool, so such relays are
easy to find. A single change and its rollback is not flagged. The docs say
that the PoolRelays of one pool must send the same registration.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Anna Tchernych <[email protected]>
…kew and grace, and correct the API docs

- The pool `Query` uses strongly consistent reads. An eventually consistent
  read could return an item older than one the replica already had, so a
  poll could undo a registration this replica just stored, and watchers saw
  the pool change back and forth. Other regions' writes still arrive by
  replication.
- `--lease-skew-secs` and `--dynamodb-replication-grace-secs` are at most a
  day. Far larger values added up to the end of time, so a pool that
  stopped stayed listed for good.
- The configuration reference no longer says that every body is JSON
  (errors are plain text, and `/healthz` has no body), and says what
  `complete` does not promise. The storage guide says to keep `POST /pools`
  on a trusted network.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Anna Tchernych <[email protected]>
@atchernych
atchernych enabled auto-merge (squash) November 4, 2026 19:20

@nnshah1 nnshah1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved - assuming threads from others are resolved as well.

@sachalmalick

Copy link
Copy Markdown
Contributor

/ok to test 5d144bd

@dmitry-tokarev-nv dmitry-tokarev-nv left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This review read head 5d144bd198f387cb612a8ad84422f66c42e3706e. No P0 or P1 found. There are two P3 findings: one inline and one in this body.

  • [P3] .github/filters.yaml:140 now says "example manifests", but this head has one example manifest. See the inline comment.
  • [P3] Seven statements in the PR description do not match this head. Please update them. The list is below.

Open items that are not findings of this review:

  • The open thread on dynamodb.rs:286 holds. This review measured it with DynamoDB polls that hang. A tested fix is in a reply on that thread.
  • The full PR workflow for this head started at 22:17Z, at the request of a maintainer, and is still running. main requires its backend-status-check, dynamo-status-check and deploy-status-check.
Why each new head of this PR needs a maintainer to start CI.

Commits 4e7eb768ad and 5d144bd198 have no valid GitHub signature (bad_email). For such a PR, copy-pr-bot asks for more validation before CI runs, as its comment of 2026-11-03 says.

The PR description and this head disagree in seven places.
The description says This head
"this PR targets its branch because the service lives there" #17371 merged on 2026-11-02, and the base of this PR is main.
"aws-sdk-dynamodb 1.105.0 and aws-config 1.8.14 (already locked)" Only aws-config was in a lock file. aws-sdk-dynamodb 1.105.0 is new in Cargo.lock. "No version bumps" is true.
"lib 64 passed, bin 10 passed, dynamodb_store 19 passed" lib 95, bin 18 and dynamodb_store 21. The counts for http_dynamodb and memory_conformance match.
"fails at startup with the create-table and update-time-to-live commands" The service logs the commands and tries again. Nothing listens until the table exists.
"a missing table exits with the create-table commands" In a test with no table, the process still ran after 6 s and logged 4 retries.
"Add flags under the registrations heading" The flags have their own heading, "With --registration-storage dynamodb". The list leaves out --dynamodb-replication-grace-secs.
"list is a paginated Query" and "every SDK error maps to DiscoveryError::Unavailable (503)" list answers from the view that the poller keeps. A sort key over 1,024 bytes gets 422 (DiscoveryError::Rejected).
Measured: the open thread on dynamodb.rs:286 holds, and the fix in the reply closes it.

The test used DynamoDB Local 2.6.0 and two replicas of the service. Replica A wrote to DynamoDB Local directly. Replica B read through a TCP proxy. On a signal, the proxy stopped forwarding, so the polls of B hung without an error. A client renewed one pool through replica A every 5 s, and each renewal returned 200. The test read GET /pools from replica B every 0.25 s. In the table, t is the time after the hang started.

Run Samples from B with no pools and "complete": true B shows "complete": false from
5d144bd198, hang 11 of 98, t = 12.94 s to 15.59 s t = 15.85 s
3f2962e5ed, hang 3 of 93, t = 15.09 s to 15.65 s t = 15.93 s
3f2962e5ed, hang 11 of 95, t = 12.93 s to 15.69 s t = 15.97 s
3f2962e5ed, no hang 0 of 95. All samples list the pool. never
5d144bd198 with the fix, hang 0 of 99 t = 13.24 s. The pool lapses at that time.

Before complete changed, replica B logged operation timeout (all attempts including retries) occurred after 15s.

Measured: dependencies, ownership, tests, CI coverage and a merge with main.
  • Cargo.lock adds one package, aws-sdk-dynamodb 1.105.0 from crates.io. It removes none and changes no version. aws-smithy-types 1.4.4 gains futures-core, tokio and tokio-util through its rt-tokio feature.
  • cargo tree -p dynamo-global-discovery-service shows no hyper 0.14 and no rustls 0.21, for normal, build and dev edges on x86_64 and aarch64 Linux. The crate uses hyper 1.10.1 and rustls 0.23.45. As a control, the whole workspace with --all-features does show hyper 0.14.32, through reqwest 0.11.27.
  • cargo metadata --locked passes in ., lib/bindings/python, lib/runtime/examples and lib/bindings/kvbm on this head.
  • cargo deny check with all checks and --all-features gives the same 113 diagnostics on this head and on the merge base 23ff72cdac.
  • cargo machete finds no unused dependency. A planted unused dependency in this crate was found, so the tool covers it.
  • CODEOWNERS and CONTRIBUTORS.md regenerate byte for byte, and build_codeowners.py --strict passes. The two new docs pages belong to dynamo-global-router-codeowners.
  • All suites pass against DynamoDB Local 2.6.0 and 3.3.2: lib 95, bin 18, dynamodb_store 21, http_dynamodb 1 and memory_conformance 8. The merge base has lib 61 and bin 12.
  • In CI on the previous head, rust-tests (.) ran dynamodb_store and http_dynamodb in skip mode, in 0.06 s and 0.01 s. No CI job sets GDS_TEST_DYNAMODB_ENDPOINT.
  • Two deliberate breaks each fail tests. With no escape for \ in keys.rs, 5 lib tests and distinct_keys_are_distinct_pools fail. With no skew in codec::live_until_ms, 2 lib tests and a_pool_expires_once_the_lease_and_the_skew_have_passed fail.
  • A merge with main at 4ff9539ed9 has no conflict. The merged crate builds, and all suites pass against DynamoDB Local 2.6.0. In that merge, cargo metadata --locked fails only in lib/bindings/kvbm, with the same error as on main alone.
  • A merge with main at 29cb457e02 also has no conflict. Its only new commit changes 4 files under lib/mocker/servers, which this crate does not use.
  • The docs grant dynamodb:Query, dynamodb:UpdateItem and dynamodb:DescribeTable on one table ARN. The startup check uses only these three actions.
Not measured.
  • Real AWS: Global Table replication and IAM. DynamoDB Local ignores IAM, so the startup write check ran only against DynamoDB Local 2.6.0 and 3.3.2.
  • The image from container/Dockerfile.global-discovery-service.
  • The result of the full PR workflow, which is still running.

Comment thread .github/filters.yaml Resolved
atchernych and others added 2 commits November 4, 2026 14:53
…ynamoDB polls

A replica sees renewals made through other replicas only at its next
poll. While a poll hangs, a pool can lapse in the replica's view although
it still renews elsewhere, and the list dropped it while still saying
`complete: true`. The list is now `Estimated` while the view holds a pool
that lapsed since the last poll, and complete again once a poll shows the
pool was not renewed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Anna Tchernych <[email protected]>
The DynamoDB example manifest is gone, so the comment goes back to the
singular "manifest", and this change no longer touches the file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Anna Tchernych <[email protected]>
@dmitry-tokarev-nv

Copy link
Copy Markdown
Contributor

/ok to test cb3d328

Picks up #18140, which fixes the dynamo-llm test build on main, so the
pre-merge checks can pass.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Anna Tchernych <[email protected]>
@sachalmalick

Copy link
Copy Markdown
Contributor

/ok to test e883df3

@atchernych
atchernych merged commit d7aa86f into main Nov 5, 2026
201 of 203 checks passed
@atchernych
atchernych deleted the estroz/gds-dynamodb-store branch November 5, 2026 04:38
ishandhanani added a commit to ishandhanani/dynamo that referenced this pull request Nov 5, 2026
Fifth upstream merge for the split v2 PR: the four commits past
20c5f11, no conflicts, no router-owned path.

- ai-dynamo#18116 pass plugin selectors to the transcription router:
  lib/llm/src/discovery/watcher.rs (auto-merged).
- ai-dynamo#17691 DynamoDB registration store for the Global Discovery Service:
  lib/global-discovery-service, root Cargo.toml workspace deps, Cargo.lock.
- ai-dynamo#16288 deployment diagnostics tests, ai-dynamo#16723 helm KAI queue wait: outside
  the router.

Signed-off-by: Ishan Dhanani <[email protected]>
sachalmalick added a commit that referenced this pull request Nov 5, 2026
Two conflicts, both from main's DynamoDB registration store for the
Global Discovery Service (#17691), which added the same AWS SDK
workspace dependencies this branch had.

Cargo.toml: main's declarations are taken. They pin lower minimum
versions than this branch did and turn off aws-sdk-dynamodb's default
features, which pulled in a legacy hyper 0.14 and rustls 0.21 client.
Both DynamoDB stores now share one SDK and one HTTPS client.

Cargo.lock: main's lock, with Cargo adding only this branch's crate and
its dependencies; no locked version differs from main. The AWS SDK
crates therefore move to main's versions, and the legacy client's
packages leave the lock.

The router, DynamoDB store and frontend tests pass against these
versions, and clippy is clean.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Sachal Malick <[email protected]>
atchernych added a commit that referenced this pull request Nov 5, 2026
Brings in the DynamoDB registration store (#17691). Fixes the merge
needed beyond the conflicts:
- The store choice returns what the backend uses from it, and the
  memory store also as the exchange that --peer-service shares, since
  the choice now returns trait objects.
- --peer-service with --registration-storage dynamodb is now possible
  to ask for, and is refused as a usage error; a test covers it.
- Readiness keeps main's rule, answering OK without the backend once
  both directories have answered, and still waits for an instance that
  shares registrations to ask the others first.
- DiscoveryError gained a Rejected variant, so a failed ask maps every
  variant to its cause.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Anna Tchernych <[email protected]>
atchernych added a commit that referenced this pull request Nov 5, 2026
vCluster runs one virtual cluster per host namespace. The first run on
this PR created the hub, then stopped at the member: "creating multiple
virtual clusters inside the same namespace is not supported". The hub
and the member now get host namespaces of their own, and the cleanup job
deletes both with teardown-dynamo-operator. The README's local commands
do the same.

The three jobs limit GITHUB_TOKEN to contents: read; CodeQL flagged the
pr.yaml copy of the build job, which had no permissions block.

With DynamoDB registration storage on main (#17691), the README lists
that case as next rather than waiting on the service.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Anna Tchernych <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

actions container documentation Improvements or additions to documentation feat size/XXL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants