Repository navigation
fix: unbreak main — kv-router strict_priority call sites + vllm get_diff_sampling_param test mock - #10689
Conversation
main does not compile: #10638 added a strict_priority: u32 parameter to KvScheduler::schedule_with_block_hashes, but the runtime-free selection service callers added concurrently in #10641 (select / select_and_reserve) were not updated, so they call the method with 16 of 17 arguments (E0061). The two PRs do not conflict textually (different files), so the merge was clean but the result fails to build, breaking the build job on every open PR. Pass strict_priority = 0 (baseline tier) at both call sites, preserving the pre-#10638 behavior of these callers. Verified with cargo check -p dynamo-kv-router. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: nnshah1 <neelays@nvidia.com>
WalkthroughThe PR adds a ChangesSelection strict priority parameter
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
Address review: SelectRequest / SelectAndReserveRequest exposed priority_jump but not strict_priority, so selection-service callers were pinned to tier 0. Add an optional strict_priority field (mirrors priority_jump: #[serde(default)] Option), and pass req.strict_priority.unwrap_or(0) to the scheduler instead of a hard-coded 0. Backward compatible — omitted field defaults to baseline tier 0. Matches how push_router/selection.rs already sources strict_priority from routing metadata. Verified with cargo check -p dynamo-kv-router. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: nnshah1 <neelays@nvidia.com>
Second main build/test break (independent of the kv-router one in this PR): #10667 changed llm_engine.start() to read sampling params from vllm_config.model_config.get_diff_sampling_param(), but the test added concurrently in #10648 (test_unified_start_returns_normalized_served_model_name) mocks vllm_config.model_config as SimpleNamespace(max_model_len=4096) — without that method — so the test raises AttributeError on current main. Add get_diff_sampling_param to the model_config mock (returns {}, matching the pre-#10667 create_model_config path and the sibling test at L526). Pure test mock fix; no production change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: nnshah1 <neelays@nvidia.com>
|
Heads-up @PeaBrane: folded a second, independent main-unbreak into this PR (commit |
…ice call sites (ai-dynamo#10689) Signed-off-by: nnshah1 <neelays@nvidia.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Fixes a build break on
main:dynamo-kv-routerdoes not compile (E0061).Cause
A semantic merge conflict between two PRs that merged the same day and do not overlap textually:
feat(kv-router): add per-request strict priority tiers, merged ~22:54 UTC) added a newstrict_priority: u32parameter toKvScheduler::schedule_with_block_hashesand updated all call sites that existed at the time.feat(kv-router): add runtime-free selection service, merged earlier ~16:28 UTC) added new callers —select/select_and_reserveinservices/selection/core/mod.rs— that feat(kv-router): add per-request strict priority tiers #10638 never saw, so they were not updated.Git merged both cleanly (different files), but the result calls the 17-arg method with 16 args:
This fails the build job on every open PR.
Fix
Pass
strict_priority = 0(the baseline tier) at both call sites.strict_priorityis the high-order component of the scheduling sort key(strict_priority, policy_score);0is the default tier and preserves the pre-#10638 behavior of these callers (which had no concept of strict priority).Verified locally with
cargo check -p dynamo-kv-router(clean).cc @PeaBrane (author of both #10638 and #10641) — flagging in case you would rather wire
strict_prioritythroughSelectRequestinstead of defaulting; this PR is the minimal unbreak.🤖 Generated with Claude Code
Summary by CodeRabbit
Related Issues
Standalone build fix — does not close a tracked issue. Resolves the
dynamo-kv-routerE0061build break introduced onmainby the #10638 + #10641 merge interaction.Update: second independent main break folded in (commit d41d1bd)
While validating CI, a second broken-main failure surfaced — unrelated to kv-router and to this PR's original diff:
fix(vllm): reuse engine model config) changedllm_engine.start()to read sampling params fromvllm_config.model_config.get_diff_sampling_param().fix(vllm): normalize unified served model name) addedtest_unified_start_returns_normalized_served_model_namewith a mock that only putsget_diff_sampling_paramoncreate_model_config()— not onvllm_config.model_config— so the test raisesAttributeErroron currentmain.Same concurrent-merge pattern as the kv-router break. Because these are two independent breaks on
main, no single-fix PR can reach green CI in isolation — so both unbreaks are bundled here so this PR can actually go green and unblock everyone. The vllm change is a 1-line test-mock fix (returns{}, matching the pre-#10667 path and the sibling test).