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

conformance: allow test cases to specify dockerUseBuildKit #3529

Merged

Conversation

nalind
Copy link
Member

@nalind nalind commented Sep 21, 2021

What type of PR is this?

/kind other

What this PR does / why we need it:

The API flag that we'd need to set to in a build request to get dockerd use BuildKit instead of the classic docker builder isn't available in go-dockerclient, so add a second docker-based path that uses the API types and client library, which the conformance tests were already pulling in as indirect dependencies, but skip tests that set the flag if we're not on the current client version.

This is mainly groundwork for testing compatibility, in the future, with features that aren't in the docker classic builder.

How to verify it

New conformance test!

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

Does this PR introduce a user-facing change?

None

@@ -32,6 +32,9 @@ import (
"github.com/containers/image/v5/types"
"github.com/containers/storage"
"github.com/containers/storage/pkg/reexec"
dockertypes "github.com/docker/docker/api/types"
dockerdockerclient "github.com/docker/docker/client"
Copy link
Member

Choose a reason for hiding this comment

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

dockerdocker?

Copy link
Member Author

Choose a reason for hiding this comment

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

We already have imports named client, docker, and dockerclient, so I'm running out of pseudonyms for them.

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, client's a variable, not a package.

@rhatdan
Copy link
Member

rhatdan commented Sep 21, 2021

LGTM

@nalind nalind force-pushed the conformance-allow-buildkit branch 3 times, most recently from b0f0041 to d6d23b5 Compare September 22, 2021 12:53
The API flag that we'd need to set to in a build request to get dockerd
use BuildKit instead of the classic docker builder isn't available in
go-dockerclient, so add a second docker-based path that uses the API
types and client library, which the conformance tests were already
pulling in as indirect dependencies, but skip tests that set the flag if
we're not on the current client version.

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

LGTM

@rhatdan
Copy link
Member

rhatdan commented Sep 23, 2021

/approve
/lgtm

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 23, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nalind, 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 b237304 into containers:main Sep 23, 2021
@nalind nalind deleted the conformance-allow-buildkit branch September 23, 2021 12:01
@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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants