Skip to content

test(deploy): add EFA verification deploy test - #10721

Closed
jh-nv wants to merge 8 commits into
mainfrom
jihao/efa-deploy-test
Closed

jh-nv wants to merge 8 commits into
mainfrom
jihao/efa-deploy-test

Conversation

@jh-nv

@jh-nv jh-nv commented Jun 15, 2026 •

Copy link
Copy Markdown
Contributor

What

Adds a deploy test that verifies an EFA-tagged vLLM image runs Dynamo disaggregated with Elastic Fabric Adapter fully enabled.

  • tests/deploy/test_deploy_efa.py — test_efa_deployment (marker framework_with_efa): deploys the disagg stack, waits for prefill+decode workers, serves a chat completion, then asserts the worker logs prove the KV-cache transfer rode NIXL → LIBFABRIC → EFA (fails on silent UCX fallback).
  • tests/deploy/efa/disagg-efa.yaml — minimal disagg DGD (Qwen3-0.6B, TP=1, vpc.amazonaws.com/efa, privileged, LIBFABRIC kv-transfer-config, NIXL-first LD_LIBRARY_PATH). Kept outside examples/backends/ so the auto-discovered deploy matrix never picks it up.
  • pyproject.toml — register the framework_with_efa marker.
  • post-merge-ci.yml — a disabled deploy-test-efa stub, gated on vars.EFA_DEPLOY_TEST_ENABLED. No EFA-capable CI cluster exists yet.

Status

Static-verified (collects, marker registered, imports/signatures resolve, manifest valid, excluded from auto-discovery). Not yet run live — requires a p5/EFA cluster and an EFA vllm-runtime image. Run manually:

pytest tests/deploy/test_deploy_efa.py -m framework_with_efa --image=<efa-vllm-runtime> --namespace=<ns> -v -s

Enabling CI is a follow-up: set EFA_KUBECONFIG_BASE64 / EFA_DEPLOY_IMAGE / EFA_DEPLOY_NAMESPACE / EFA_DEPLOY_RUNNER and flip EFA_DEPLOY_TEST_ENABLED=true.

Resolves: DIS-2147

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests

    • Added automated testing infrastructure for disaggregated vLLM deployments with EFA networking support.
  • Chores

    • Enhanced CI/CD pipeline with EFA-capable deployment verification job to improve release validation.

jh-nv and others added 2 commits June 10, 2026 01:28
Add a deploy test that verifies an EFA-tagged vLLM image can run Dynamo
disaggregated with Elastic Fabric Adapter fully enabled.

- tests/deploy/efa/disagg-efa.yaml: minimal disagg DGD (Qwen3-0.6B, TP=1,
  vpc.amazonaws.com/efa, privileged, LIBFABRIC kv-transfer-config, NIXL-first
  LD_LIBRARY_PATH). Kept outside examples/backends/ so the auto-discovered
  deploy matrix never picks it up.
- tests/deploy/test_deploy_efa.py: test_efa_deployment deploys, waits for
  prefill+decode workers, serves a disagg completion, then asserts the worker
  logs prove NIXL used LIBFABRIC/EFA (fails on silent UCX fallback).
- pyproject.toml: register the framework_with_efa marker.
- post-merge-ci.yml: add a disabled deploy-test-efa stub (gated on
  vars.EFA_DEPLOY_TEST_ENABLED) wired into deploy-status-check. No EFA-capable
  CI cluster exists yet; enabling requires the documented secret/vars.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: Jie Hao <[email protected]>
@copy-pr-bot

copy-pr-bot Bot commented Jun 15, 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.

@coderabbitai

coderabbitai Bot commented Jun 15, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Adds an optional EFA deployment test to the post-merge CI pipeline. A new deploy-test-efa job, a framework_with_efa pytest marker, a DynamoGraphDeployment manifest configuring disaggregated vLLM with NIXL/LIBFABRIC over EFA networking, and an end-to-end test module that deploys the stack, validates chat completions, and confirms LIBFABRIC backend usage via pod log inspection.

Changes

EFA Deploy Test

Layer / File(s) Summary
CI job wiring and pytest marker registration
.github/workflows/post-merge-ci.yml, pyproject.toml
Adds the deploy-test-efa CI job gated by vars.EFA_DEPLOY_TEST_ENABLED, invoking ./.github/actions/dynamo-deploy-test with EFA-specific inputs and the framework_with_efa pytest marker. Updates deploy-status-check.needs to include the new job. Registers framework_with_efa in pyproject.toml markers list.
EFA disaggregated-vLLM Kubernetes manifest
tests/deploy/efa/disagg-efa.yaml
Defines a DynamoGraphDeployment with VllmPrefillWorker, VllmDecodeWorker, and Frontend services, using NixlConnector with LIBFABRIC backend, FI_PROVIDER=efa env vars, library path ordering, privileged containers, GPU=1, and vpc.amazonaws.com/efa: "1" resource limits.
EFA e2e test module
tests/deploy/test_deploy_efa.py
Adds _read_pod_logs, assert_nixl_used_libfabric, and test_efa_deployment. The test validates manifest existence, pod creation, model readiness, chat completion response, and confirms NIXL used LIBFABRIC/EFA by scanning prefill/decode worker logs for expected markers while failing on UCX fallback detection.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'test(deploy): add EFA verification deploy test' is concise, clear, and directly summarizes the main change—adding a new EFA verification deployment test.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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 PR description covers overview, detailed changes, review guidance, and issue linkage. All required sections are present.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

@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.

Actionable comments posted: 2

🧹 Nitpick comments (1)
tests/deploy/test_deploy_efa.py (1)

129-134: ⚡ Quick win

Consider adding @pytest.mark.vllm for framework-specific selection.

This test deploys a disaggregated vLLM stack and is specific to the vLLM backend. Adding the vllm marker would enable targeted test selection (e.g., pytest -m 'vllm and framework_with_efa') and align with the framework marker pattern used across the repository.

♻️ Proposed addition
 `@pytest.mark.framework_with_efa`
+@pytest.mark.vllm
 `@pytest.mark.k8s`
 `@pytest.mark.deploy`
 `@pytest.mark.post_merge`
 `@pytest.mark.e2e`
 `@pytest.mark.timeout`(1200)
 async def test_efa_deployment(

As per coding guidelines: framework markers (vllm, sglang, trtllm) enable targeted selection like pytest -m 'vllm and multimodal' and are independent of component markers.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/deploy/test_deploy_efa.py` around lines 129 - 134, The test function in
test_deploy_efa.py is missing the vllm framework marker. Add `@pytest.mark.vllm`
decorator to the test function alongside the existing framework and deployment
markers (`@pytest.mark.framework_with_efa`, `@pytest.mark.k8s`, `@pytest.mark.deploy`,
`@pytest.mark.post_merge`, `@pytest.mark.e2e`, `@pytest.mark.timeout`). This aligns
with the framework marker pattern used in the repository and enables targeted
test selection using pytest commands like pytest -m 'vllm and
framework_with_efa'.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/post-merge-ci.yml:
- Around line 967-968: The checkout step named "Checkout code" in the workflow
file uses the actions/checkout action but does not include the
persist-credentials configuration. Add with: persist-credentials: false to the
checkout step to prevent GitHub tokens from persisting in the environment and
leaking through artifacts, following repository security best practices.

In `@tests/deploy/test_deploy_efa.py`:
- Around line 129-134: The test function decorated with the framework_with_efa,
k8s, deploy, post_merge, e2e, and timeout markers is missing the required GPU
marker. Add the `@pytest.mark.gpu_0` decorator to the test function's decorator
list to satisfy the repository's marker validation requirement that all tests
must include a Hardware category marker, even for deploy/k8s tests that don't
directly execute on GPU runners.

---

Nitpick comments:
In `@tests/deploy/test_deploy_efa.py`:
- Around line 129-134: The test function in test_deploy_efa.py is missing the
vllm framework marker. Add `@pytest.mark.vllm` decorator to the test function
alongside the existing framework and deployment markers
(`@pytest.mark.framework_with_efa`, `@pytest.mark.k8s`, `@pytest.mark.deploy`,
`@pytest.mark.post_merge`, `@pytest.mark.e2e`, `@pytest.mark.timeout`). This aligns
with the framework marker pattern used in the repository and enables targeted
test selection using pytest commands like pytest -m 'vllm and
framework_with_efa'.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 9b3ef2c2-c7da-4cc0-a65c-5c0c3eb8468a

📥 Commits

Reviewing files that changed from the base of the PR and between 5a2eb79 and 92e3d29.

📒 Files selected for processing (4)
  • .github/workflows/post-merge-ci.yml
  • pyproject.toml
  • tests/deploy/efa/disagg-efa.yaml
  • tests/deploy/test_deploy_efa.py

Comment on lines +967 to +968
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add persist-credentials: false to the checkout step.

The checkout action does not disable credential persistence. Per the static analysis hint and repository security best practices, set persist-credentials: false to prevent GitHub tokens from leaking through artifacts.

🔒 Proposed fix
       - name: Checkout code
         uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd  # v6.0.2
+        with:
+          persist-credentials: false
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
🧰 Tools
🪛 zizmor (1.25.2)

[warning] 967-968: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/post-merge-ci.yml around lines 967 - 968, The checkout
step named "Checkout code" in the workflow file uses the actions/checkout action
but does not include the persist-credentials configuration. Add with:
persist-credentials: false to the checkout step to prevent GitHub tokens from
persisting in the environment and leaking through artifacts, following
repository security best practices.

Source: Linters/SAST tools

Comment thread tests/deploy/test_deploy_efa.py Resolved
@jh-nv
jh-nv force-pushed the jihao/efa-deploy-test branch from ba02d1e to 0c6fb3f Compare June 15, 2026 15:54
jh-nv and others added 2 commits June 15, 2026 11:55
The EFA verification test reused the shared DEFAULT_MAX_TOKENS=30, which
leaves only a thin cushion above MIN_RESPONSE_CONTENT_LENGTH=100 for a
short, deterministic Qwen3-0.6B reply. Request a dedicated
EFA_MAX_TOKENS=64 so the single-completion assertion stays robust against
a near-floor response.

Verified live on an H100/EFA cluster: the test passes and the KV transfer
rides NIXL -> LIBFABRIC -> EFA (efa:mr registration lines present,
fi_info dmabuf status=1).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: Jie Hao <[email protected]>
Use the dynamo-deploy-test action's first-class `image` input (which it
appends as --image) instead of stuffing --image into extra_pytest_args,
matching how the action is designed to be wired. The image stays a
config parameter (vars.EFA_DEPLOY_IMAGE) passed in when CI is enabled.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: Jie Hao <[email protected]>
…ials

- Add @pytest.mark.vllm so the EFA test is selectable via `-m vllm`
  (it deploys a vLLM-specific stack), matching the framework-marker pattern.
- Set persist-credentials: false on the deploy-test-efa checkout step,
  matching the hardened sibling jobs in this workflow (zizmor artipacked).

Skipped CodeRabbit's gpu_0 suggestion: the Hardware marker category already
includes k8s (tests/report_pytest_markers.py), which @pytest.mark.k8s satisfies.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: Jie Hao <[email protected]>
@jh-nv

jh-nv commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @coderabbitai — addressed in ca907ef:

  • ✅ persist-credentials: false added to the deploy-test-efa checkout step, matching the 5 hardened sibling checkout steps already in this workflow.
  • ✅ @pytest.mark.vllm added — the test deploys a vLLM-specific stack, so it's now selectable via pytest -m 'vllm and framework_with_efa'.
  • ⏭️ gpu_0 — skipped (not required here). The marker enforcer's Hardware category includes k8s (tests/report_pytest_markers.py:66), so the existing @pytest.mark.k8s already satisfies it. The report-pytest-markers pre-commit hook passes, and the existing deploy tests in test_deploy.py carry no gpu marker for the same reason.

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@jh-nv — thanks for the thorough follow-up! All makes sense:

  • persist-credentials: false and @pytest.mark.vllm — confirmed, good to go.
  • gpu_0 — the k8s marker covering the Hardware category is a convincing justification, and the consistency with the rest of the deploy test suite is the right call. Withdrawing that suggestion.

(ノ◕ヮ◕)ノ*:・゚✧

combined = "\n".join(_read_pod_logs(p) for p in all_pods)

found_libfabric = any(marker in combined for marker in LIBFABRIC_EFA_MARKERS)
saw_ucx_fallback = UCX_FALLBACK_MARKER in combined

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The UCX fallback marker is computed but only used in the missing-LIBFABRIC failure message, so logs containing both LIBFABRIC evidence and UCX fallback evidence still pass. Fix: assert that saw_ucx_fallback is false before accepting found_libfabric.

🤖 AI Fix

In tests/deploy/test_deploy_efa.py, update assert_nixl_used_libfabric to add an assert not saw_ucx_fallback check immediately after saw_ucx_fallback = UCX_FALLBACK_MARKER in combined, with a failure message explaining that NIXL fell back to UCX and the LIBFABRIC backend configuration should be checked.

Beyond the existing log-marker proof that NIXL selected the LIBFABRIC/EFA
backend, read the decode worker's NIXL agent_rx_bytes telemetry counter
before and after the completion and assert it strictly increased. That
proves KV bytes physically moved through the NIXL/EFA agent for the
request, not merely that the LIBFABRIC path was configured.

- disagg-efa.yaml: enable NIXL Prometheus telemetry (port 19090) on both
  workers; LD_LIBRARY_PATH already orders the NIXL lib path first so the
  exporter plugin loads without breaking engine init.
- test_deploy_efa.py: add _read_nixl_rx_bytes (in-pod exec scrape) and
  assert_efa_rdma_traffic; baseline rx_bytes before the request and assert
  growth after, alongside the LIBFABRIC backend log proof.

This is a threshold-free, binary "did EFA RDMA traffic flow" check, not a
performance target.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: Jie Hao <[email protected]>
pytest_collection_modifyitems auto-skips any test carrying a framework
marker (vllm/sglang/trtllm/kvbm/lmcache) when that module can't be
imported on the runner. Deploy tests run the framework in a remote
cluster container and never import it in-process, so this spuriously
skipped the EFA deploy test — which carries @pytest.mark.vllm for
'-m vllm' selectability (added in ca907ef) — on any runner without a
local vllm. Exempt 'deploy'-marked tests from the auto-skip.

Verified live: test_deploy_efa.py runs (no longer skips) and passes on
dynamo-aws-dev-02 with vllm-runtime:1.2.1-efa-amd64.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: Jie Hao <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions Bot added the Stale label Jul 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR has been closed due to inactivity. If you believe this PR is still relevant, please feel free to reopen it with additional context or information.

@github-actions github-actions Bot closed this Jul 21, 2026
@github-actions
github-actions Bot deleted the jihao/efa-deploy-test branch July 21, 2026 10:16
@jh-nv
jh-nv restored the jihao/efa-deploy-test branch August 7, 2026 03:43

This branch was previously deployed

1 inactive deployment
GITLAB — 919bec1f Deployed Jun 15, 2026 by copy-pr-bot[bot] via Trigger CI Pipeline #31319
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.

1 participant