Skip to content

Migrate perf artifact download steps to DownloadPipelineArtifact@2#5262

Merged
DrewScoggins merged 1 commit into
dotnet:mainfrom
mmitche:dev/download-pipeline-artifacts
Jul 16, 2026
Merged

Migrate perf artifact download steps to DownloadPipelineArtifact@2#5262
DrewScoggins merged 1 commit into
dotnet:mainfrom
mmitche:dev/download-pipeline-artifacts

Conversation

@mmitche

@mmitche mmitche commented Jul 15, 2026

Copy link
Copy Markdown
Member

Summary

Migrates the shared artifact download templates from DownloadBuildArtifacts@0 to DownloadPipelineArtifact@2:

  • eng/pipelines/templates/download-artifact-step.yml
  • eng/pipelines/templates/download-specific-artifact-step.yml

Why

DownloadBuildArtifacts@0 can only read legacy Build Artifacts. When a producer publishes a Pipeline Artifact, this task fails with Unsupported artifact type: PipelineArtifact and downloads nothing, causing the downstream ExtractFiles@1 (Unzip) step to fail with ENOENT.

DownloadPipelineArtifact@2 downloads both Build and Pipeline Artifacts (see the task reference — "Download build and pipeline artifacts"). Migrating the download side first is therefore backward compatible: it keeps working with today's Build Artifact producers and unblocks producers moving to Pipeline Artifacts.

Context

dotnet/runtime is migrating eng/pipelines from PublishBuildArtifacts@1 to PublishPipelineArtifact@1 in dotnet/runtime#128498. That change makes the BrowserWasm / BrowserWasmCoreCLR artifacts (consumed here via runtime-perf-job.ymldownload-artifact-step.yml) Pipeline Artifacts, which the current DownloadBuildArtifacts@0 cannot read.

Merge order: this PR should merge before dotnet/runtime#128498 so the runtime-wasm-perf pipeline keeps working across the transition.

Migration details

  • Removed downloadType / downloadPath / checkDownloadedFiles (not applicable to DownloadPipelineArtifact@2).
  • Added targetPath: '$(Build.SourcesDirectory)/__download__/${{ parameters.artifactName }}' so the existing ExtractFiles@1 glob patterns (__download__/<artifactName>/...) continue to match.
  • For the specific-build variant, mapped pipelinedefinition and buildIdpipelineId (the DownloadPipelineArtifact@2 input names).

Note

This PR description and changes were generated with the assistance of GitHub Copilot.

DownloadBuildArtifacts@0 cannot read Pipeline Artifacts, whereas
DownloadPipelineArtifact@2 downloads both Build and Pipeline Artifacts.
Migrating the download side first unblocks dotnet/runtime moving its
artifact publishing to Pipeline Artifacts, while remaining compatible
with the current Build Artifact producers.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: a76ca5e8-9da2-412f-8f6f-5a61d5ba62f5

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates shared Azure DevOps pipeline templates to use DownloadPipelineArtifact@2 instead of DownloadBuildArtifacts@0, so downstream perf pipelines can successfully consume both legacy Build Artifacts and newer Pipeline Artifacts (avoiding missing-download failures that break subsequent ExtractFiles@1 steps).

Changes:

  • Migrate the “current build” shared download template to DownloadPipelineArtifact@2 and set targetPath to preserve the existing __download__/<artifactName>/... layout.
  • Migrate the “specific build” shared download template to DownloadPipelineArtifact@2, mapping pipelinedefinition and buildIdpipelineId.
  • Remove inputs that are not applicable to the new task (downloadType, downloadPath, checkDownloadedFiles).

Reviewed changes

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

File Description
eng/pipelines/templates/download-artifact-step.yml Switches artifact download to DownloadPipelineArtifact@2 while keeping the unzip glob working via targetPath.
eng/pipelines/templates/download-specific-artifact-step.yml Switches specific-build artifact download to DownloadPipelineArtifact@2 with updated input names and preserved download folder structure.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mmitche
mmitche requested a review from DrewScoggins July 15, 2026 19:37

@DrewScoggins DrewScoggins left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@DrewScoggins
DrewScoggins merged commit 0e8ef38 into dotnet:main Jul 16, 2026
75 checks passed
DrewScoggins added a commit that referenced this pull request Jul 20, 2026
* Migrate "Download binlog files" steps to DownloadPipelineArtifact@2

The two inline binlog download steps in runtime-perf-job.yml still used
DownloadBuildArtifacts@0, which was missed by #5262. dotnet/runtime now
publishes these binlogs as Pipeline Artifacts (#128498), so migrate the
download side to DownloadPipelineArtifact@2, matching #5262's pattern
(drop downloadType/checkDownloadedFiles, downloadPath -> targetPath).
Paired with the runtime change giving these binlogs stable names.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6f47a24b-d0d8-4286-afcc-a1f3d96552c5

* Normalize remaining downloads to DownloadPipelineArtifact@2

Migrate the last inline "Download iOS Sample App" step in runtime-perf-job.yml
off DownloadBuildArtifacts@0, completing the move to DownloadPipelineArtifact@2
for all downloads in the perf pipeline YAML (eng/common is Arcade-managed and
left as-is).

DownloadPipelineArtifact@2 places a named artifact's contents directly in
targetPath, without the <artifactName> subfolder that DownloadBuildArtifacts@0
created. The payload-staging globs in run_performance_job.py used "**" without
recursive=True, so they only matched one intermediate directory and would miss
the now-flattened .binlog/.zip files (fatal for the iOS sample app zip). Make
those three globs recursive; recursive=True also still matches the old nested
layout, so it is safe across the transition.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6f47a24b-d0d8-4286-afcc-a1f3d96552c5

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

3 participants