Skip to content

exporter/containerimage: normalize platform in annotation keys - #7245

Closed
ricardobranco777 wants to merge 1 commit into
moby:masterfrom
ricardobranco777:normalize-annotation-platform
Closed

ricardobranco777 wants to merge 1 commit into
moby:masterfrom
ricardobranco777:normalize-annotation-platform

Conversation

@ricardobranco777

Copy link
Copy Markdown

Annotation keys such as annotation-manifest-descriptor[linux/arm64/v8].k were grouped by the platform exactly as written, but looked up using the normalized build platform (linux/arm64). The mismatch silently dropped the annotation. This is easy to hit on arm64, where platforms.DefaultSpec() includes the v8 variant.

Normalize the platform when parsing the key, and when looking up annotations for a platform, so equivalent spellings match.

See docker/buildx#4126 for more details.

Annotation keys such as annotation-manifest-descriptor[linux/arm64/v8].k
were grouped by the platform exactly as written, but looked up using the
normalized build platform (linux/arm64). The mismatch silently dropped
the annotation. This is easy to hit on arm64, where
platforms.DefaultSpec() includes the v8 variant.

Normalize the platform when parsing the key, and when looking up
annotations for a platform, so equivalent spellings match.

Signed-off-by: Ricardo Branco <rbranco@suse.de>
@crazy-max

Copy link
Copy Markdown
Member

Already opened #7244 for the same fix. Looks like we picked this up at the same time 😅

@ricardobranco777

Copy link
Copy Markdown
Author

Already opened #7244 for the same fix. Looks like we picked this up at the same time 😅

LOL. Closing this.

@ricardobranco777
ricardobranco777 deleted the normalize-annotation-platform branch October 5, 2026 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants