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

use StatusError from docker/cli, not "dockerd" #10080

Merged
merged 1 commit into from Dec 14, 2022

Conversation

thaJeztah
Copy link
Member

This package is a leftover from when the "docker" cli and the "dockerd" cli both lived in the same repository. The package in docker/docker will be (re)moved soon, so replace it with the implementation in docker/cli, which is the right one :)

I added a "depguard" for this package to prevent accidental imports.

What I did

Related issue

(not mandatory) A picture of a cute animal, if possible in relation to what you did

MF-woodchuck

@codecov
Copy link

codecov bot commented Dec 14, 2022

Codecov Report

Base: 75.74% // Head: 75.74% // No change to project coverage 👍

Coverage data is based on head (615a6d7) compared to base (d4a4dcf).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##               v2   #10080   +/-   ##
=======================================
  Coverage   75.74%   75.74%           
=======================================
  Files           2        2           
  Lines         235      235           
=======================================
  Hits          178      178           
  Misses         50       50           
  Partials        7        7           
Impacted Files Coverage Δ
pkg/e2e/framework.go 73.85% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

.golangci.yml Outdated
# The io/ioutil package has been deprecated.
# https://go.dev/doc/go1.16#ioutil
- io/ioutil
- github.com/docker/docker/cli # old location for shared code between the "docker" and "dockerd" CLIs
Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, fun! Looks like this probably expects a regex; looks like it's used as a prefix;

#21 121.2 pkg/compose/build_buildkit.go:33:2: `github.com/docker/docker/client` is in the denylist (depguard)
#21 121.2 	dockerclient "github.com/docker/docker/client"
#21 121.2 	^
#21 121.2 pkg/compose/compose.go:33:2: `github.com/docker/docker/client` is in the denylist (depguard)
#21 121.2 	"github.com/docker/docker/client"
#21 121.2 	^
#21 121.2 pkg/compose/image_pruner.go:29:2: `github.com/docker/docker/client` is in the denylist (depguard)
#21 121.2 	"github.com/docker/docker/client"
#21 121.2 	^

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll revert this part; the linter configuration is just broken, and doesn't allow a combination of "packages" and a regular-expression; it defaults to "globbing", so package github.com/foo/bar is an implicit github.com/foo/bar* (willcard)

This package is a leftover from when the "docker" cli and the "dockerd"
cli both lived in the same repository. The package in docker/docker will
be (re)moved soon, so replace it with the implementation in docker/cli,
which is the right one :)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
Copy link
Member Author

@glours @ndeloof PTAL

Copy link
Contributor

@glours glours left a comment

Choose a reason for hiding this comment

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

Lgtm

@ndeloof ndeloof merged commit a501ab3 into docker:v2 Dec 14, 2022
@thaJeztah thaJeztah deleted the the_other_cli branch December 14, 2022 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants