Skip to content

manifest: add loong64 to manifest annotate, and remove hard-coded os/arch list in validation - #7448

Merged
thaJeztah merged 2 commits into
docker:masterfrom
thaJeztah:carry_7447
Oct 30, 2026
Merged

thaJeztah merged 2 commits into
docker:masterfrom
thaJeztah:carry_7447

Conversation

@thaJeztah

Copy link
Copy Markdown
Member

manifest: add loong64 to manifest annotation and bash completion

manifest: validate platform syntax instead of known OS/arch combinations

Replace the hardcoded list of supported OS/architecture combinations with
syntax validation using containerd/platforms.

This allows annotating manifests with platforms that are not explicitly
known to the CLI, while still rejecting missing or malformed values.

The validation uses a FormatAll/Parse roundtrip until containerd/platforms
provides a dedicated validation function.

Release notes (optional)

- Fix `docker manifest annotate` rejecting valid platforms not included in its predefined list of OS/architecture combinations, such as `linux/loong64`.

A picture of a cute animal (not mandatory but encouraged)

Signed-off-by: 吴小白 <296015668@qq.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah changed the title manifest: add loong64 to manifest annotation, and remove hard-coded os/arch list in validation manifest: add loong64 to manifest annotate, and remove hard-coded os/arch list in validation Oct 30, 2026
docker-agent

This comment was marked as resolved.

@codecov-commenter

codecov-commenter commented Oct 30, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cli/command/manifest/annotate.go 60.00% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@docker-agent docker-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟢 APPROVE

Replace the hardcoded list of supported OS/architecture combinations with
syntax validation using containerd/platforms.

This allows annotating manifests with platforms that are not explicitly
known to the CLI, while still rejecting missing or malformed values.

The validation uses a FormatAll/Parse roundtrip until containerd/platforms
provides a dedicated validation function.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Comment on lines +143 to +146
// Validate platform syntax, without restricting OS/architecture combinations.
//
// TODO(thaJeztah): Implement a platforms.Validate in containerd/platforms and replace this code.
p := imageManifest.Descriptor.Platform

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thaJeztah
thaJeztah merged commit 8c8a775 into docker:master Oct 30, 2026
100 checks passed
@thaJeztah
thaJeztah deleted the carry_7447 branch October 30, 2026 13:59
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.

docker manifest annotate does not support linux/loong64

5 participants