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

config: support the variant field #3615

Merged
merged 1 commit into from Nov 5, 2021

Conversation

nalind
Copy link
Member

@nalind nalind commented Nov 4, 2021

What type of PR is this?

/kind feature

What this PR does / why we need it:

Add the variant field, along with methods for setting and querying it, and expose them in the buildah config and buildah inspect commands.

When setting an initial architecture for a container based on an image which doesn't contain an architecture, or from "scratch", normalize the architecture name we've been given, and set both it and the variant field at the same time.

Provide normalized architecture+variant values in buildah info.

How to verify it

New integration test!

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

Does this PR introduce a user-facing change?

None

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 4, 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

@openshift-ci openshift-ci bot added kind/feature Categorizes issue or PR as related to a new feature. approved labels Nov 4, 2021
@nalind nalind changed the title docker: support the variant field config: support the variant field Nov 4, 2021
@flouthoc
Copy link
Collaborator

flouthoc commented Nov 5, 2021

LGTM

@rhatdan
Copy link
Member

rhatdan commented Nov 5, 2021

Could you add a test for buildah config --variant ...

@nalind
Copy link
Member Author

nalind commented Nov 5, 2021

Could you add a test for buildah config --variant ...

Added.

Add the variant field, along with methods for setting and querying it,
and expose them in the `buildah config` and `buildah inspect` commands.

When setting an initial architecture for a container based on an image
which doesn't contain an architecture, or from "scratch", normalize the
architecture name we've been given, and set both it and the variant
field at the same time.

Provide normalized architecture+variant values in `buildah info`.

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

rhatdan commented Nov 5, 2021

I don't see --variant added?
I was thinking of

buildah from scratch
buildah add foobar
buildah config --arch XYZ --variant foobar
buildah commit
buildah inspect.

@nalind
Copy link
Member Author

nalind commented Nov 5, 2021

I don't see --variant added? I was thinking of

buildah from scratch buildah add foobar buildah config --arch XYZ --variant foobar buildah commit buildah inspect.

The "config" test in config.bats does that for both OCI and Docker formats, so I added it there as another option/result combination that it checks.

@rhatdan
Copy link
Member

rhatdan commented Nov 5, 2021

OK.
/lgtm

@openshift-ci openshift-ci bot added the lgtm label Nov 5, 2021
@openshift-merge-robot openshift-merge-robot merged commit 4d51442 into containers:main Nov 5, 2021
@nalind nalind deleted the docker-variant branch November 5, 2021 19:28
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 14, 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.

None yet

4 participants