Skip to content

release/9.0: Artifact upload collision in NativeAOT and Mono intermediate artifacts #125561

@lewing

Description

@lewing

Problem

The dotnet-runtime-official pipeline on release/9.0 has intermittent "File upload failed even after retry" errors caused by multiple platform jobs uploading the same file to the same artifact path.

Recent failures (from dotnet/dnceng#1916)

Build Failed Step File
2924167 Publish intermediate artifacts (linux_bionic-arm64 NativeAOT) NativeAOTRuntimePacks/Shipping/Microsoft.NETCore.App.Ref.9.0.15.nupkg
2918236 Publish intermediate artifacts NativeAOTRuntimePacks/Shipping/Microsoft.NETCore.App.Ref.9.0.15.nupkg

Root cause

In eng/pipelines/runtime-official.yml (release/9.0), the upload-intermediate-artifacts-step.yml template is called with a shared name parameter across all platforms in a platform-matrix.yml expansion:

  • NativeAOT (27 platforms): all use name: NativeAOTRuntimePacks (line 303)
  • Mono (many platforms): all use name: MonoRuntimePacks (lines 347, 365, 383, 455, 483, 517, 549)

Compare with CoreCLR which correctly uses name: $(osGroup)$(osSubgroup)_$(archType) — unique per platform.

Since all NativeAOT/Mono jobs upload to the same subdirectory (IntermediateArtifacts/NativeAOTRuntimePacks/Shipping/), files that are identical across platforms — like the arch-independent ref pack Microsoft.NETCore.App.Ref.9.0.15.nupkg — collide when two jobs finish simultaneously.

Why this is tricky to fix

  • NativeAOT: Nothing downstream references NativeAOTRuntimePacks by path, so renaming to NativeAOTRuntimePacks/$(osGroup)$(osSubgroup)_$(archType) would be safe.
  • Mono: The Workloads job (lines 620-651) downloads from IntermediateArtifacts/MonoRuntimePacks/Shipping/... with platform-specific filename patterns. Changing the subdirectory would require updating those download patterns to use wildcards like MonoRuntimePacks/*/Shipping/....

Not applicable to main/10.0

This issue only affects release/9.0main and release/10.0 have moved to VMR builds and no longer use upload-intermediate-artifacts-step.yml.

Ref: dotnet/dnceng#1916

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions