Skip to content

Backport CFS cargo registry config to hotfix/keyvault CI - #5129

Closed
ROHIT SINGHAL (rohitsinghal4u) wants to merge 1 commit into
hotfix/keyvaultfrom
hotfix/keyvault-ci-crates-mirror
Closed

Backport CFS cargo registry config to hotfix/keyvault CI#5129
ROHIT SINGHAL (rohitsinghal4u) wants to merge 1 commit into
hotfix/keyvaultfrom
hotfix/keyvault-ci-crates-mirror

Conversation

@rohitsinghal4u

Copy link
Copy Markdown
Contributor

Why

The keyvault 1.0.1 hotfix release pipeline (internal rust - keyvault, build 6744430) on hotfix/keyvault fails every cargo step — not because of the security fix, but because this branch was cut from the azure_security_keyvault_keys@1.0.0 release tag, which predates the repo's migration to the private crates.io mirror (Azure Artifacts feed, #5033).

Under 1ES NetworkIsolation there is no public crates.io egress, so cargo cannot reach index.crates.io:443:

Stage → task Command Error
Pack Crates → Check SemVer compatibility cargo install cargo-semver-checks connect to index.crates.io failed
Analyze → Run source analysis cargo install cargo-deny connect to index.crates.io failed
Test → Test Packages (stable/msrv/nightly × win/ubuntu) cargo build --all-features unable to update registry crates-io

What

Backport the eng-only registry plumbing from main so the pipeline routes cargo traffic through the azure-sdk-for-rust feed:

  • add eng/templates/config.toml.template — replaces crates.io with the sparse Azure Artifacts feed, and sets it as the default registry so Pack-Crates.ps1 needs no CI-only --registry flags.
  • eng/pipelines/templates/steps/use-rust.yml — before rustup, write that config to \/config.toml (falls back to ~/.cargo on this branch, where CARGO_HOME isn't relocated) and run NuGetAuthenticate@1 + CargoAuthenticate@0. Guarded by a new ConfigureRegistry parameter (default true), matching main.

use-rust.yml is the shared toolchain step in every cargo job (pack / analyze / tests / release), so this one injection point fixes all failing steps.

Scope / safety

After merge, re-queue rust - keyvault against hotfix/keyvault to publish 1.0.1.

The keyvault 1.0.1 hotfix release pipeline (internal 'rust - keyvault',
build 6744430) fails because hotfix/keyvault was cut from the 1.0.0
release tag, which predates the repo's migration to the private
crates.io mirror (Azure Artifacts feed, #5033). Under 1ES network
isolation there is no public crates.io egress, so every cargo step
fails to connect to index.crates.io:443:
  - cargo install cargo-semver-checks (Check SemVer compatibility)
  - cargo install cargo-deny (Run source analysis)
  - cargo build --all-features (Test Packages, all 6 jobs)

Backport the eng-only registry plumbing so the pipeline routes cargo
traffic through the azure-sdk-for-rust feed:
  - add eng/templates/config.toml.template (crates.io source replacement
    + default registry so Pack-Crates.ps1 needs no CI-only flags)
  - use-rust.yml: write the cargo config and run NuGetAuthenticate +
    CargoAuthenticate before rustup, guarded by a ConfigureRegistry
    parameter (default true)

No product code changes; the 1.0.1 challenge-cache security fix is
untouched.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
3 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@heaths

Copy link
Copy Markdown
Member

I've already checked out eng/ from the main branch in the hotfix/keyvault branch.

@heaths
Heath Stewart (heaths) deleted the hotfix/keyvault-ci-crates-mirror branch August 26, 2026 18:27
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