Repository navigation
build(runtime): make the NATS planes a Cargo feature - #29
Closed
ishandhanani wants to merge 1 commit into
Closed
ishandhanani wants to merge 1 commit into
ishandhanani wants to merge 1 commit into
Conversation
`dynamo-runtime` gains a `nats` feature (on by default) that owns the `async-nats` dependency and gates the NATS transport (`transports::nats`), the NATS request plane (`ingress::nats_server`, `egress::nats_client`), the NATS event plane (`event_plane::nats_transport`), NATS service registration (`component::service`, `DistributedRuntime::register_nats_service`, `kv_router_nats_*`), the NATS KV store, the jetstream error variants on `PipelineError`, and the NATS header helpers in `logging`. Wire enums (`TransportType::Nats`, `EventTransport::Nats`, `EventTransportKind::Nats`, `RequestPlaneMode::Nats`) are unchanged, so discovery records from workers that use NATS still deserialize; selecting a NATS plane in a build without the feature fails at startup with an error naming the feature. `otel_parent_context_from_distributed` no longer needs a NATS header map. `dynamo-llm` forwards the feature (`nats = ["dynamo-runtime/nats", "dep:async-nats"]`, on by default) and gates its NATS request-trace sink; every binary-shipping member enables `nats` next to `etcd`. The runtime's dev-dependencies enable tokio `test-util` explicitly instead of relying on feature unification through async-nats. Consumer: `cargo check -p dynamo-llm --no-default-features` builds with neither `etcd-client` nor `async-nats` in the graph, while every shipped binary keeps both. `dynamo-runtime --no-default-features` passes its unit tests and clippy. Signed-off-by: Ishan Dhanani <ishandhanani@gmail.com>
ishandhanani
had a problem deploying
to
external_collaborator
September 3, 2026 11:43 — with
GitHub Actions
Failure
Owner
Author
|
Validation results: |
Owner
Author
This branch had an error being deployed
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.
Stacked on the k8s catalog feeder PR. Completes Phase 5: the NATS half of compile-time optionality.
Summary
dynamo-runtimefeaturenats(default on) ownsasync-natsand gates:transports::nats, the NATS request plane (ingress::nats_server,egress::nats_client,PushEndpoint::start), the NATS event plane (event_plane::nats_transport), NATS service registration (component::service,register_nats_service, the component registry'sservicesmap,ComponentBuilder::build's NATS branch),kv_router_nats_*, the NATS KV store, the eight jetstreamPipelineErrorvariants,crate::service, and the NATS header helpers inlogging.TransportType::Nats,EventTransport::Nats,EventTransportKind::Nats,RequestPlaneMode::Nats), so discovery records from NATS-using workers still deserialize in a NATS-free frontend. Selecting a NATS plane in such a build fails at startup with an error naming the feature (nats_config_if,create_nats_client/server, event-plane arms,ComponentBuilder::build).otel_parent_context_from_distributedand its test use plain string headers instead of a NATS header map (the extraction was already transport-agnostic).dynamo-llm:nats = ["dynamo-runtime/nats", "dep:async-nats"]in defaults; the NATS request-trace sink is gated. Binary-shipping members enablenatsnext toetcd. Runtime dev-deps enable tokiotest-utilexplicitly (previously unified through async-nats).sidecar-backends.mdbuild-time note covers both features.Validation
cargo check -p dynamo-llm --no-default-features: builds;cargo tree -p dynamo-llm --no-default-features -e normal -i async-natsand-i etcd-clientboth print nothing.async-nats(cargo tree -i async-natsfordynamo-vllm-sidecar,dynamo-sglang-sidecar,dynamo-trtllm-sidecar,dynamo-ext-proc,dynamo-mocker-backend,dynamo-py3).cargo check -p dynamo-runtime --no-default-features --testsandcargo clippy -p dynamo-runtime --no-default-features --all-targets: clean. Runtime unit tests without default features, workspace check, and clippy with defaults: see the final comment.