Skip to content

Route signed-binary packages through a per-artifact release path - #48966

Draft
Daniel Jurek (danieljurek) wants to merge 22 commits into
mainfrom
djurek/bdist-sign-release
Draft

Route signed-binary packages through a per-artifact release path#48966
Daniel Jurek (danieljurek) wants to merge 22 commits into
mainfrom
djurek/bdist-sign-release

Conversation

@danieljurek

Copy link
Copy Markdown
Member

Packages that ship compiled binaries need ESRP-signed wheels before release, but signing was keyed off ServiceDirectory, which pulled every storage package onto the signed path. Make it a per-artifact opt-in instead.

  • An artifact sets signBinaries: true in its service ci.yml to get a Sign_<safeName> stage and release from packages_<safeName>_signed
  • Every other artifact releases from packages_extended off the build stage as before, so a service can mix both kinds
  • Release jobs move verbatim into release-artifact.yml so the two paths stay single-sourced
  • Signing runs on release and scheduled builds, never on PR builds
  • Integration publishes the signed wheels for opted-in artifacts

Daniel Jurek (danieljurek) and others added 20 commits July 23, 2026 09:54
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Restores the azure-sdk-build-tools repository resource referenced by the
mac/win signing templates (@azure-sdk-build-tools), pinned to tag
azure-sdk-build-tools_20260702.2 to match azure-dev. This seeds a ref line
that the tools-repo-versioning auto-updater will keep current.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8225ba73-f36e-4078-b21a-a7a166d261f9
Restores the ESRP publish path (isolate + esrp-publish.yml) gated on
PublicFeed == 'PyPi'. Reads from packages_all_signed/<artifact>, so the
signed wheels/sdist are what get published.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8225ba73-f36e-4078-b21a-a7a166d261f9
ESRP Code Signing used minimatch pattern '*.pyd' (non-recursive) against
win-sign-input/, but extract_sign_inputs.py places .pyd in numbered
subfolders (00000/crc64.pyd). The glob matched 0 of 4 files, the task
reported success signing nothing, and repackage reinserted unsigned .pyd.
Mac was unaffected because it zips the payload dir and signs the zip.

Change WinPattern to '**/*.pyd' so ESRP recurses into the subfolders,
matching the mac path's recursive behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8225ba73-f36e-4078-b21a-a7a166d261f9
Uncomment the esrp-publish.yml template call that was temporarily disabled
during signing-pipeline testing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8225ba73-f36e-4078-b21a-a7a166d261f9
# Conflicts:
#	eng/pipelines/templates/stages/archetype-python-release.yml
#	sdk/storage/azure-storage-extensions/CHANGELOG.md
Packages that ship compiled binaries need their wheels signed by ESRP before
release, but the previous approach keyed signing off ServiceDirectory, which
dragged every storage package onto the signed path.

Make it a per-artifact opt-in instead. An artifact sets `signBinaries: true` in
its service ci.yml and gets a dedicated Sign_<safeName> stage plus a
Release_<safeName> stage fed from the resulting packages_<safeName>_signed
artifact. Every other artifact keeps releasing from packages_extended off the
build stage exactly as before, so a service can mix both kinds of packages.

The signed artifact mirrors the layout of packages_extended, so the release jobs
work against it unchanged. To keep those jobs single-sourced they move verbatim
into release-artifact.yml, which parameterizes only the artifact name and the
upstream stage. packages_extended itself is untouched.

Signing runs on release and scheduled builds and never on PR builds: the public
project cannot reach internal/azure-sdk-build-tools, and ESRP must not be handed
unreviewed code. Scheduled runs are included because the Integration stage now
publishes signed alpha packages to the dev feed for opted-in artifacts.

The signing stage deliberately ignores Skip.Release and SetDevVersion. Those
belong on the consumers, which already carry them; checking them here would
propagate through Integration's dependency and silently break the nightly and
manual dev version alpha publishes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 9079636e-8478-4697-ae82-538136cd41b5
@azure-pipelines

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

@github-actions github-actions Bot added the Storage Storage Service (Queues, Blobs, Files) label Sep 10, 2026
Testing the scheduled path directly, rather than simulating it with a
queue-time SetDevVersion, showed the signing condition was only ever being
satisfied by its 'Manual' term. Two gaps that hid behind that:

The 'Schedule' term is coupled to daily-dev-build-variable.yml, which sets
SetDevVersion only when Build.Reason is exactly 'Schedule'. Alpha wheels exist
only when that is true, so the two must widen together. Record that, along with
why the reasons left out of the list need no signing.

A missing signed artifact skips one package's alpha publish by design, so a
signing failure cannot take down the dev feed publish for a whole service. Raise
it as a build issue rather than Write-Warning so that degradation shows up in
the run summary instead of only in the task log.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 9079636e-8478-4697-ae82-538136cd41b5
ENABLE_EXTENSION_BUILD gated the mac and windows builds on a hardcoded
azure-storage-extensions name check, so any other package opting into
signBinaries got a signing stage with no wheels to sign. Resolve it from
the artifact property instead, which Save-Package-Properties already
copies into each package info file as ArtifactDetails.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 9079636e-8478-4697-ae82-538136cd41b5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Storage Storage Service (Queues, Blobs, Files)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants