Skip to content

chore: Pin rust toolchain to latest stable to prevent random CI failures#2685

Closed
rbro112 wants to merge 1 commit intomasterfrom
ryan/pin_rust_toolchain_to_latest_stable_to_prevent_random_ci_failures
Closed

chore: Pin rust toolchain to latest stable to prevent random CI failures#2685
rbro112 wants to merge 1 commit intomasterfrom
ryan/pin_rust_toolchain_to_latest_stable_to_prevent_random_ci_failures

Conversation

@rbro112
Copy link
Copy Markdown
Member

@rbro112 rbro112 commented Aug 7, 2025

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.

@rbro112 rbro112 requested review from a team and szokeasaurusrex as code owners August 7, 2025 22:22
@rbro112 rbro112 changed the title Pin rust toolchain to latest stable to prevent random CI failures chore: Pin rust toolchain to latest stable to prevent random CI failures Aug 7, 2025
Copy link
Copy Markdown
Member Author

rbro112 commented Aug 7, 2025

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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Fix in Cursor Fix in Web

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@szokeasaurusrex
Copy link
Copy Markdown
Member

Closing in favor of #2687, which would pin the toolchain universally, not just in the lint CI job

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.

2 participants