Skip to content

Conversation

@biswapanda
Copy link
Contributor

@biswapanda biswapanda commented Dec 10, 2025

Overview:

Details:

Where should the reviewer start?

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

  • closes GitHub issue: #xxx

Summary by CodeRabbit

Tests

  • Enhanced test parameterization - Tests now execute across multiple request plane configurations (NATS and TCP) to improve coverage validation.
  • Configurable test infrastructure - Added parametrizable fixtures for KV store and request plane selection, enabling flexible test setup and execution across different backend configurations.

✏️ Tip: You can customize this high-level summary in your review settings.

@biswapanda biswapanda requested review from a team as code owners December 10, 2025 05:53
@copy-pr-bot
Copy link

copy-pr-bot bot commented Dec 10, 2025

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.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 10, 2025

Walkthrough

The changes introduce parameterized request plane selection ("nats" and "tcp") across multiple test suites via pytest fixtures and environment variable propagation. New fixtures are added to conftest.py files at different scopes, and test files are updated to run with both request planes by passing the selected plane through environment variables to worker processes.

Changes

Cohort / File(s) Summary
Fixture Infrastructure
lib/bindings/python/tests/conftest.py, tests/conftest.py
Added store_kv and request_plane fixtures for parameterized test execution. Extended runtime and runtime_services fixtures to accept and utilize these new parameters, enabling conditional service startup and configurable test environments.
Cancellation Test Parameterization
lib/bindings/python/tests/cancellation/test_cancellation.py
Applied @pytest.mark.parametrize("request_plane", ["nats", "tcp"], indirect=True) to six test functions to enable execution across both request planes.
Migration & Cancellation Test Suite Updates
tests/fault_tolerance/cancellation/test_sglang.py, test_trtllm.py, test_vllm.py, tests/fault_tolerance/migration/test_sglang.py, test_trtllm.py, test_vllm.py
Added module-level pytest.mark.parametrize("request_plane", ["nats", "tcp"], indirect=True) markers and set DYN_REQUEST_PLANE environment variable from fixture in worker process initialization.
Process Configuration Updates
tests/fault_tolerance/cancellation/utils.py, tests/fault_tolerance/migration/utils.py
Added DYN_REQUEST_PLANE environment variable configuration in DynamoFrontendProcess.__init__ and DynamoWorkerProcess.__init__ to propagate request plane selection to spawned processes. Migration utils additionally modified environment initialization logic.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • tests/fault_tolerance/migration/utils.py may require extra attention due to environment initialization changes that alter control flow and process initialization behavior
  • Verify consistent environment variable propagation across all test utilities and worker process definitions
  • Confirm indirect parameterization fixtures properly pass values through request context in both Python bindings and main test suites

Poem

🐰 With nats and tcp now both in play,
Test planes dance in parametric way!
Fixtures guide the fixtures below,
Request planes shimmer with dual glow—
More coverage blooms where code does grow! 🌱

Pre-merge checks

❌ Failed checks (2 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description consists entirely of template placeholders with no actual content describing changes, rationale, or related issues. Fill in all template sections with concrete details: overview of parameterization changes, specific files modified, review starting points, and the related GitHub issue number.
Docstring Coverage ⚠️ Warning Docstring coverage is 45.45% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title 'test: tcp test enable' is vague and lacks specificity about what TCP tests are being enabled or why, making it unclear what the main change accomplishes. Provide a more descriptive title that clearly explains the purpose, such as 'test: enable TCP request plane parameterization across test suites' or similar.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
lib/bindings/python/tests/cancellation/test_cancellation.py (1)

168-168: Consider consolidating parametrization to module level.

The request_plane parametrization is repeated on 6 individual tests. Since all tests in this file require the same parametrization, consider moving it to pytestmark for consistency with other test files in this PR and to reduce duplication.

pytestmark = [
    pytest.mark.pre_merge,
    pytest.mark.parametrize("request_plane", ["nats", "tcp"], indirect=True),
]
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f57fd72 and 52e1ecf.

📒 Files selected for processing (11)
  • lib/bindings/python/tests/cancellation/test_cancellation.py (6 hunks)
  • lib/bindings/python/tests/conftest.py (3 hunks)
  • tests/conftest.py (1 hunks)
  • tests/fault_tolerance/cancellation/test_sglang.py (2 hunks)
  • tests/fault_tolerance/cancellation/test_trtllm.py (2 hunks)
  • tests/fault_tolerance/cancellation/test_vllm.py (2 hunks)
  • tests/fault_tolerance/cancellation/utils.py (1 hunks)
  • tests/fault_tolerance/migration/test_sglang.py (2 hunks)
  • tests/fault_tolerance/migration/test_trtllm.py (2 hunks)
  • tests/fault_tolerance/migration/test_vllm.py (2 hunks)
  • tests/fault_tolerance/migration/utils.py (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-09-24T17:45:54.735Z
Learnt from: tzulingk
Repo: ai-dynamo/dynamo PR: 3194
File: tests/utils/managed_deployment.py:620-656
Timestamp: 2025-09-24T17:45:54.735Z
Learning: In the fault tolerance test infrastructure for Dynamo, port-forwards created by the `port_forward` method in `ManagedDeployment` are intended to run in the background and should not be stopped immediately after use. They are designed for persistent connections that can be reused across multiple metrics collections during test execution.

Applied to files:

  • tests/fault_tolerance/migration/utils.py
🧬 Code graph analysis (1)
lib/bindings/python/tests/conftest.py (2)
lib/runtime/src/distributed.rs (2)
  • request_plane (382-384)
  • runtime (288-290)
lib/bindings/python/src/dynamo/_core.pyi (1)
  • DistributedRuntime (36-85)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build and Test - dynamo
🔇 Additional comments (25)
tests/fault_tolerance/cancellation/utils.py (1)

30-30: LGTM!

The request plane fixture value is correctly propagated to the frontend process environment, enabling the test to run with both "nats" and "tcp" configurations.

tests/fault_tolerance/migration/test_sglang.py (2)

31-31: LGTM!

The indirect parametrization correctly routes the request plane values through the fixture mechanism, enabling tests to run with both "nats" and "tcp" request planes.


60-63: LGTM!

The environment variable setup correctly propagates the request plane fixture value to the worker process, maintaining consistency with other worker process initializations in this PR.

tests/fault_tolerance/cancellation/test_trtllm.py (2)

29-29: LGTM!

The indirect parametrization is correctly configured for TRT-LLM cancellation tests to run with both request plane configurations.


89-93: LGTM!

The environment variable setup is consistent with other worker process initializations. The updated comment accurately reflects the broader scope of environment configuration.

tests/fault_tolerance/migration/test_trtllm.py (2)

31-31: LGTM!

The indirect parametrization is correctly configured for TRT-LLM migration tests.


58-60: LGTM!

The environment variable propagation is consistent with the established pattern across the test suite.

lib/bindings/python/tests/cancellation/test_cancellation.py (5)

202-203: LGTM!

The parametrization correctly enables dual request plane testing for this test.


235-236: LGTM!


260-261: LGTM!


289-290: LGTM!


312-313: LGTM!

tests/fault_tolerance/cancellation/test_vllm.py (2)

28-28: LGTM!

The module-level parametrization correctly enables dual request plane testing for all vLLM cancellation tests.


69-73: LGTM!

The environment variable setup is consistent with other worker process initializations in the test suite.

tests/fault_tolerance/migration/test_vllm.py (2)

31-31: LGTM!

The module-level parametrization correctly enables dual request plane testing for vLLM migration tests.


57-60: LGTM!

The environment variable setup is consistent with other worker process initializations.

tests/fault_tolerance/migration/utils.py (1)

27-34: LGTM!

The frontend process correctly propagates the request plane fixture value to the environment. The organization of environment variable setup is clean and consistent with the cancellation utils.

tests/fault_tolerance/cancellation/test_sglang.py (2)

28-28: LGTM: Correct parameterization for multi-transport testing.

The indirect parameterization will correctly pass "nats" and "tcp" values to the request_plane fixture, enabling these tests to run with both transport planes.


93-95: LGTM: Correct propagation of request plane to worker environment.

The environment variable DYN_REQUEST_PLANE is correctly set from the parameterized fixture, enabling worker processes to use the selected transport plane (nats or tcp).

lib/bindings/python/tests/conftest.py (3)

405-415: LGTM: Correct fixture implementation for KV store selection.

The store_kv fixture correctly implements the indirect parametrization pattern with a sensible default of "file" for unit tests.


418-428: LGTM: Correct fixture implementation for request plane selection.

The request_plane fixture correctly implements the indirect parametrization pattern with a default of "nats".


432-432: The DistributedRuntime constructor signature is confirmed to accept store_kv and request_plane parameters. Evidence from lib/bindings/python/src/dynamo/runtime/__init__.py shows the same usage pattern: DistributedRuntime(loop, "etcd", request_plane). The fixture dependency injection at line 472 is correct, with store_kv and request_plane fixtures providing appropriate string values ("file"/"etcd" and "nats"/"tcp" respectively).

tests/conftest.py (3)

415-425: LGTM: Correct fixture implementation for KV store selection.

The store_kv fixture correctly implements the indirect parametrization pattern with a default of "etcd", which is appropriate for integration and end-to-end tests.


428-438: LGTM: Correct fixture implementation for request plane selection.

The request_plane fixture correctly implements the indirect parametrization pattern with a default of "nats".


442-460: LGTM: Correct conditional service startup based on test configuration.

The runtime_services fixture correctly starts only the required services based on store_kv and request_plane parameters. This optimization allows TCP-based tests to skip NATS startup and file-based KV tests to skip etcd startup, improving test efficiency.

The conditional logic properly handles all combinations:

  • Both NATS and etcd when both are needed
  • Only NATS for nats transport with non-etcd KV
  • Only etcd for non-nats transport with etcd KV
  • Neither when using TCP transport with file-based KV

@kthui kthui force-pushed the jacky-tcp-test-enable branch from 90e954c to 52e1ecf Compare December 10, 2025 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants