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

Add podman buildx version support #16799

Merged
merged 1 commit into from
Dec 14, 2022
Merged

Conversation

rhatdan
Copy link
Member

@rhatdan rhatdan commented Dec 9, 2022

Fixes: #16793

Signed-off-by: Daniel J Walsh [email protected]

Does this PR introduce a user-facing change?

podman buildx --version now shows buildah version.

@openshift-ci openshift-ci bot added release-note approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Dec 9, 2022
Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

Let's wait for an answer to #16793 (comment). I have the feeling we need podman buildx version and not a flag.

@rhatdan rhatdan changed the title Add podman buildx --version support Add podman buildx version support Dec 9, 2022
@rhatdan
Copy link
Member Author

rhatdan commented Dec 9, 2022

@Luap99 Switched to podman buildx version.

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

@flouthoc PTAL

I am not sure whether returning the Buildah version may confuse clients? The buildx is version is something different.

@rhatdan
Copy link
Member Author

rhatdan commented Dec 12, 2022

I thought about impersonating the buildx version, but that felt wrong, and not something we could even guarantee.
We only implement parts that people ask about.

@vrothberg
Copy link
Member

I thought about impersonating the buildx version, but that felt wrong, and not something we could even guarantee. We only implement parts that people ask about.

I would have done the very same thing. @flouthoc has probably the most experience with buildkit, so I prefer to a head node from him.

@Luap99
Copy link
Member

Luap99 commented Dec 12, 2022

The problem is that a external tool is calling this command which likely means that it tires to parse the output, so having non matching output will just defer the error one step later.

@flouthoc
Copy link
Collaborator

Hmm upon checking docker buildx version is supported but docker buildx --version is not.

sudo docker buildx version
github.com/docker/buildx v0.8.0-71-g6854eec4 6854eec48de2fa05fadbce978dd9d7de848e82fb
[fl@fedora secretdir3]$ sudo docker buildx --version
unknown flag: --version
See 'docker buildx --help'.

Usage:  docker buildx [OPTIONS] COMMAND

Extended build capabilities with BuildKit

Options:
      --builder string   Override the configured builder instance

Management Commands:
  imagetools  Commands to work on images in registry

Commands:
  bake        Build from a file
  build       Start a build
  create      Create a new builder instance
  du          Disk usage
  inspect     Inspect current builder instance
  ls          List builder instances
  prune       Remove build cache
  rm          Remove a builder instance
  stop        Stop builder instance
  use         Set the current builder instance
  version     Show buildx version information

Run 'docker buildx COMMAND --help' for more information on a command.

I think we should also support buildx version for compat.

@vrothberg
Copy link
Member

I think we should also support buildx version for compat.

That's what the PR does. I just wonder whether the output is useful. I share Paul's comment on deferring the error to a later point. Maybe it's better to explicitly error out? Some clients may misinterpret the output and run into hard to debug failures after?

@rhatdan
Copy link
Member Author

rhatdan commented Dec 12, 2022

@albinkc could you check to see if this would fix your problem or just confuse the tool? IE is the tool using this information for display purposes or actually making assumptions on the version returned.

@flouthoc
Copy link
Collaborator

@vrothberg @Luap99 anything depending upon the output of buildx version will break either we print the buildah version or print error its just the the matter it will break early or later.

This analogy is also true for podman version since output of podman version is different than docker version so we are breaking compat there as well for users who are aliasing docker with podman so I don't think we could do much here.

@rhatdan
Copy link
Member Author

rhatdan commented Dec 12, 2022

I agree I think we just merge this and then allow the users to deal with the differences in versions. All we can do is match the CLI not necessarily the CLI output.

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@flouthoc flouthoc left a comment

Choose a reason for hiding this comment

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

LGTM
/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 14, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 14, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: flouthoc, rhatdan

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-merge-robot openshift-merge-robot merged commit 415a702 into containers:main Dec 14, 2022
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 18, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for buildx version
5 participants