Now that #4486 is merged, we should look at either removing or limiting use of eng/pipelines/templates/steps/use-rust.yml. It seems to be wrong in some uses, deciding on 1.92 but then we end up using a stable or nightly pinned toolchain making that previous rustup set active call useless and even deceptive when diagnosing pipeline failures.
I had copilot build a call graph and where the Toolchain parameter is set:
Top-level pipeline roots under eng/pipelines that reach use-rust.yml: pr.yml and pullrequest.yml. prepare-pipelines.yml does not. There is also one standalone template path via templates/jobs/perf.yml, but nothing under eng/pipelines references it.
- eng/pipelines/pullrequest.yml
- templates/stages/archetype-sdk-client.yml - templates/jobs/ci.yml - templates/jobs/pack.yml - templates/steps/use-rust.yml — Toolchain not passed → defaults to active
- templates/steps/use-rust.yml — Toolchain: $(PackToolchain) → 1.92
- templates/jobs/analyze.yml — ci.yml sets Toolchain*#COLON|* stable - templates/steps/use-rust.yml — Toolchain: nightly (conditional: only when analyze toolchain != nightly)
- templates/steps/use-rust.yml — Toolchain: stable
- eng/common/pipelines/templates/jobs/generate-job-matrix.yml - templates/jobs/ci.tests.yml - templates/steps/use-rust.yml — Toolchain*#COLON|* $(RustToolchainName) - from templates/stages/pr-platform-matrix.json
- values used: stable on Ubuntu/Windows/macOS; msrv and nightly only on Ubuntu
- eng/common/pipelines/templates/jobs/generate-job-matrix.yml - templates/jobs/live.tests.yml - templates/steps/use-rust.yml — Toolchain: $(RustToolchainName)
- this path exists in the hierarchy, but pullrequest.yml sets RunLiveTests: false
- templates/stages/archetype-rust-release.yml - templates/steps/use-rust.yml — Toolchain: nightly
- this path is present in the template, but pullrequest.yml sets IncludeRelease: false
- eng/pipelines/pr.yml
- same template chain as pullrequest.yml
- differences: - MatrixConfigs comes from archetype-sdk-client.yml defaults, so ci.tests.yml gets $(RustToolchainName) = stable | msrv | nightly from templates/stages/platform-matrix.json
- RunLiveTests is not set here, so it stays false by default
- IncludeRelease stays true by default, so the release path is not disabled by parameter, but it is still gated by the stage conditions in archetype-sdk-client.yml
- Standalone template path not referenced by another file in eng/pipelines
- templates/jobs/perf.yml - eng/common/pipelines/templates/jobs/perf.yml - InstallLanguageSteps - templates/steps/use-rust.yml — Toolchain: stable
Templates that set Toolchain on the way to use-rust.yml:
- templates/jobs/ci.yml → stable for analyze.yml
- templates/jobs/analyze.yml → nightly, then ${{ parameters.Toolchain }}
- templates/jobs/pack.yml → omitted once, then $(PackToolchain) = 1.92
- templates/jobs/ci.tests.yml → $(RustToolchainName)
- templates/jobs/live.tests.yml → $(RustToolchainName)
- templates/stages/archetype-rust-release.yml → nightly
- templates/jobs/perf.yml → stable
Now that #4486 is merged, we should look at either removing or limiting use of
eng/pipelines/templates/steps/use-rust.yml. It seems to be wrong in some uses, deciding on 1.92 but then we end up using astableornightlypinned toolchain making that previousrustup set activecall useless and even deceptive when diagnosing pipeline failures.I had copilot build a call graph and where the
Toolchainparameter is set:Top-level pipeline roots under eng/pipelines that reach use-rust.yml: pr.yml and pullrequest.yml. prepare-pipelines.yml does not. There is also one standalone template path via templates/jobs/perf.yml, but nothing under eng/pipelines references it.
Templates that set Toolchain on the way to use-rust.yml: