Skip to content

feat(relay): add live-reloaded file sources and state endpoint - #9

Draft
Kaonael wants to merge 9 commits into
mainfrom
feat/kv-dc-relay-source-modes
Draft

Kaonael wants to merge 9 commits into
mainfrom
feat/kv-dc-relay-source-modes

Conversation

@Kaonael

@Kaonael Kaonael commented Sep 14, 2026

Copy link
Copy Markdown
Owner

Summary

Add --sources-file to select Relay namespaces from a JSON file, keeping discovery as the default. Both modes implement an internal NamespaceSource stream and share a namespace membership reconciler. File mode polls for updates; discovery follows model-registration events and periodically refreshes namespaces through DRT. Explicit discovery namespaces remain fixed.

Reload namespace selection without restarting Relay, preserve unchanged watches, and retain applied membership on source errors. Retry failed watch setup independently of source updates. Support an optional connectionRevision guard through DYN_RELAY_CONNECTION_REVISION.

Expose mode, connection revision, listener readiness, and desired/applied source revisions at /engine/state through the existing engine route registry. The source count represents selected namespaces, including those without matching endpoints. Changes are limited to Relay, its Python bindings, documentation, and tests; runtime, operator, and gRPC contracts are unchanged.

Validation

  • Relay Rust suite: 217 tests passed, including dynamic DRT namespaces, endpoint filters, source failure retention, and file reload.
  • Built the native Python extension from this branch.
  • Full Relay Python suite: 104 passed, zero skipped. Native tests call async bindings directly, including the HTTP state contract and live reload, without subprocesses.
  • Rustfmt, Ruff 0.5.2, Black 23.1.0, and diff whitespace checks passed.
  • Changed files have CODEOWNERS coverage.

@Kaonael
Kaonael had a problem deploying to external_collaborator September 14, 2026 15:08 — with GitHub Actions Failure
@github-actions github-actions Bot added feat documentation Improvements or additions to documentation labels Sep 14, 2026
@Kaonael
Kaonael force-pushed the feat/kv-dc-relay-source-modes branch from bd6006e to de3275f Compare September 14, 2026 15:13
@Kaonael
Kaonael had a problem deploying to external_collaborator September 14, 2026 15:13 — with GitHub Actions Failure
@Kaonael
Kaonael had a problem deploying to external_collaborator September 14, 2026 15:27 — with GitHub Actions Failure
return start


async def wait_for_sources(relay, predicate):
@Kaonael
Kaonael had a problem deploying to external_collaborator September 14, 2026 15:48 — with GitHub Actions Failure
@Kaonael
Kaonael had a problem deploying to external_collaborator September 14, 2026 16:09 — with GitHub Actions Failure
@Kaonael
Kaonael had a problem deploying to external_collaborator September 14, 2026 19:58 — with GitHub Actions Failure
@Kaonael
Kaonael had a problem deploying to external_collaborator September 15, 2026 14:03 — with GitHub Actions Failure
@Kaonael
Kaonael had a problem deploying to external_collaborator September 15, 2026 16:24 — with GitHub Actions Failure
@Kaonael
Kaonael had a problem deploying to external_collaborator September 15, 2026 17:32 — with GitHub Actions Failure
Signed-off-by: Nikita Sukharev <kaonael@gmail.com>
Signed-off-by: Nikita Sukharev <kaonael@gmail.com>
Signed-off-by: Nikita Sukharev <kaonael@gmail.com>
Signed-off-by: Nikita Sukharev <kaonael@gmail.com>
Signed-off-by: Nikita Sukharev <kaonael@gmail.com>
Signed-off-by: Nikita Sukharev <kaonael@gmail.com>
Signed-off-by: Nikita Sukharev <kaonael@gmail.com>
Signed-off-by: Nikita Sukharev <kaonael@gmail.com>
@Kaonael
Kaonael force-pushed the feat/kv-dc-relay-source-modes branch from 2d64ec2 to a11323b Compare September 15, 2026 18:39
@Kaonael
Kaonael had a problem deploying to external_collaborator September 15, 2026 18:39 — with GitHub Actions Failure
Signed-off-by: PeaBrane <yanrpei@gmail.com>
@PeaBrane
PeaBrane deployed to external_collaborator September 15, 2026 23:32 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation feat

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants