Skip to content

Conversation

@keivenchang
Copy link
Contributor

Overview:

Make hermetic frontend tests safe to run under pytest-xdist by allocating per-test ports (frontend + worker system ports) and removing the hardcoded gRPC metrics port collision. This also redirects per-test logs to /tmp to avoid polluting the repo root during parallel runs.

Details:

  • Add shared per-test port allocation (ServicePorts) and use it across frontend + serve tests
  • Add --grpc-metrics-port flag to the frontend and plumb http_metrics_port through Python/Rust so gRPC mode can run in parallel without 8788 conflicts
  • Update hermetic HTTP/gRPC frontend tests to use dynamic ports + readiness checks, and add timing notes (serialized vs -n auto)
  • Write per-test logs under /tmp to avoid creating lots of untracked test_* directories in the repo root

Where should the reviewer start?

  • components/src/dynamo/frontend/main.py
  • lib/llm/src/entrypoint/input/grpc.rs
  • lib/llm/src/local_model.rs
  • lib/bindings/python/rust/llm/entrypoint.rs
  • tests/conftest.py
  • tests/frontend/conftest.py

Related Issues: (use Closes / Fixes / Resolves / Relates to)

Relates to OPS-2568

/coderabbit profile chill

- Add shared per-test port allocation for frontend/serve tests\n- Add gRPC metrics port flag and plumb http_metrics_port to avoid 8788 collisions\n- Update hermetic HTTP/gRPC frontend tests for dynamic ports + readiness\n- Write per-test logs under /tmp to avoid polluting the repo root\n- CI wall time improvement (measured): pre_merge gRPC pair 87.48s -> 25.27s (3.46x); post_merge completion mocker 97.29s -> 30.29s (3.21x)

Signed-off-by: Keiven Chang <keivenchang@users.noreply.github.com>
@keivenchang keivenchang self-assigned this Dec 17, 2025
@github-actions github-actions bot added the test label Dec 17, 2025
Signed-off-by: Keiven Chang <keivenchang@users.noreply.github.com>
Signed-off-by: Keiven Chang <keivenchang@users.noreply.github.com>
Signed-off-by: Keiven Chang <keivenchang@users.noreply.github.com>
default=False,
help="Start KServe gRPC server.",
)
parser.add_argument(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adding a configurable parameter so that parallel running gRPC tests can use different ports without colliding.

TEST_MODEL = QWEN


class DynamoFrontendProcess(ManagedProcess):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed; using a common class now.

logger = logging.getLogger(__name__)


class DynamoFrontendProcess(ManagedProcess):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed; using a common class.


@pytest.mark.e2e
@pytest.mark.pre_merge
@pytest.mark.gpu_1
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test doesn't use any GPU, so marking it as gpu_0.

# - tests/frontend/test_vllm.py
# - tests/frontend/test_completion_mocker_engine.py
# - tests/frontend/grpc/test_tensor_parameters.py
# - tests/frontend/grpc/test_tensor_mocker_engine.py
Copy link
Contributor Author

Choose a reason for hiding this comment

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

3 down, many more tests to go!

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.

2 participants