Skip to content

Fix artifact upload collision in maui-pr-uitests pipeline#34478

Merged
PureWeen merged 1 commit intomainfrom
fix/artifact-upload-collision
Mar 20, 2026
Merged

Fix artifact upload collision in maui-pr-uitests pipeline#34478
PureWeen merged 1 commit intomainfrom
fix/artifact-upload-collision

Conversation

@lewing
Copy link
Copy Markdown
Member

@lewing lewing commented Mar 14, 2026

Problem

The maui-pr-uitests pipeline has 98+ test jobs that all publish artifacts using PublishBuildArtifacts@1 with no artifact name, defaulting to drop. When multiple jobs upload the same file to the same container simultaneously, AzDO blob storage encounters write conflicts:

Blob is incomplete (missing block). Blob: 29adda685a1ff1119a49000d3a9183a5, Expected Offset: 0, Actual Offset: 8388608
##[error]File upload failed even after retry.

Recent failures

  • Build 1334980: 3 jobs failed (Controls CollectionView, Controls (vlatest), Controls (vlatest) CollectionView)
  • Build 1334245: 1 job failed (Controls (vlatest))

The specific collision: both "Controls (vlatest)" and "Controls (vlatest) CollectionView" upload drop/logs/appium_ios_Controls.TestCases.iOS.Tests-Release-ios-CollectionView.log — same blob ID, concurrent writes.

Fix

Add a unique artifact name per job using $(System.StageName)-$(System.JobName)-$(System.JobAttempt) in eng/pipelines/common/ui-tests-steps.yml. This matches the pattern already used by snapshot diff artifacts in ui-tests-collect-snapshot-diffs.yml.

Fixes #34477
Ref: dotnet/dnceng#1916

All 98+ test jobs publish to the default 'drop' artifact with no unique
name. When multiple jobs finish simultaneously and upload the same file
path (e.g. appium log for CollectionView tests), AzDO blob storage gets
concurrent write conflicts causing 'Blob is incomplete (missing block)'
and 'File upload failed even after retry' errors.

Fix by giving each job a unique artifact name using System.StageName,
System.JobName, and System.JobAttempt — the same pattern already used
by snapshot diff artifacts in ui-tests-collect-snapshot-diffs.yml.

Fixes #34477
Ref: dotnet/dnceng#1916

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 14, 2026 16:54
@github-actions
Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 34478

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 34478"

Copy link
Copy Markdown
Contributor

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 updates the UI test pipeline template to publish build artifacts with a unique, job-scoped artifact name, reducing collisions across stages/jobs and retries in multi-stage UI test runs.

Changes:

  • Assign a custom artifactName to the PublishBuildArtifacts@1 step using $(System.StageName), $(System.JobName), and $(System.JobAttempt).

You can also share your feedback on Copilot code review. Take the survey.

@lewing
Copy link
Copy Markdown
Member Author

lewing commented Mar 17, 2026

Cc @jonathanpeppers

@PureWeen
Copy link
Copy Markdown
Member

/azp run maui-pr-uitests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@PureWeen PureWeen merged commit b4dad75 into main Mar 20, 2026
158 checks passed
@PureWeen PureWeen deleted the fix/artifact-upload-collision branch March 20, 2026 23:40
KarthikRajaKalaimani pushed a commit to KarthikRajaKalaimani/maui that referenced this pull request Mar 30, 2026
## Problem

The `maui-pr-uitests` pipeline has 98+ test jobs that all publish
artifacts using `PublishBuildArtifacts@1` with **no artifact name**,
defaulting to `drop`. When multiple jobs upload the same file to the
same container simultaneously, AzDO blob storage encounters write
conflicts:

```
Blob is incomplete (missing block). Blob: 29adda685a1ff1119a49000d3a9183a5, Expected Offset: 0, Actual Offset: 8388608
##[error]File upload failed even after retry.
```

### Recent failures
- [Build
1334980](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1334980):
3 jobs failed (Controls CollectionView, Controls (vlatest), Controls
(vlatest) CollectionView)
- [Build
1334245](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1334245):
1 job failed (Controls (vlatest))

The specific collision: both "Controls (vlatest)" and "Controls
(vlatest) CollectionView" upload
`drop/logs/appium_ios_Controls.TestCases.iOS.Tests-Release-ios-CollectionView.log`
— same blob ID, concurrent writes.

## Fix

Add a unique artifact name per job using
`$(System.StageName)-$(System.JobName)-$(System.JobAttempt)` in
`eng/pipelines/common/ui-tests-steps.yml`. This matches the pattern
already used by snapshot diff artifacts in
`ui-tests-collect-snapshot-diffs.yml`.

Fixes dotnet#34477
Ref: dotnet/dnceng#1916

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.

maui-pr-uitests: File upload failures from artifact name collision across 98 test jobs

3 participants