Skip to content

Commit fdb2256

Browse files
authored
Prevent rustup self update (#327)
By default `rusup` performs a self-update when installing a new rustc toolchain, Sometimes, the files are locked by windows, and the self update can fail as described here: rust-lang/rustup#2441 Since this is a pipeline run, we have no need to update rustup, and can rely on the version provided by the runner. By disabling the self update, the file conflict `The process cannot access the file because it is being used by another process` no longer appears.
1 parent 3a9daad commit fdb2256

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

.sync/Version.njk

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#}
3131

3232
{# The git ref value that files dependent on this repo will use. #}
33-
{% set mu_devops = "v9.1.6" %}
33+
{% set mu_devops = "v9.1.7" %}
3434

3535
{# The latest Project Mu release branch value. #}
3636
{% set latest_mu_release_branch = "release/202311" %}

.sync/azure_pipelines/RustSetupSteps.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,15 @@ steps:
8282
# those on both Linux and Windows agents for consistency in the pipeline runs.
8383
#
8484
- script: |
85-
rustup install {{ sync_version.rust_toolchain }}
86-
rustup default {{ sync_version.rust_toolchain }}
85+
rustup install --no-self-update {{ sync_version.rust_toolchain }}
8786
displayName: Install Rust {{ sync_version.rust_toolchain }} (Windows)
8887
condition: eq(variables['Agent.OS'], 'Windows_NT')
8988

89+
- script: |
90+
rustup default {{ sync_version.rust_toolchain }}
91+
displayName: Set Rust {{ sync_version.rust_toolchain }} (Windows)
92+
condition: eq(variables['Agent.OS'], 'Windows_NT')
93+
9094
- script: pip install requests --upgrade
9195
displayName: Install and Upgrade requests PIP Module
9296
condition: succeeded()

Steps/RustSetupSteps.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,15 @@ steps:
7979
# those on both Linux and Windows agents for consistency in the pipeline runs.
8080
#
8181
- script: |
82-
rustup install 1.74.0
83-
rustup default 1.74.0
82+
rustup install --no-self-update 1.74.0
8483
displayName: Install Rust 1.74.0 (Windows)
8584
condition: eq(variables['Agent.OS'], 'Windows_NT')
8685

86+
- script: |
87+
rustup default 1.74.0
88+
displayName: Set Rust 1.74.0 (Windows)
89+
condition: eq(variables['Agent.OS'], 'Windows_NT')
90+
8791
- script: pip install requests --upgrade
8892
displayName: Install and Upgrade requests PIP Module
8993
condition: succeeded()

0 commit comments

Comments
 (0)