Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Install Rust Toolchain Components" step is redundant #78

Closed
laniakea64 opened this issue Mar 25, 2024 · 3 comments
Closed

"Install Rust Toolchain Components" step is redundant #78

laniakea64 opened this issue Mar 25, 2024 · 3 comments
Labels

Comments

@laniakea64
Copy link
Collaborator

As far back as our unexpired CI logs go, the "Install Rust Toolchain Components" step has always returned this -

Run rustup component add clippy rustfmt
info: component 'clippy' for target 'x86_64-unknown-linux-gnu' is up to date
info: component 'rustfmt' for target 'x86_64-unknown-linux-gnu' is up to date

So the pre-installed Rust toolchain already has the components we need. So we could remove that step and not use rustup, for the same result.

On the other hand, the "Info" step shows that the pre-installed version of Rust is sometimes one behind the latest. For example, from our latest CI run on 23 March -

Run rustup --version
  rustup --version
  cargo --version
  cargo clippy --version
  cargo fmt --version
  shell: /usr/bin/bash -e {0}
  env:
    RUSTFLAGS: --deny warnings
info: This is the version for the rustup toolchain manager, not the rustc compiler.
rustup 1.27.0 (bbb9276d2 2024-03-08)
info: The currently active `rustc` version is `rustc 1.76.0 (07dca489a 2024-02-04)`
cargo 1.76.0 (c84b36747 2024-01-18)
clippy 0.1.76 (07dca48 2024-02-04)
rustfmt 1.7.0-stable (07dca48 2024-02-04)

But latest rustc/cargo was already 1.77.0 for two days then. If this matters, the "Install Rust Toolchain Components" step should be expanded to have rustup download and set up latest stable Rust version.

Is "always very latest stable Rust version" important in our CI?

@laniakea64 laniakea64 added the ci label Mar 25, 2024
@laniakea64
Copy link
Collaborator Author

So the pre-installed Rust toolchain already has the components we need.

And they are not ride-alongs, this is completely intentional documented in https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#rust-tools

Of greater concern is that I don't see Vim listed anywhere in that link? What's pulling Vim into our CI environment? Should we ensure Vim is installed and run a Vim version check?

Is "always very latest stable Rust version" important in our CI?

I lean towards Nope. Unlike some projects, our test runner isn't super-sensitive to Rust version, and the included Rust version works fine for the main purpose of our CI: testing the Vim files. Mostly filed this issue to check that I'm not missing something in that thinking?

@laniakea64
Copy link
Collaborator Author

What's pulling Vim into our CI environment?

The answer appears to be, CI is using the vim deb package which is required by the ubuntu-server metapackage.

While it makes sense that the Ubuntu image would use Ubuntu Server as a base, Ctrl+F on the above linked documentation page does not find any mention of ubuntu-server or even Ubuntu Server. So to us, the presence of Vim we've been relying on is an implementation detail with unknown stability.

In light of this finding, it would seem wise to have a "Check Vim installation" step to ensure Vim is installed and verify that vim --version works. Might anyway be useful to keep track of what Vim version CI is working with.

@laniakea64 laniakea64 added the leave open Leave open when resolved label Apr 4, 2024
@laniakea64
Copy link
Collaborator Author

Since NoahTheDuke thumbed up #78 (comment) and no additional points were raised, the "Install Rust Toolchain Components" CI step has been removed on main. The CI run was successful.

Leaving open for the uncovered potential issue with Vim presence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant