Skip to content

Conversation

danieljurek
Copy link
Member

@danieljurek danieljurek commented Oct 13, 2025

Warning

SERVICE OWNERS: no need to review this PR. I'm making engsys changes to ci.yml files.

Really fixes #3035

[keeping as draft to avoid notifying everyone]

A new release crate-packing strategy for Rust which uses cargo publish --dry-run to produce the crates:

cargo publish --dry-run --package <package1> --package <package2> ...

This uses existing tooling to do the build with no vendoring or separate packing. Release order sorting can be read from the tool output and doesn't need to be computed from metadata. cargo publish also verifies that dependencies defined in the package's Cargo.toml are published and fails if they are not published.

This also supports the current Pre-GA approach of not incrementing core's versions after release as the workspace dependency includes

For example:

If a package depends on [email protected] and there is no [email protected] published on crates.io, the command will fail. It's possible to "atomically" generate packages for releases with unreleased dependencies if those dependencies are included in the package command (e.g. storage_blobs depending on storage_common)

Formatting:

Formatting attempts to match reasonable outputs. Redirecting stderr from cargo publish would normally result in red console text. The cargo publish command is also grouped: https://dev.azure.com/azure-sdk/public/_build/results?buildId=5461494&view=logs&j=b766ebde-1fdb-5f11-1350-46ddc53b23cf&t=7ef29fa0-f532-5653-3473-16dc04608431&l=104

image

Tests:

Scenario Expected Outcome Links
Release azure_canary w/o required azure_canary_core (intra-service dependency) Fail https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5460934&view=results
Release azure_canary and azure_canary_core (intra-service dependency) Success https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5460932&view=results
Release azure_canary_core Success https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5460854&view=results
Release azure_canary_core which depends on unreleased azure_core Fail https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5460945&view=results
Release azure_canary_core which depends on released azure_core Success https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5460949&view=results
Manually queued live tests (no release) for Key Vault Success https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5460954&view=results
PR pipeline works Success https://dev.azure.com/azure-sdk/public/_build/results?buildId=5460931&view=results

@github-actions github-actions bot added Azure.Core The azure_core crate Azure.Identity The azure_identity crate Cosmos The azure_cosmos crate Event Hubs KeyVault Key Vault Storage Storage Service (Queues, Blobs, Files) labels Oct 13, 2025
@danieljurek danieljurek moved this from Untriaged to In PR in Azure SDK for Key Vault Oct 15, 2025
@danieljurek danieljurek changed the title [Draft] ESRP Publishing [Ready for EngSys Review] ESRP Publishing Oct 15, 2025
@danieljurek danieljurek marked this pull request as ready for review October 17, 2025 16:21
@Copilot Copilot AI review requested due to automatic review settings October 17, 2025 16:21
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements a new ESRP-based publishing strategy for Rust crates that uses cargo publish --dry-run to package crates and publishes them through ESRP instead of directly to crates.io. The changes include:

  • Replacing direct crates.io publishing with ESRP release process
  • Switching from safeName to releaseInBatch parameters for artifact configuration
  • Refactoring Pack-Crates.ps1 to use cargo publish --dry-run instead of custom vendoring
  • Updating package info extraction to work with .crate files instead of Cargo.toml

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
sdk/storage/ci.yml Adds release parameters for storage crates and updates artifact configuration with releaseInBatch
sdk/servicebus/ci.yml Adds release parameter for servicebus crate and updates artifact configuration
sdk/keyvault/ci.yml Adds release parameters for keyvault crates and updates artifact configuration
sdk/identity/ci.yml Adds release parameter for identity crate and updates artifact configuration
sdk/eventhubs/ci.yml Adds release parameters for eventhubs crates and updates artifact configuration
sdk/cosmos/ci.yml Adds release parameter for cosmos crate and updates artifact configuration
sdk/core/ci.yml Adds release parameters for core crates with inconsistent naming and updates artifact configuration
sdk/canary/ci.yml Adds release parameters for canary crates and updates artifact configuration
eng/scripts/Pack-Crates.ps1 Refactors crate packing to use cargo publish --dry-run and removes custom vendoring logic
eng/scripts/Language-Settings.ps1 Updates to extract package info from .crate files instead of Cargo.toml
eng/pipelines/templates/stages/archetype-sdk-client.yml Filters artifacts based on releaseInBatch parameter
eng/pipelines/templates/stages/archetype-rust-release.yml Replaces direct crates.io publishing with ESRP release process and removes yank job
eng/pipelines/templates/jobs/pack.yml Adds logic to configure crate packing based on release parameters

Copy link
Member

@heaths heaths left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing blocking if we need to get something in, but I'd really love to see us stop pushing and popping directories (at least don't use the manual set-location and restore way). There should be no reason to change directories with cargo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Azure.Core The azure_core crate Azure.Identity The azure_identity crate Cosmos The azure_cosmos crate Event Hubs KeyVault Key Vault Storage Storage Service (Queues, Blobs, Files)

Projects

Status: Untriaged
Status: 🤔 Triage
Status: In PR

Development

Successfully merging this pull request may close these issues.

Publish crates using ESRP

4 participants