You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of our CI builds links and uses a custom toolchain which resides within the build artefacts.
This appears to persist between builds on the github runner, and makes a subsequent uses: dtolnay/rust-toolchain step fail during the rustup default step.
jost@freshcode-1:/tmp/my-project$ rustup override set broken
info: override toolchain for'/tmp/my-project'set to 'broken'
jost@freshcode-1:/tmp/my-project$ rustup override list
/tmp/my-project broken
jost@freshcode-1:/tmp/my-project$ rustup toolchain list
stable-x86_64-unknown-linux-gnu (default)
nightly-x86_64-unknown-linux-gnu
broken (override)
build 1 finishes and its artefacts get removed
jost@freshcode-1:/tmp/my-project$ rm -rf broken/
but the override remains known and present in ~/.rustup
jost@freshcode-1:/tmp/my-project$ rustup toolchain list
stable-x86_64-unknown-linux-gnu (default)
nightly-x86_64-unknown-linux-gnu
broken
jost@freshcode-1:/tmp/my-project$ ll ~/.rustup/toolchains/
total 16
drwxrwxr-x 4 jost jost 4096 Nov 18 11:30 ./
drwxrwxr-x 6 jost jost 4096 Aug 7 17:24 ../
lrwxrwxrwx 1 jost jost 22 Nov 18 11:30 broken -> /tmp/my-project/broken
drwxrwxr-x 7 jost jost 4096 Aug 22 11:47 nightly-x86_64-unknown-linux-gnu/
drwxrwxr-x 7 jost jost 4096 Oct 17 12:53 stable-x86_64-unknown-linux-gnu/
jost@freshcode-1:/tmp/my-project$ rustup override list
/tmp/my-project broken
a subsequent build now tries to install rust
The github action calls rustup default which fails because of the broken toolchain
jost@freshcode-1:/tmp/my-project$ rustup default stable-x86_64-unknown-linux-gnu
info: using existing install for'stable-x86_64-unknown-linux-gnu'
info: default toolchain set to 'stable-x86_64-unknown-linux-gnu'
stable-x86_64-unknown-linux-gnu unchanged - rustc 1.81.0 (eeb90cda1 2024-09-04)
error: override toolchain 'broken' is not installed: the directory override for'/tmp/my-project' specifies an uninstalled toolchain
Interestingly, the rustup default command does succeed in setting or changing the default, it just returns an error afterwards.
My suggestion would be to protect the rustup default command and catch the error ( it probably needs testing that the desired toolchain is now default afterwards).
I am unsure whether this is a bug that should be reported to rustup instead, but making the github action more robust might be a good idea anyway.
The text was updated successfully, but these errors were encountered:
One of our CI builds links and uses a custom toolchain which resides within the build artefacts.
This appears to persist between builds on the github runner, and makes a subsequent
uses: dtolnay/rust-toolchain
step fail during therustup default
step.build 1 creates a rust toolchain
...and uses it as an override
build 1 finishes and its artefacts get removed
but the override remains known and present in
~/.rustup
a subsequent build now tries to install
rust
The github action calls
rustup default
which fails because of the broken toolchainInterestingly, the
rustup default
command does succeed in setting or changing the default, it just returns an error afterwards.My suggestion would be to protect the
rustup default
command and catch the error ( it probably needs testing that the desired toolchain is now default afterwards).I am unsure whether this is a bug that should be reported to
rustup
instead, but making the github action more robust might be a good idea anyway.The text was updated successfully, but these errors were encountered: