Skip to content

[CI] Remove unused Rust setup from lint workflows - #33613

Merged
Tianlei Wu (tianleiwu) merged 2 commits into
mainfrom
eserscor-dev/erscor/2026/10/26-remove-unused-rust
Oct 26, 2026
Merged

Tianlei Wu (tianleiwu) merged 2 commits into
mainfrom
eserscor-dev/erscor/2026/10/26-remove-unused-rust

Conversation

@eserscor

@eserscor eserscor commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Description

Remove the unused Setup Rust step from both lint workflows:

  • Python format in .github/workflows/lint.yml.
  • Suggest fixes in .github/workflows/pr_checks.yml.

The configured linters are RUFF, RUFF-FORMAT, and CLANGFORMAT; their Python packages provide prebuilt wheels, and none invokes rustfmt. No lint rules, suggestion behavior, or SARIF handling are changed.

Validation:

  • actionlint.exe -config-file <temporary-config> -shellcheck= -pyflakes= .github\workflows\lint.yml .github\workflows\pr_checks.yml — passed with actionlint 1.7.12. The temporary configuration declares the existing custom runner label; optional ShellCheck/Pyflakes integrations were disabled.
  • A temporary fixture harness executed the workflows' lint/format/conversion shell commands under WSL Ubuntu 24.04 / Python 3.12.3, with rustup, rustc, rustfmt, and cargo unavailable on PATH. lintrunner init passed.
  • lintrunner --force-color --all-files --tee-json=lint.json -v followed by python -m lintrunner_adapters to-sarif lint.json lintrunner.sarif — formatting-error and non-formatting Ruff-error fixtures correctly returned lint exit 1 and produced valid nonempty SARIF; clean files returned lint exit 0 and valid empty SARIF.
  • The unchanged PR Checks command tail, set +e; lintrunner f --all-files -v; exit 0 — passed on formatting-error and clean fixtures. The error fixture was correctly formatted, and both runs returned exit 0 without Rust.
  • Injected dependency-install failure — correctly remained failing, with lint skipped and the existing secondary missing-adapter SARIF failure reproduced. This reporting behavior is intentionally unchanged.
  • git diff --check — passed.
  • Runner-side positive control on the first commit: Python format passed, including dependency installation, all-files lint, SARIF conversion, and SARIF upload; Rust setup was absent. The subsequent commit adds the same removal to PR Checks; its automatic CI is pending and is not covered by that earlier result.

Local fixture tests are not a full repository lint run. An isolated intentional-formatting-failure branch is being exercised separately as an automation negative control; its fixture is not included in this PR.

Motivation and Context

Both workflows share the same unnecessary Rust bootstrap and moving stable channel dependency. Six observed Lint / Python format runs failed during Rust setup and passed on retry at the identical merge commit. Failed attempts stopped in bootstrap-download retries before lintrunner ran; successful retries reported No lint issues. The PR Checks investigation independently found the same mechanism.

Representative failed attempt and successful retry. The missing lintrunner.sarif was secondary: dependency installation was skipped after Rust setup failed. Removing the unused toolchain eliminates that dependency rather than caching a tool neither workflow consumes.

The lint job runs Ruff and clang-format from Python wheels and does not use rustfmt. Remove the unnecessary Rust bootstrap and moving stable download dependency.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep PR Checks aligned with the Python format job: both run prebuilt lintrunner, Ruff, and clang-format packages without using rustfmt.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@eserscor eserscor changed the title [CI] Remove unused Rust setup from Python format lint [CI] Remove unused Rust setup from lint workflows Oct 26, 2026
@eserscor
eserscor marked this pull request as ready for review October 26, 2026 13:15
Copilot AI balanced review requested due to automatic review settings October 26, 2026 13:15

Copilot AI 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.

🟢 Approval recommended

The narrow deletions remove an unused dependency without changing downstream lint behavior, and no actionable issues were identified.

No open issues 🎉

What changed in this PR

Removes unused Rust setup from ONNX Runtime’s two lint workflows, eliminating a bootstrap dependency that caused intermittent failures.

Changes:

  • Removes Rust toolchain and rustfmt installation from both lint jobs.
  • Leaves lint rules, formatting suggestions, and SARIF handling unchanged.
File Description
.github/​workflows/​pr_checks.yml Removes Rust setup from the Suggest fixes job.
.github/​workflows/​lint.yml Removes Rust setup from the Python format job.

Review effort: Balanced

@tianleiwu
Tianlei Wu (tianleiwu) merged commit 6efb18a into main Oct 26, 2026
102 of 103 checks passed
@tianleiwu
Tianlei Wu (tianleiwu) deleted the eserscor-dev/erscor/2026/10/26-remove-unused-rust branch October 26, 2026 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants