You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Image info merge collapses platforms that only differ by build args, causing waitForMcrImageIngestion timeouts #2283
Define several manifest images whose single platforms share the same Dockerfile, OS, OS version and architecture, and differ only by buildArgs. For example, ubuntu-26.04-helix-android-{24,29,31,35}-amd64 in dotnet/dotnet-buildtools-prereqs-docker uses ANDROID_API_LEVEL.
Build them and run mergeImageInfo, then waitForMcrImageIngestion.
Expected behavior
Image info has one platform entry per image, each with its own digest and tags. Ingestion waits only for the tags that actually point at each digest.
Actual behavior
The variants are merged into one platform entry. That entry has the last variant's digest and the union of every variant's tags. waitForMcrImageIngestion then waits for tags that MAR never reports for that digest, and times out after 20 minutes even though every status MAR returned was Succeeded. Publish Image Info is skipped, so AutoBuilder stops queueing prereqs builds.
Evidence (dotnet-buildtools-prereqs-docker official pipeline):
3139645: the reporter waited on prereqs@sha256:9fcdd91b… for five tags (android-24/29/31/35-amd64, android-amd64). Across 120 polls, MAR only ever returned android-35-amd64. On MCR, only android-35-amd64 resolves to 9fcdd91b…. The 24, 31 and 29/android-amd64 tags resolve to three other digests.
3138508, 3138240, 3138130 and 3138089 show the same pattern: in each run, the android digest is the only one that never completes.
Other digests with several tags in the same runs (for example, ubuntu-22.04 and ubuntu-22.04-amd64) get one MAR status per tag, so MAR is behaving correctly.
Root cause
ImageInfoHelper.LoadFromContent maps each image info platform to the first manifest platform where ArePlatformsEqual matches. That check compares Dockerfile, architecture, OS, OS version and product version, but not build args. All the variants therefore resolve to the same ManifestImage/PlatformInfo.
ImageData.CompareTo and PlatformData.CompareTo, which use GetIdentifier() and also ignore build args, then report the variants as equal. ImageInfoMergeExtensions.MergeLists merges them: it takes the union of their tags and lets the last source's digest win.
PlatformInfo.GetUniqueKey already appends build args "to distinguish platforms that only vary by arg values", but the image info load and merge paths don't.
Proposed fix
When loading image info, gather every matching manifest platform and prefer the one whose tags overlap with the image info platform's tags. If none overlap, keep the existing first-match behavior.
In PlatformData.CompareTo, when the identifiers are equal and both platforms are bound to manifest platforms, break the tie using the platform's build args.
This also repairs the image info already published to the versions repo on the next publish: the stale merged entry matches the first variant by tag and is replaced with publish-replace semantics. A draft fix with a regression test is ready on a branch.
Activity