Fix artifact upload collision between Debug and Release matrix legs#1564
Merged
Fix artifact upload collision between Debug and Release matrix legs#1564
Conversation
Both Debug and Release matrix legs call CIBuild which includes -publish, causing both to simultaneously upload PackageArtifacts (e.g. Microsoft.DotNet.XHarness.CLI.nupkg) to the same AzDO artifact container. This results in intermittent 'Blob is incomplete (missing block)' errors. Fix by passing /p:Publish=false for the Debug leg so only the Release leg publishes packages to artifact storage. The Debug leg still builds, tests, signs, and packs -- it just skips the artifact upload step. Ref: dotnet/dnceng#1916 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
steveisok
approved these changes
Mar 14, 2026
This was referenced Mar 14, 2026
Member
Author
|
/ba-g failures are not related |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Both Debug and Release matrix legs in the public CI pipeline call
CIBuild.cmd/cibuild.sh, which includes-publish. This causes both legs to simultaneously uploadPackageArtifacts/Microsoft.DotNet.XHarness.CLI.11.0.0-ci.nupkgto the same AzDO artifact container, resulting in intermittent "Blob is incomplete (missing block)" errors when the blob uploads interleave.This was observed in the most recent CI runs on #1563 and is a well-known pattern across dotnet repos (see dotnet/dnceng#1916).
Root Cause
The arcade SDK's
PushToBuildStorageMSBuild task (invoked byPublish.projwhenPublish=true) emits##vso[artifact.upload containerfolder=PackageArtifacts;artifactname=PackageArtifacts]commands. When both matrix legs run this simultaneously for the same.nupkgfile, AzDO's blob storage encounters write conflicts.Fix
Pass
/p:Publish=falseto the Debug matrix leg so only the Release leg publishes packages to artifact storage. The Debug leg still builds, tests, signs, and packs — it just skips the artifact upload step. MSBuild's "last property wins" rule ensures this overrides the-publishflag passed byCIBuild.cmd.Applied to both Windows and macOS stages.