Skip to content

chore(planner): remove tests for deprecated power-of-two router mode - #18013

Closed
karen-sy wants to merge 1 commit into
mainfrom
karenc/fix-planner-power-of-two-tests
Closed

karen-sy wants to merge 1 commit into
mainfrom
karenc/fix-planner-power-of-two-tests

Conversation

@karen-sy

@karen-sy karen-sy commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Overview

main's planner unit tests fail on two cases in test_live_retune_frontend_config.py that pass --router-mode power-of-two, a mode #17899 removed. #17483 added the cases and merged 29 minutes before #17899, after #17899's CI had already run, so each PR passed on its own. This switches the frontend case to least-loaded and drops the worker case.

Key Changes

  • test_live_retune_frontend_config.py:
    • test_effective_argv passes --router-mode least-loaded, so one case still passes a hyphenated mode on the command line.
    • WORKER_GOLDEN_CASES drops --router-mode=power-of-two. The random, least-loaded and --router-mode=kv cases still cover a worker that sets its own mode and the --flag=value form.

Validation

Case Before Now
test_effective_argv and test_worker_router_mode_matches_the_real_worker_parser 2 failed: argparse rejects power-of-two 16 passed
test_live_retune_frontend_config.py 2 failed (post-merge run) 562 passed

Issues and Ongoing Work

Pull Request Checklist
  • I used Dynamo's /pr-checklist skill.

Summary by CodeRabbit

  • Tests
    • Updated frontend configuration checks to expect the least-loaded router mode and worker-parser cases to use the abbreviated random router option.
    • These updates affect test expectations only; no user-facing functionality changes are indicated.

#17483 added live-retune test cases that pass --router-mode power-of-two
to the frontend and a worker. #17899 removed that mode, and the two
merged 29 minutes apart, so main's planner unit tests fail on both
cases. Use least-loaded for the frontend case and drop the worker case,
which the random, least-loaded and --router-mode=kv cases already cover.

Refs DYN-5265

Signed-off-by: Karen Chung <karenc@nvidia.com>
@coderabbitai

coderabbitai Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Planner tests now expect least_loaded for the least-loaded router mode and use --router-m random in a worker parser case.

Changes

Router mode test expectations

Layer / File(s) Summary
Update router mode test expectations
components/src/dynamo/planner/tests/unit/test_live_retune_frontend_config.py
The effective-argv test expects least_loaded for least-loaded. A worker parser golden case uses --router-m random instead of --router-mode=power-of-two.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Merge Risk: Minimal · up to a8e69

The test updates align coverage with the currently supported router modes and are mergeable.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: removing tests for the deprecated power-of-two router mode.
Description check Passed The description includes all required sections and provides clear context, key changes, validation results, and ongoing work. The unchecked checklist item is non-critical.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between a80115b and a8e698f.

Files selected for processing: 1
  • components/src/dynamo/planner/tests/unit/test_live_retune_frontend_config.py

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

@devin-ai-integration

Copy link
Copy Markdown
Contributor

❌ Dynamo PR CI failed — run 41776407217 (attempt 1) on a8e698f987

Gate checks: ✅ backend-status-check · ✅ deploy-status-check · ❌ dynamo-status-check

Other Jobs
dynamo-runtime ❌ 2 ✅ 5

Failure details

2 jobs failed: on both arm64 and amd64, the frontend unit test test_no_registered_env_var_is_read_from_os_environ fails (after 3 auto-retries) because the parsed default for reject_media_status_code is 0 instead of the registered default 415. No cancelled jobs.

❌ dynamo-runtime / test / sequential cuda13.0, arm64: test_no_registered_env_var_is_read_from_os_environ: reject_media_status_code default 0 != 415

Job: dynamo-runtime / test / sequential cuda13.0, arm64 · Failed step: Run CPU-only tests (parallelized) · Logs: gh run view --job 126401376108 -R ai-dynamo/dynamo --log-failed

components/src/dynamo/frontend/tests/test_frontend_parser_builder.py:62: in test_no_registered_env_var_is_read_from_os_environ
    assert vars(parser.parse_args([])) == defaults, sentinel
E   AssertionError: 0
E     Omitting 90 identical items, use -vv to show
E     Differing items:
E     {'reject_media_status_code': 0} != {'reject_media_status_code': 415}
...
FAILED components/src/dynamo/frontend/tests/test_frontend_parser_builder.py::test_no_registered_env_var_is_read_from_os_environ - AssertionError: 0
== 1 failed, 7784 passed, 170 skipped, 2854 deselected in 1928.40s (0:32:08) ===

components/src/dynamo/frontend/tests/test_frontend_parser_builder.py::test_no_registered_env_var_is_read_from_os_environ is the only failure in the pre_merge_cpu stage (failed on all 3 auto-retries). The frontend argument parser returns reject_media_status_code=0 with no args/env set, while the test expects the registered default of 415; all other 90 parsed defaults match.

❌ dynamo-runtime / test / sequential cuda13.0, amd64: test_no_registered_env_var_is_read_from_os_environ: reject_media_status_code default 0 != 415

Job: dynamo-runtime / test / sequential cuda13.0, amd64 · Failed step: Run CPU-only tests (parallelized) · Logs: gh run view --job 126401376220 -R ai-dynamo/dynamo --log-failed

components/src/dynamo/frontend/tests/test_frontend_parser_builder.py:62: in test_no_registered_env_var_is_read_from_os_environ
    assert vars(parser.parse_args([])) == defaults, sentinel
E   AssertionError: 0
E     Omitting 90 identical items, use -vv to show
E     Differing items:
E     {'reject_media_status_code': 0} != {'reject_media_status_code': 415}
...
FAILED components/src/dynamo/frontend/tests/test_frontend_parser_builder.py::test_no_registered_env_var_is_read_from_os_environ - AssertionError: 0
== 1 failed, 7784 passed, 170 skipped, 2854 deselected in 1579.91s (0:26:19) ===

components/src/dynamo/frontend/tests/test_frontend_parser_builder.py::test_no_registered_env_var_is_read_from_os_environ is the only failure in the pre_merge_cpu stage (failed on all 3 auto-retries). The frontend argument parser returns reject_media_status_code=0 with no args/env set, while the test expects the registered default of 415; all other 90 parsed defaults match.

For agents
{"pr": 18013, "run_id": 41776407217, "run_attempt": 1, "head_sha": "a8e698f98785a016edc5bc7545d765eef0583ccc", "failures": [{"job": "dynamo-runtime / test / sequential cuda13.0, arm64", "job_id": 126401376108, "failed_step": "Run CPU-only tests (parallelized)", "signature": "AssertionError: reject_media_status_code default 0 != 415", "tests": ["components/src/dynamo/frontend/tests/test_frontend_parser_builder.py::test_no_registered_env_var_is_read_from_os_environ"], "log_cmd": "gh run view --job 126401376108 -R ai-dynamo/dynamo --log-failed"}, {"job": "dynamo-runtime / test / sequential cuda13.0, amd64", "job_id": 126401376220, "failed_step": "Run CPU-only tests (parallelized)", "signature": "AssertionError: reject_media_status_code default 0 != 415", "tests": ["components/src/dynamo/frontend/tests/test_frontend_parser_builder.py::test_no_registered_env_var_is_read_from_os_environ"], "log_cmd": "gh run view --job 126401376220 -R ai-dynamo/dynamo --log-failed"}]}

Posted automatically by Devin for run 41776407217. Updated on every full-CI run of this PR.

@karen-sy
karen-sy enabled auto-merge (squash) November 4, 2026 15:16
@karen-sy

karen-sy commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

addressed by #14775, closing

@karen-sy karen-sy closed this Nov 4, 2026
auto-merge was automatically disabled November 4, 2026 18:15

Pull request was closed

@karen-sy
karen-sy deleted the karenc/fix-planner-power-of-two-tests branch November 4, 2026 18:50
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