chore: Pin rust toolchain to latest stable to prevent random CI failures#2685
chore: Pin rust toolchain to latest stable to prevent random CI failures#2685
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
| - name: Install Rust Toolchain | ||
| run: rustup toolchain install stable --profile minimal --component clippy --component rustfmt --no-self-update | ||
| # Pin to specific version to avoid clippy lint changes in new releases | ||
| run: rustup toolchain install 1.89.0 --profile minimal --component clippy --component rustfmt --no-self-update |
There was a problem hiding this comment.
Bug: Rust Workflow Fails Due to Incorrect Toolchain
The lint.yml workflow installs Rust toolchain 1.89.0 but doesn't set it as the default. Consequently, subsequent rustup target add and cargo commands (e.g., fmt, clippy) may use a different toolchain, defeating the purpose of pinning the version to prevent CI failures. Fix by setting 1.89.0 as default (rustup default 1.89.0) or explicitly specifying it for each command (e.g., cargo +1.89.0).
There was a problem hiding this comment.
This is valid. Just because we install a specific version does not pin that version for the cargo commands we run here. #2687 should pin for all cargo commands
|
Closing in favor of #2687, which would pin the toolchain universally, not just in the lint CI job |

CI will often times fail when a new stable version of clippy (rust toolchain) is released. This occurred today (#2684) and previously (#2571), resulting in failures for unrelated PRs which blocked work.
Moving forward, I'd propose we pin to a specific version of the rust toolchain and instead of following with a fix to the lints, we explicitly update the toolchain and fix lints as part of that update. This prevents unnecessary developer frustration needing to wait for fixes to land before CI is fixed.