Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buildah build: add --all-platforms #3546

Merged
merged 1 commit into from
Sep 30, 2021

Conversation

nalind
Copy link
Member

@nalind nalind commented Sep 27, 2021

What type of PR is this?

/kind feature

What this PR does / why we need it:

Add a --all-platforms that instructs the builder to build for the intersection of all platforms for which the build's base images are available. Returns an error if any of them aren't references to manifest lists. We've learned that we can't really trust architecture and OS information stored in image config blobs, so we don't try to salvage that case.

How to verify it

New integration test!

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

The bits where we populate and prune the list of platforms that all of our base images support use versions both with and without variant information in order to avoid dropping 64-bit ARM when one base image is for variant "v8" and one doesn't specify a variant. It's not ideal, but I think it's within the bounds of for how variant information is meant to be treated.

Does this PR introduce a user-facing change?

Added the --all-platforms option to "buildah build".

@openshift-ci openshift-ci bot added the kind/feature Categorizes issue or PR as related to a new feature. label Sep 27, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 27, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nalind

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@nalind nalind force-pushed the all-the-platform branch 2 times, most recently from 4a1192e to 9f1ce7a Compare September 27, 2021 23:23
platform := instance.Platform.OS + "/" + instance.Platform.Architecture
present[platform] = struct{}{}
if instance.Platform.Variant != "" {
platform = platform + "/" + instance.Platform.Variant
Copy link
Member

Choose a reason for hiding this comment

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

You want to build multiple arches with and without the variant?

Copy link
Member Author

Choose a reason for hiding this comment

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

Should be fixed now.

@nalind nalind changed the title buildah build: add --all-platforms WIP: buildah build: add --all-platforms Sep 28, 2021
@nalind nalind changed the title WIP: buildah build: add --all-platforms buildah build: add --all-platforms Sep 28, 2021
@TomSweeneyRedHat
Copy link
Member

LGTM
assuming happy tests

@nalind nalind force-pushed the all-the-platform branch 3 times, most recently from 0a0fb13 to b1a83bd Compare September 29, 2021 18:52
Add a --all-platforms that instructs the builder to build for the
intersection of all platforms for which the build's base images are
available.  Returns an error if any of them aren't references to
manifest lists.  We've learned that we can't really trust architecture
and OS information stored in image config blobs, so we don't try to
salvage that case.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
@rhatdan
Copy link
Member

rhatdan commented Sep 30, 2021

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Sep 30, 2021
@openshift-merge-robot openshift-merge-robot merged commit 954c481 into containers:main Sep 30, 2021
@nalind nalind deleted the all-the-platform branch September 30, 2021 13:04
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved kind/feature Categorizes issue or PR as related to a new feature. lgtm locked - please file new issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants