Skip to content

[CI] Bake hash-locked KV connectors into the CI image and re-enable their jobs - #65145

Merged
khluu merged 13 commits into
mainfrom
ci/kv-connectors-in-image
Nov 6, 2026
Merged

khluu merged 13 commits into
mainfrom
ci/kv-connectors-in-image

Conversation

@khluu

@khluu khluu commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Overview

Re-enable the KV connector CI jobs disabled in #63609 (follow-up to #63608 and #64010). Instead of installing NIXL, LMCache, Mooncake and CuPy at job time, the CUDA 13 CI image now bakes them from a hash-pinned lock.

Claims

  • The CI test image installs the KV connector packages in the test-deps stage with uv pip install --require-hashes --no-deps from requirements/test/kv_connectors_cuda.txt. That lock is compiled against requirements/cuda.txt and requirements/test/cuda.txt and regenerated by a new pip-compile-kv-connectors pre-commit hook; a check-kv-connector-lock hook fails if it stops satisfying requirements/kv_connectors.txt. At build time it adds 16 packages and changes none already in the image.
  • install-kv-connectors.sh becomes check-kv-connectors.sh. It only verifies the packages are present, so it can no longer resolve packages at job time.
  • ROCm needs no image change. kv_connectors_rocm.txt (tblib, lm_eval[api]) is fully covered by requirements/test/rocm.txt, so the runtime installs were no-ops. They and the file are removed.
  • 26 job blocks re-enabled. The CUDA and AMD jobs are listed in the build below.
  • One missed runtime install removed: "Mooncake EC TCP E2E" ran uv pip install mooncake-transfer-engine>=0.3.12 into a venv. It now uses the image's Mooncake through --system-site-packages.
  • 6 tethering-allowlist entries removed.

Validation

  • pre-commit run on all changed files passed: pip-compile-kv-connectors, shellcheck, step keys, test tethering (--all reports nothing stale) and Dockerfile graph.
  • All Buildkite YAML parses. Each restored block matches its pre-[CI] Disable jobs with unpinned runtime installs #63609 definition except for the script rename and the dropped ROCm install line.
  • Cooldown: every newly introduced package was published at least 7 days ago except nixl/nixl-cu13 1.5.2 (PyPI Oct 29). Main already pins it in requirements/kv_connectors.txt since [NIXL][CI/Build] Bump NIXL to 1.5.2 and drop source build for Rubin #64585. Please don't merge before Nov 5 if we hold to the 7-day rule.
  • CI: a selected-steps build of the image plus the re-enabled jobs is linked in a comment below.

Details

  • The image layer installs only the lock entries the image doesn't already have, with --require-hashes --no-deps. It fails the build if the install changed any preinstalled package. After the vLLM and EP kernel wheels are installed, tools/kv_connector_lock.py verify fails the build if any locked package differs from its locked version or has unmet requirements. Its exceptions are named in the script: cuda-pathfinder, which the vLLM install upgrades; nixl → nixl-cu12; and torch → the image-pinned NCCL. check-kv-connectors.sh reruns the same verify at job start. This guard caught cuda-python/nvtx drift: the runtime base installs versions that requirements/test/cuda.txt doesn't pin. NCCL is excluded because the image pins it with its own NCCL_VERSION/UV_OVERRIDE.
  • Scope: only the stable x86_64 CUDA 13 image. Torch-nightly and arm64 images don't get the packages, and check-kv-connectors.sh fails fast there with a clear message. The KV jobs only run on x86 L4/H100/H200/B200 pools.
  • Still disabled:
  • The release images (INSTALL_KV_CONNECTORS=true) are unchanged.

Pull Request Checklist
  • I used vLLM's /pr-checklist skill. (Mandatory for agents, optional for humans).

  • AI assistance was used during the creation of this PR.

  • Design Fit: Minimizes impact on core components, reuses existing functionality, and justifies added complexity.

  • Testing and Validation: Validates the change and ensures any added tests are meaningful and reliable, with CI coverage or documented CI resource constraints and validation performed outside CI.

  • Code Quality and Style: Keeps code and comments clear and concise, and updates relevant documentation and examples.

  • Pull Request Contents: Includes a brief summary and relevant links, supports claims with evidence, explains root causes and implementation trade-offs, and follows the contributing guide.

🤖 Generated with Claude Code

…heir jobs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: khluu <khluu000@gmail.com>
@khluu
khluu requested a review from a team November 2, 2026 11:25
@khluu khluu added the ci/build label Nov 2, 2026

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@khluu

khluu commented Nov 2, 2026

Copy link
Copy Markdown
Member Author

Claude Code here (AI assistant working with @khluu). Selected-steps CI run for this PR: the image build plus the 20 re-enabled CUDA KV connector jobs and the Mooncake EC job: https://buildkite.com/vllm/ci/builds/99153

@mergify mergify Bot added kv-connector mooncake Mooncake KV-transfer / EC-transfer labels Nov 2, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: khluu <khluu000@gmail.com>
@khluu

khluu commented Nov 2, 2026

Copy link
Copy Markdown
Member Author

Claude Code here (AI assistant working with @khluu). Build 99153 failed at image build: the image pins NCCL 2.31.2 through a global UV_OVERRIDE, which collided with the lock's nvidia-nccl-cu13==2.30.7 under --require-hashes. Fixed in ca77a3f: NCCL is no longer emitted in the lock (the image owns it), and the install step now fails if it changes any package that was already in the image. Re-run: https://buildkite.com/vllm/ci/builds/99164

khluu and others added 2 commits November 2, 2026 04:23
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: khluu <khluu000@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: khluu <khluu000@gmail.com>
@khluu

khluu commented Nov 2, 2026

Copy link
Copy Markdown
Member Author

Claude Code here (AI assistant working with @khluu). Status of selected-steps build https://buildkite.com/vllm/ci/builds/99176:

The FlashInfer MLA DCP fix merged while this job was disabled, so the
strict xfail now reports XPASS on all four dcp2 *-dspark cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: khluu <khluu000@gmail.com>
@khluu

khluu commented Nov 2, 2026

Copy link
Copy Markdown
Member Author

Claude Code here (AI assistant working with @khluu). Full triage of https://buildkite.com/vllm/ci/builds/99176. None of the failures is install-related; all of them landed on main while these jobs were disabled (Oct 25 to now):

These need the respective owners to decide whether the code or the test is right. I haven't touched them here.

@orozery

orozery commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Fixed in #64993.

…mage

Signed-off-by: khluu <khluu000@gmail.com>
@khluu

khluu commented Nov 3, 2026

Copy link
Copy Markdown
Member Author

Claude Code here (on behalf of @khluu). Thanks @orozery. I merged main, which now includes #64993, into this branch (e962258) and am re-running V1 KV Connectors in https://buildkite.com/vllm/ci/builds/99534 to confirm the three offloading-connector scheduler tests pass. The Mooncake and NIXL failures listed above are separate and still unresolved.

🤖 Addressed by Claude Code

@khluu

khluu commented Nov 3, 2026

Copy link
Copy Markdown
Member Author

Claude Code here (on behalf of @khluu). V1 KV Connectors results after merging main, from https://buildkite.com/vllm/ci/builds/99534:

None of these are caused by this PR, so I haven't patched them here.

🤖 Addressed by Claude Code

The test image skipped every lock entry whose name was already installed,
whatever its version, so a stale preinstalled package passed silently.
tools/kv_connector_lock.py now:
- plan: installs only missing entries and fails if a preinstalled
  package differs from the lock (one explicit exception: cuda-pathfinder,
  upgraded by the EP kernel libraries);
- verify: checks every locked package's requirements against the
  installed environment, with two named exceptions (nixl -> nixl-cu12,
  torch -> image-pinned NCCL). Runs at image build and in
  check-kv-connectors.sh;
- align: pre-commit check that the CI lock still satisfies
  requirements/kv_connectors.txt.

This caught nvtx: the lock had 0.2.16 while vllm pins 0.2.15, so the lock
is now also constrained by requirements/cuda.txt.

Also drop the AMD fault-tolerance mirror that duplicated the standalone
MoRI job, and untether test_epd_correctness.py from the allowlist.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: khluu <khluu000@gmail.com>
@khluu

khluu commented Nov 4, 2026 •

Copy link
Copy Markdown
Member Author

Claude Code here (on behalf of @khluu). I addressed all three review points in 3fa8954 and 697d171.

  1. Name-only filtering. The awk filter is replaced by tools/kv_connector_lock.py:

    • plan installs only the lock entries that are missing. The KV layer runs before the vLLM and EP kernel wheels, and the vLLM install still moves cuda-python (13.4.4 → 13.0.3) and cuda-pathfinder (1.3.3 → 1.8.5). So plan reports preinstalled mismatches without failing on them.
    • verify runs as the last install step of the test stage (697d171) and again at job start in check-kv-connectors.sh. It requires every locked package at its locked version, with one exception: cuda-pathfinder, which the vLLM wheel install upgrades for cuda-core and nccl4py. It also checks every locked package's own requirements against the installed environment, so the exception is still checked for compatibility. Two dependencies are allowed to be unmet, both named in the script: nixl → nixl-cu12 (this image ships only nixl-cu13) and torch → nvidia-nccl-cu13 (the image pins NCCL itself).

    Running the old lock against the current CI image (vllm-ci-test-repo:e9622584…) found one real mismatch: nvtx. The lock had 0.2.16, but vllm pins 0.2.15 in requirements/cuda.txt, and the name filter skipped it. The lock is now also compiled with -c requirements/cuda.txt, which brings nvtx to 0.2.15; no other version changed. Tested in that image:

    • With the old lock, verify fails on nvtx.
    • With the new lock, plan emits nothing to install and verify passes.
    • Downgrading cuda-pathfinder to 1.2.0 makes verify fail on cupy's >=1.3.3.
    • I also replayed the build order in that image: test-deps versions with the connectors uninstalled, then plan, the hash-checked install, and the vLLM install. plan reported cuda-python and installed the 4 missing packages without changing any preinstalled one. verify failed before the vLLM install step and passed after it.

    cryptography looked like a mismatch at first, but only because Ubuntu's apt copy, 41.0.7, sits in /usr/lib/python3/dist-packages. The check reads the version that Python actually imports, 50.0.1, which matches the lock.

  2. Drift from requirements/kv_connectors.txt. A new pre-commit hook, check-kv-connector-lock (kv_connector_lock.py align), runs when requirements/kv_connectors.txt, the .in file, or the lock changes. It fails if the CI lock stops satisfying a release requirement, mapping mooncake-transfer-engine to its -cuda13 wheel. It also fails if the .in file lists a package the release file doesn't; nixl-cu13 is the only allowed extra. I tested it by bumping nixl, raising the lmcache floor, and adding a new package; all three were flagged.

  3. Duplicate MoRI mirror. I removed the mirror and kept the standalone MI355 job, which also runs test_expert_reload.py.

I also removed test_epd_correctness.py from the test-tethering allowlist, since the re-enabled EC connector job now runs it.

🤖 Addressed by Claude Code

The KV connector layer runs before the vLLM and EP kernel wheels, which
re-resolve cuda-python (13.4.4 -> 13.0.3) and cuda-pathfinder
(1.3.3 -> 1.8.5). A strict check there would fail on cuda-python even
though the finished image matches the lock, and could not see changes
made later. plan now only reports preinstalled mismatches, and verify
runs as the last install step of the test stage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: khluu <khluu000@gmail.com>
@khluu

khluu commented Nov 4, 2026

Copy link
Copy Markdown
Member Author

Claude Code here (on behalf of @khluu). Selected-steps run to test the rebuilt image at 697d171: the image build, which now runs kv_connector_lock.py verify on the finished test image, plus the 20 CUDA jobs this PR re-enables, including V1 KV Connectors, NIXL/Mooncake P/D, Torchrun + Examples and Fault Tolerance: https://buildkite.com/vllm/ci/builds/100048

🤖 Generated with Claude Code

@khluu

khluu commented Nov 4, 2026

Copy link
Copy Markdown
Member Author

Claude Code here (on behalf of @khluu). Results so far from https://buildkite.com/vllm/ci/builds/100048 at 697d171:

  • Image build passed with the new checks. The KV layer installed the 16 missing lock entries without changing any preinstalled package. It reported that cuda-python was at 13.4.4 against the lock's 13.0.3 instead of failing. The vLLM wheel install then resolved it, and kv_connector_lock.py verify passed on the finished image ([test 8/11]).
  • Passed so far: NixlConnector PD edge case, MultiConnector PD edge cases, Hybrid SSM NixlConnector PD prefix cache, DP EP Distributed NixlConnector PD accuracy, Distributed MooncakeConnector PD accuracy (B200), Mooncake EC TCP E2E, and Kimi-Linear Disaggregated. The rest are still running.
  • V1 KV Connectors shards 2/3 and 3/3 failed, all on tests that also fail on main. That job is disabled on main, so none of these were caught there:

None of these is caused by this PR, so I haven't patched them here.

🤖 Generated with Claude Code

@AndreasKaratzas

Copy link
Copy Markdown
Member

Should we modify a bit rocm docker file too? Or did I miss the mods there?

@khluu

khluu commented Nov 5, 2026

Copy link
Copy Markdown
Member Author

Claude Code here (on behalf of @khluu). @AndreasKaratzas The ROCm Dockerfile doesn't need changes. It already does what this PR adds on the CUDA side:

  • The connectors are already built into the ROCm image from pinned sources: NIXL from commit 1683cf3b… (NIXL_BRANCH), LMCache from 140819c9… (LMCACHE_REF), and MoRI at v1.2.3.post1 in Dockerfile.rocm_base.
  • On ROCm, the old install-kv-connectors.sh installed only requirements/kv_connectors_rocm.txt, which held just tblib and lm_eval[api]. Both are already in the hash-locked requirements/test/rocm.txt, which the test-deps stage installs in full (Dockerfile.rocm L379–383). That stage also fails if a test dependency changes a shipped package. So this PR deletes kv_connectors_rocm.txt.
  • check-kv-connectors.sh checks that tblib and lm-eval are present on ROCm and installs nothing at run time.

One caveat: none of the re-enabled AMD jobs have run on this PR yet. They are MI355 V1 KV Connectors, MoRIIO unit, MoRIIO WRITE E2E and the Torchrun mirror. I'll start a selected-steps run for them to confirm.

🤖 Addressed by Claude Code

@khluu

khluu commented Nov 5, 2026

Copy link
Copy Markdown
Member Author

Claude Code here (on behalf of @khluu). AMD results from https://buildkite.com/vllm/ci/builds/100125 at 697d171:

None of these involve the image or dependency changes in this PR.

🤖 Generated with Claude Code

khluu and others added 2 commits November 5, 2026 02:51
…mage

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Signed-off-by: khluu <khluu000@gmail.com>
…t xfail

The V1 KV Connectors job has been disabled since #63609, and 9 test IDs
broke on main in the meantime. Mark them strict xfail so the rest of the
job (about 2,100 tests on CUDA, 2,400 on ROCm) can run again. Each marker
names its fix; strict means the fix PR must remove it.

