Migrate eng/pipelines from PublishBuildArtifacts to PublishPipelineArtifact#128498
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Tagging subscribers to this area: @dotnet/runtime-infrastructure |
There was a problem hiding this comment.
Pull request overview
This PR updates the runtime repo’s Azure Pipelines YAML under eng/pipelines/ to use Pipeline Artifacts (PublishPipelineArtifact@1 / DownloadPipelineArtifact@2) instead of legacy Build Artifacts, including updating shared helper templates so callers pass the correct input names.
Changes:
- Replace
PublishBuildArtifacts@1withPublishPipelineArtifact@1(and 1ES equivalents) and update inputs (pathtoPublish/PathtoPublish/pathToPublish→targetPath). - Replace
DownloadBuildArtifacts@0withDownloadPipelineArtifact@2and update download destinations (downloadPath→targetPath). - Update perf templates’ binlog artifact naming to include
_Attempt$(System.JobAttempt)to avoid retry collisions.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| eng/pipelines/performance/templates/build-perf-sample-apps.yml | Switch binlog publishing to Pipeline Artifacts and suffix names with job attempt. |
| eng/pipelines/performance/templates/build-perf-maui-apps-net7.yml | Switch MAUI binlog publishing to Pipeline Artifacts with attempt-suffixed artifact names. |
| eng/pipelines/performance/templates/build-perf-maui-apps-net6.yml | Switch MAUI binlog publishing to Pipeline Artifacts with attempt-suffixed artifact names. |
| eng/pipelines/performance/templates/build-perf-bdn-app.yml | Switch Benchmarks.Droid binlog publishing to Pipeline Artifacts with attempt-suffixed artifact name. |
| eng/pipelines/common/wasm-post-build-steps.yml | Publish WASM intermediate artifacts/WBT via Pipeline Artifacts (stable names). |
| eng/pipelines/common/upload-intermediate-artifacts-step.yml | Update intermediate artifact publish helper to pass Pipeline Artifact inputs. |
| eng/pipelines/common/upload-artifact-step.yml | Update shared archive+publish helper to publish Pipeline Artifacts (uses targetPath). |
| eng/pipelines/common/templates/publish-build-artifacts.yml | Replace build-artifact publish wrapper with pipeline-artifact publish wrapper. |
| eng/pipelines/common/templates/browser-wasm-coreclr-build-tests.yml | Migrate artifact downloads to DownloadPipelineArtifact@2 with explicit targetPath. |
| eng/pipelines/common/templates/browser-wasm-build-tests.yml | Migrate artifact downloads to DownloadPipelineArtifact@2 with explicit targetPath. |
| eng/pipelines/common/download-specific-artifact-step.yml | Migrate “download specific run” helper to DownloadPipelineArtifact@2 and update input names. |
| eng/pipelines/common/download-artifact-step.yml | Migrate “download current run” helper to DownloadPipelineArtifact@2 and update to targetPath. |
|
This will for sure need some scrutiny but should start to cut some time off PR builds. |
|
@copilot resolve the merge conflicts in this pull request |
|
@mmitche copilot can't resolve the merge conflicts here since the PR is opened from your fork |
…e-artifacts # Conflicts: # eng/pipelines/performance/templates/build-perf-bdn-app.yml
- Rename publish-build-artifacts.yml -> publish-pipeline-artifacts.yml and update references - Update commented-out multi-threaded download block to DownloadPipelineArtifact@2 (targetPath) - Append _Attempt$(System.JobAttempt) to always()-published SuperPMI_Collection/SuperPMI_Logs diagnostic artifacts to avoid retry collisions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2fd207c2-4d82-4608-aae9-e2fc3ea7bd2b
run-superpmi-collect-job.yml publishes SuperPMI_Collection_* with the default succeeded() condition but has fallible Azure-upload steps after the publish, and the artifact is not consumed downstream by name. Append _Attempt$(System.JobAttempt) so a job retry after a post-publish failure does not collide with the pipeline artifact from attempt 1. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2fd207c2-4d82-4608-aae9-e2fc3ea7bd2b
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
eng/pipelines/common/templates/publish-pipeline-artifacts.yml:14
publish-pipeline-artifacts.ymlalways emits acondition:field, but theconditionparameter defaults to an empty string. When a caller doesn't passcondition(e.g.upload-intermediate-artifacts-step.yml), this can expand tocondition:with an empty value, which Azure Pipelines treats as an invalid/empty condition expression and can fail template expansion or job execution. Default this parameter tosucceeded()(matching Azure Pipelines' task default), or gate emitting thecondition:key onne(parameters.condition, '').
The template's last consumer was removed by dotnet#111454 (perf YAML moved to dotnet/performance), leaving it orphaned. Delete it rather than migrate it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a76ca5e8-9da2-412f-8f6f-5a61d5ba62f5
|
The Companion PR that migrates the download side to Merge order: dotnet/performance#5262 should merge before this PR so Note This comment was generated with the assistance of GitHub Copilot. |
Per review feedback, publish BrowserWasm/BrowserWasmCoreCLR via the shared upload-artifact-step.yml (Pipeline Artifact) rather than the interim legacy Build Artifact workaround. The dotnet/performance consumer is being updated to DownloadPipelineArtifact@2 to match. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a76ca5e8-9da2-412f-8f6f-5a61d5ba62f5
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
eng/pipelines/common/templates/publish-pipeline-artifacts.yml:17
publish-pipeline-artifacts.ymlcurrently always emits acondition:field, even whenparameters.conditionis left as the default empty string. At least one caller (upload-intermediate-artifacts-step.yml) doesn’t passcondition, which would expand to an empty/null condition and can break the task evaluation. Consider defaulting tosucceeded()when no explicit condition is provided (similar to the Arcade official template).
…ate-pipeline-artifacts
main added a "Download built nugets for CoreCLR runtime" step to the mono
Wasm.Build.Tests template (browser-wasm-build-tests.yml) that still uses
DownloadBuildArtifacts@0. This PR publishes the consumed artifact
(BuildArtifacts_browser_wasm_<os>_Release_CoreCLR) as a Pipeline Artifact,
which DownloadBuildArtifacts@0 cannot read ("Unsupported artifact type:
PipelineArtifact") -- it downloads nothing, so the subsequent
"Copy CoreCLR runtime pack" step fails with "Not found SourceFolder".
Migrate the step to DownloadPipelineArtifact@2 with a targetPath that
matches the existing CopyFiles SourceFolder, consistent with the other
wasm build-test download steps.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: a76ca5e8-9da2-412f-8f6f-5a61d5ba62f5
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
eng/pipelines/common/templates/publish-pipeline-artifacts.yml:17
- This template always emits
condition: ${{ parameters.condition }}. Sinceconditiondefaults to an empty string, callers that omit it will generatecondition: '', which is not a valid Azure Pipelines condition and can break template expansion/runtime evaluation.
Consider only emitting condition when provided and otherwise defaulting to succeeded(), matching the pattern used in eng/common/templates-official/steps/publish-pipeline-artifacts.yml.
|
/ba-g the windows failures on the runtime pipeline are due to #130961. failures on runtime-wasm-perf are preexisting on main, will file a separate PR to fix it. |
…CoreCLR pack The previous approach invoked publish-pipeline-artifacts.yml directly as a postBuildStep. global-build-job.yml forwards osGroup/archType/buildConfig/etc. to every postBuildStep template, and publish-pipeline-artifacts.yml declares typed parameters, which enforce strict validation and reject those forwarded params -> 'Unexpected parameter' pipeline compile errors. Move the publish (CoreCLR job) and download+stage (Mono job) logic into the untyped perf-wasm-prepare-artifacts-steps.yml template behind publishCoreClrRuntimePack/downloadCoreClrRuntimePack params, mirroring the structure of dotnet#131026 but using the post-dotnet#128498 pipeline-artifact tasks (PublishPipelineArtifact/DownloadPipelineArtifact) instead of the removed publish-build-artifacts.yml template and legacy DownloadBuildArtifacts@0. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: ef6da291-7777-4114-9c73-05398fb2b5f6
PR #128498 migrated eng/pipelines from PublishBuildArtifacts to PublishPipelineArtifact and removed eng/pipelines/common/templates/publish-build-artifacts.yml. This branch predates that merge, so it referenced the now-deleted publish-build-artifacts.yml template and the legacy DownloadBuildArtifacts@0 task, which fail to compile / target the wrong artifact store on current main. Switch the CoreCLR runtime pack publish/download to the post-migration tasks: - publish-build-artifacts.yml -> publish-pipeline-artifacts.yml (PathtoPublish -> targetPath) - DownloadBuildArtifacts@0 -> DownloadPipelineArtifact@2 (downloadPath -> targetPath); pipeline-artifact download doesn't nest under the artifact name, so copy the nupkgs directly from the target path. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: ef6da291-7777-4114-9c73-05398fb2b5f6
…1033) #128498 migrated this step to PublishPipelineArtifact, which would break runtimelab consumers: they still require multiple jobs publishing to the same 'IntermediateArtifacts' artifact. Revert just this step to 1ES.PublishBuildArtifacts@1 / PublishBuildArtifacts@1. This can be removed once all runtimelab branches moves to v3/v4 publishing.
## Summary - give Linux and Windows browser-wasm CoreCLR build and test Pipeline Artifacts host-specific names - update the browser CoreCLR runtime-test consumer to download the renamed Linux artifact - leave non-browser artifact names and consumers unchanged This preserves Pipeline Artifact publication while avoiding the duplicate name used by both browser hosts after #128498. ## Validation - parsed `eng/pipelines/runtime.yml` with Ruby YAML - verified four host-specific producers and the matching browser consumer - ran `git diff --check` - completed independent Claude and Gemini code reviews with no actionable findings > [!NOTE] > This pull request description was generated by GitHub Copilot.
Summary
Migrates all remaining
PublishBuildArtifacts@1/DownloadBuildArtifacts@0usage ineng/pipelines/toPublishPipelineArtifact@1/DownloadPipelineArtifact@2.Pipeline Artifacts use dedup-based upload and are 10-100x faster than legacy Build Artifacts. This migration reduces agent time spent on artifact publishing and returns agents to the pool sooner, reducing queue pressure for all pipelines sharing the same pools.
Artifact naming strategy
Pipeline Artifacts cannot be overwritten on retry (unlike Build Artifacts), so artifact names must account for
System.JobAttempt:_Attempt$(System.JobAttempt)to avoid collisions on retrysucceeded()so retries can publish cleanlyChanges
Publish wrapper
eng/pipelines/common/templates/publish-build-artifacts.yml:PublishBuildArtifacts@1/1ES.PublishBuildArtifacts@1→PublishPipelineArtifact@1/1ES.PublishPipelineArtifact@1upload-artifact-step.yml,upload-intermediate-artifacts-step.yml: updated input names (PathtoPublish→targetPath, etc.)WASM
wasm-post-build-steps.yml: 2 direct calls migrated; stable artifact names preserved for downstream consumptionPerformance templates
build-perf-sample-apps.yml: 10 binlog publish steps →_Attempt$(System.JobAttempt)suffix (diagnostic)build-perf-bdn-app.yml: 1 binlog →_Attemptsuffixbuild-perf-maui-apps-net6.yml,build-perf-maui-apps-net7.yml: 6 binlogs each →_AttemptsuffixDownloads
download-artifact-step.yml,download-specific-artifact-step.yml,browser-wasm-build-tests.yml,browser-wasm-coreclr-build-tests.yml: migrated toDownloadPipelineArtifact@2Not changed
eng/common/files (managed by Arcade; thetemplates/job/job.ymlwrapper already routesenablePublishBuildArtifactsthroughpublish-pipeline-artifactswith_Attemptsuffix)enablePublishBuildArtifacts: trueparameter references in SuperPMI/libraries templates (parameter name only; already handled by Arcade wrapper)