Skip to content

chore: green pre-commit on feat-deepinfra-runtime-07-09 - #31

Closed
sopwg612 wants to merge 1 commit into
feat-deepinfra-runtime-07-09from
chore-green-runtime-0709-precommit
Closed

chore: green pre-commit on feat-deepinfra-runtime-07-09#31
sopwg612 wants to merge 1 commit into
feat-deepinfra-runtime-07-09from
chore-green-runtime-0709-precommit

Conversation

@sopwg612

Copy link
Copy Markdown

Same idea as #26, for feat-deepinfra-runtime-07-09: green the one CI check that code can actually green on this branch.

pre-commit/action@v3.0.1 runs pre-commit run --all-files, so it lints the whole tree rather than a PR's diff — which means every PR against this branch inherits the branch's own lint state. Checking out the branch tip (e5c289605) and running pre-commit locally fails four hooks with zero PR changes applied:

isort .................. Failed
black .................. Failed
ruff ................... Failed
Report pytest markers .. Failed

pre-merge-status-check then goes red purely by aggregation (needs: [changed-files, pre-commit, ...]). The practical cost is that a real lint finding in a feature PR is indistinguishable from this background red.

What this does

  • isort / black over 8 planner modules and trtllm/publisher.py.

  • ruff — all four findings were in container/deps/trtllm/patches/v1.3.8/py_executor.py (F821 Undefined name 'ray', E712 == False). That file is a verbatim snapshot of upstream TRT-LLM source that Dockerfile.v6 COPYs over the installed package, maintained by diffing against upstream — reformatting it destroys the diff, and its findings are upstream's code, not ours. So container/deps/.*/patches/.* joins the existing top-level exclude (which already covers *.patch; these are the same thing kept as .py).

  • Report pytest markers — the standard planner block

    pytestmark = [pytest.mark.gpu_0, pytest.mark.pre_merge, pytest.mark.unit, pytest.mark.planner]

    added to the four unit test files lacking it (test_confirm_proposal, test_erlang_sizing, test_kstar_affine, test_num_req_gate), matching ~10 sibling files that already carry it. That clears all 65 missing marker sets. test_num_req_gate.py also needed import pytest, placed above the deliberate prometheus_names compatibility shim so the shim and its trailing late import stay intact.

After this, pre-commit run --all-files passes clean on the branch.

Formatting only — verified, not asserted

Every touched file's AST was dumped before and after and compared:

  • 11 of 12 files: identical AST.
  • rust_adapter.py: isort moves two stdlib imports into alphabetical order. Identical import set, identical non-import AST, and zero executable statements interleaved among the reordered imports — so the order is inert.
  • The four test files: identical AST plus exactly the added pytestmark node (and the one import pytest).

Still red after this, and not fixable by code

  • copyright-checks — dies at container init: docker pull ghcr.io/deepinfra/dynamo/helm-tester:0.1.1manifest unknown on this fork, so the header script never runs. Fails on every deepinfra/dynamo PR regardless of content (same finding as chore: green the videogen branch CI (pre-commit + copyright) #26).
  • lychee — pre-existing broken links in NVIDIA's upstream docs.

Related

#30 (trtllm routing.priority) inherits the pre-commit fix on rebase, exactly as #25 did from #26.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QqzQrZR2qrvxM6DsxqGciu

pre-commit/action runs --all-files, so every PR against this branch
inherits its lint state -- isort, black, ruff and the pytest-marker
report have all been red on the branch tip itself, which buries any
real finding a feature PR might introduce.

- isort/black over 8 planner modules plus trtllm/publisher.py.
- Exclude container/deps/**/patches/ . Those are verbatim snapshots of
  upstream engine source that a Dockerfile COPYs over the installed
  package; they are maintained by diffing against upstream, so
  reformatting them destroys the diff. All four ruff findings were in
  that tree and are upstream's code, not ours.
- Add the standard planner pytestmark block to the four unit test files
  that lacked it, clearing all 65 missing marker sets.

Formatting only: the AST of every touched file is unchanged, except
rust_adapter.py where isort reorders two stdlib imports (same import
set, same non-import AST, no executable code interleaved) and the four
test files which gain exactly the pytestmark node.

Signed-off-by: Sihan Wang <sihan@deepinfra.com>
@sopwg612

Copy link
Copy Markdown
Author

Folded into #30 as its second commit, at the author's request — one PR instead of a chore/feature split. Identical change; #30 now carries both the trtllm routing.priority fix and this cleanup, and pre-commit run --all-files passes clean there. Closing rather than merging so the commit lands once.

@sopwg612 sopwg612 closed this Aug 12, 2026
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