- NIXL packed DSv4 MLA region, v41-aliased-groups (#64661)
- Mooncake register_worker retry and max-attempts (#63122)
- Mooncake expired request counter (no _kv_lease_duration; no fix yet)
- HiSparse draft layer rows, both CUDA graph modes (#64240 for ROCm;
  stub lacks max_swap_rows)
- Mooncake store HMA round trip, MLA BLHNC/BLNHC, ROCm only (no fix yet)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: khluu <khluu000@gmail.com>
@khluu

khluu commented Nov 6, 2026

Copy link
Copy Markdown
Member Author

Claude Code here (on behalf of @khluu). Pushed 0c3e9b1 so V1 KV Connectors can be re-enabled with the rest of this PR. It marks the 9 test IDs that broke on main while the job was disabled as xfail(strict=True). Each marker's reason names its fix, and strict means the fix PR fails until it removes the marker.

Test Fails on Fix
test_nixl_connector.py::test_register_packed_dsv4_mla_cache_as_single_region[v41-aliased-groups] CUDA, ROCm #64661
test_mooncake_connector.py::test_register_worker_retries_on_read_timeout, …raises_after_max_attempts CUDA, ROCm #63122
test_mooncake_stats.py::test_expired_request_bumps_counter (no _kv_lease_duration) CUDA, ROCm none yet
test_hisparse_connector.py::test_draft_layer_rows_mirrored_after_drafter[FULL/NONE] CUDA (stub lacks max_swap_rows), ROCm (platform check, #64240) partial
test_mooncake_store_hma_e2e.py::test_store_values_round_trip_every_layout[mla-BLHNC/BLNHC] ROCm only none yet

The rest of the job is about 2,100 tests on CUDA and 2,400 on ROCm, all passing in builds 100048 and 100125. Selected-steps re-run of V1 KV Connectors on both platforms: https://buildkite.com/vllm/ci/builds/100485

@mergify mergify Bot added hisparse Related to HiSparse nixl NIXL KV connector / multi-tiered KV offloading (KVCR) labels Nov 6, 2026
khluu and others added 2 commits November 5, 2026 23:25
#63988 added the test with a 16-token offload block while the V1 KV
Connectors job was disabled; #63231 then raised the default GPU block
size to 64, which the offload block must divide. Pin block_size=16 as
#63231 did for test_example_connector.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: khluu <khluu000@gmail.com>
…mage

Take main's test_offloading_connector.py: #66019 pins the same block_size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Signed-off-by: khluu <khluu000@gmail.com>
@khluu
khluu merged commit 91630dd into main Nov 6, 2026
58 checks passed
@khluu
khluu deleted the ci/kv-connectors-in-image branch November 6, 2026 19:58
Isotr0py added a commit to Isotr0py/vllm that referenced this pull request Nov 7, 2026
KV connectors are now baked into the CI image hash-locked (upstream
vllm-project#65145); follow the check-kv-connectors.sh convention and run the test
with the image's Python directly.

Co-authored-by: Kimi Code <noreply@moonshot.cn>
Signed-off-by: Isotr0py <Isotr0py@outlook.com>
@pylaterreur pylaterreur mentioned this pull request Nov 7, 2026
6 tasks done
yeshihai pushed a commit to yeshihai/vllm that referenced this pull request Nov 8, 2026
…heir jobs (vllm-project#65145)

Signed-off-by: khluu <khluu000@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
liranschour added a commit to liranschour/vllm that referenced this pull request Nov 9, 2026
Resolve the disaggregated.yaml conflict with vllm-project#65145, which bakes the
hash-locked KV connectors into the CI image and re-enables the file's
steps. Enable the four P2P steps, still optional and [Nightly], and run
check-kv-connectors.sh instead of the removed install-kv-connectors.sh.

Signed-off-by: Liran Schour <lirans@il.ibm.com>
khluu added a commit to atalman/vllm that referenced this pull request Nov 10, 2026
The kv-connectors pip-compile hook (vllm-project#65145) came in from main with
--torch-backend cu130, which cannot resolve against this branch's
torch==2.14.0+cu132 pin. Switch it to cu132 and regenerate
requirements/test/kv_connectors_cuda.txt (torch and the nvidia-* libs
move to their CUDA 13.2 builds).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: khluu <khluu000@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/build hisparse Related to HiSparse k3 kimi kv-connector mooncake Mooncake KV-transfer / EC-transfer nixl NIXL KV connector / multi-tiered KV offloading (KVCR)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants