Skip to content

Do not drop OS version when converting build options to solver option frontend attributes - #4008

Open
brandond wants to merge 2 commits into
docker:masterfrom
brandond:platforms_format_all
Open

Do not drop OS version when converting build options to solver option frontend attributes#4008
brandond wants to merge 2 commits into
docker:masterfrom
brandond:platforms_format_all

Conversation

@brandond

@brandond brandond commented Aug 11, 2026

Copy link
Copy Markdown

Follow up to moby/buildkit#5614

The process of converting build.Options to client.SolveOpt uses platforms.Format() to build the string, which does not include the OS version. This causes the OS version to be dropped: buildx build --platform 'windows(10.0.17763)/amd64,windows(10.0.20348)/amd64,windows(10.0.26100)/amd64' becomes so.FrontendAttrs{"platform": "windows/amd64,windows/amd64,windows/amd64"} when submitting the solve request.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
@brandond

Copy link
Copy Markdown
Author

cc @tonistiigi @cpuguy83

brandond added a commit to brandond/rke2 that referenced this pull request Aug 11, 2026
Builds platform-version-specific images for rke2-runtime so that we can
pass the os version in the --platform when saving to tarball. Versions
match those available for the pause image, which is the only other thing
in the tarball.

This requires locally building and using a verison of buildx that does
not drop the version from the platform arg; for more information see:
docker/buildx#4008

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
brandond added a commit to brandond/rke2 that referenced this pull request Aug 11, 2026
Builds platform-version-specific images for rke2-runtime so that we can
pass the os version in the --platform when saving to tarball. Versions
match those available for the pause image, which is the only other thing
in the tarball.

This requires locally building and using a verison of buildx that does
not drop the version from the platform arg; for more information see:
docker/buildx#4008

Building multi-platform images requires enabling docker's containerd
snapshotter in the CI pipeline, a change we made a while ago on the k3s
side.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
brandond added a commit to brandond/rke2 that referenced this pull request Aug 11, 2026
Builds platform-version-specific images for rke2-runtime so that we can
pass the os version in the --platform when saving to tarball. Versions
match those available for the pause image, which is the only other thing
in the tarball.

This requires locally building and using a verison of buildx that does
not drop the version from the platform arg; for more information see:
docker/buildx#4008

Building multi-platform images requires enabling docker's containerd
snapshotter in the CI pipeline, a change we made a while ago on the k3s
side.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
brandond added a commit to brandond/rke2 that referenced this pull request Aug 11, 2026
Builds platform-version-specific images for rke2-runtime so that we can
pass the os version in the --platform when saving to tarball. Versions
match those available for the pause image, which is the only other thing
in the tarball.

This requires locally building and using a verison of buildx that does
not drop the version from the platform arg; for more information see:
docker/buildx#4008

Building multi-platform images requires enabling docker's containerd
snapshotter in the CI pipeline, a change we made a while ago on the k3s
side.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
brandond added a commit to brandond/rke2 that referenced this pull request Aug 11, 2026
Builds platform-version-specific images for rke2-runtime so that we can
pass the os version in the --platform when saving to tarball. Versions
match those available for the pause image, which is the only other thing
in the tarball.

This requires locally building and using a verison of buildx that does
not drop the version from the platform arg; for more information see:
docker/buildx#4008

Building multi-platform images requires enabling docker's containerd
snapshotter in the CI pipeline, a change we made a while ago on the k3s
side.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
brandond added a commit to brandond/rke2 that referenced this pull request Aug 11, 2026
Builds platform-version-specific images for rke2-runtime so that we can
pass the os version in the --platform when saving to tarball. Versions
match those available for the pause image, which is the only other thing
in the tarball.

This requires locally building and using a verison of buildx that does
not drop the version from the platform arg; for more information see:
docker/buildx#4008

Building multi-platform images requires enabling docker's containerd
snapshotter in the CI pipeline, a change we made a while ago on the k3s
side.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
@crazy-max
crazy-max requested a review from tonistiigi August 11, 2026 13:33
crazy-max
crazy-max previously approved these changes Aug 11, 2026

@crazy-max crazy-max left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM thanks

Pushed extra commit to add integration test

@crazy-max crazy-max added this to the v0.37.0 milestone Aug 11, 2026
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
brandond added a commit to brandond/rke2 that referenced this pull request Aug 11, 2026
Builds platform-version-specific images for rke2-runtime so that we can
pass the os version in the --platform when saving to tarball. Versions
match those available for the pause image, which is the only other thing
in the tarball.

This requires locally building and using a verison of buildx that does
not drop the version from the platform arg; for more information see:
docker/buildx#4008

Building multi-platform images requires enabling docker's containerd
snapshotter in the CI pipeline, a change we made a while ago on the k3s
side.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
brandond added a commit to brandond/rke2 that referenced this pull request Aug 11, 2026
Builds platform-version-specific images for rke2-runtime so that we can
pass the os version in the --platform when saving to tarball. Versions
match those available for the pause image, which is the only other thing
in the tarball.

This requires locally building and using a verison of buildx that does
not drop the version from the platform arg; for more information see:
docker/buildx#4008

Building multi-platform images requires enabling docker's containerd
snapshotter in the CI pipeline, a change we made a while ago on the k3s
side.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
brandond added a commit to brandond/rke2 that referenced this pull request Aug 11, 2026
Builds platform-version-specific images for rke2-runtime so that we can
pass the os version in the --platform when saving to tarball. Versions
match those available for the pause image, which is the only other thing
in the tarball.

This requires locally building and using a verison of buildx that does
not drop the version from the platform arg; for more information see:
docker/buildx#4008

Building multi-platform images requires enabling docker's containerd
snapshotter in the CI pipeline, a change we made a while ago on the k3s
side.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
brandond added a commit to brandond/rke2 that referenced this pull request Aug 11, 2026
Builds platform-version-specific images for rke2-runtime so that we can
pass the os version in the --platform when saving to tarball. Versions
match those available for the pause image, which is the only other thing
in the tarball.

This requires locally building and using a verison of buildx that does
not drop the version from the platform arg; for more information see:
docker/buildx#4008

Building multi-platform images requires enabling docker's containerd
snapshotter in the CI pipeline, a change we made a while ago on the k3s
side.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
brandond added a commit to brandond/rke2 that referenced this pull request Aug 11, 2026
Builds platform-version-specific images for rke2-runtime so that we can
pass the os version in the --platform when saving to tarball. Versions
match those available for the pause image, which is the only other thing
in the tarball.

This requires locally building and using a verison of buildx that does
not drop the version from the platform arg; for more information see:
docker/buildx#4008

Building multi-platform images requires enabling docker's containerd
snapshotter in the CI pipeline, a change we made a while ago on the k3s
side.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
brandond added a commit to brandond/rke2 that referenced this pull request Aug 11, 2026
Builds platform-version-specific images for rke2-runtime so that we can
pass the os version in the --platform when saving to tarball. Versions
match those available for the pause image, which is the only other thing
in the tarball.

This requires locally building and using a verison of buildx that does
not drop the version from the platform arg; for more information see:
docker/buildx#4008

Building multi-platform images requires enabling docker's containerd
snapshotter in the CI pipeline, a change we made a while ago on the k3s
side.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
brandond added a commit to brandond/rke2 that referenced this pull request Aug 11, 2026
Builds platform-version-specific images for rke2-runtime so that we can
pass the os version in the --platform when saving to tarball. Versions
match those available for the pause image, which is the only other thing
in the tarball.

This requires locally building and using a verison of buildx that does
not drop the version from the platform arg; for more information see:
docker/buildx#4008

Building multi-platform images requires enabling docker's containerd
snapshotter in the CI pipeline, a change we made a while ago on the k3s
side.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
brandond added a commit to rancher/rke2 that referenced this pull request Aug 12, 2026
Builds platform-version-specific images for rke2-runtime so that we can
pass the os version in the --platform when saving to tarball. Versions
match those available for the pause image, which is the only other thing
in the tarball.

This requires locally building and using a verison of buildx that does
not drop the version from the platform arg; for more information see:
docker/buildx#4008

Building multi-platform images requires enabling docker's containerd
snapshotter in the CI pipeline, a change we made a while ago on the k3s
side.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
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