Skip to content

Conversation

@AkihiroSuda
Copy link
Member

A bogus dependency on github.com/kr/pretty was somehow added to go.mod by dependabot in PR #3759 (6fb8f99)

@crazy-max
Copy link
Member

Hum I'm wonder why our vendor validation does not see that this indirect dep is not used. I guess that's because this dep is still used by a peer dependency and therefore still relevant as an indirect one.

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

@thaJeztah
Copy link
Member

does the vendor validation also run "go mod tidy"? Wondering if it's something like that perhaps 🤔

@AkihiroSuda
Copy link
Member Author

does the vendor validation also run "go mod tidy"? Wondering if it's something like that perhaps 🤔

Yes, but go mod tidy doesn’t clean up this bogus dependency 🤷‍♂️

@thaJeztah
Copy link
Member

Yes, but go mod tidy doesn’t clean up this bogus dependency 🤷‍♂️

OH! I think I understand now why;

Screenshot 2023-04-13 at 10 31 45

Here's what (I think) happened

  • The dependency isn't actually used in the code, which is why it normally wouldn't show
  • HOWEVER, dependabot added the line, and set a version that's higher than the version that's resolved by go mod (the minimum required version, based on all dependencies is v0.2.1)
  • Because that version is higher than what the dependencies specify, the line won't be removed (it effectively now is a replace / override to indicate: "use a newer version than what's needed"
  • (The newer version probably also brings in the requirement for a newer version of github.com/rogpeppe/go-internal, although that seems to be a dependency for github.com/containerd/stargz-snapshotter, so not sure about that one)

❓ why did dependabot decide to update that dependency though?

See:

go mod graph | grep ' github.com/kr/pretty'
github.com/moby/buildkit github.com/kr/[email protected]
github.com/grpc-ecosystem/grpc-gateway/[email protected] github.com/kr/[email protected]
github.com/tonistiigi/[email protected] github.com/kr/[email protected]
github.com/prometheus/[email protected] github.com/kr/[email protected]
k8s.io/[email protected] github.com/kr/[email protected]
gopkg.in/[email protected] github.com/kr/[email protected]
github.com/frankban/[email protected] github.com/kr/[email protected]
github.com/Microsoft/[email protected] github.com/kr/[email protected]
github.com/googleapis/[email protected] github.com/kr/[email protected]
github.com/Microsoft/[email protected] github.com/kr/[email protected]
github.com/Microsoft/[email protected] github.com/kr/[email protected]
github.com/go-openapi/[email protected] github.com/kr/[email protected]
github.com/grpc-ecosystem/[email protected] github.com/kr/[email protected]
github.com/docker/[email protected] github.com/kr/[email protected]
k8s.io/[email protected] github.com/kr/[email protected]
github.com/google/[email protected] github.com/kr/[email protected]
github.com/apex/[email protected] github.com/kr/[email protected]
github.com/bombsimon/wsl/[email protected] github.com/kr/[email protected]
github.com/maxbrunsfeld/counterfeiter/[email protected] github.com/kr/[email protected]
github.com/securego/[email protected] github.com/kr/[email protected]
k8s.io/[email protected] github.com/kr/[email protected]
github.com/goreleaser/[email protected] github.com/kr/[email protected]
github.com/grpc-ecosystem/[email protected] github.com/kr/[email protected]
github.com/go-openapi/[email protected] github.com/kr/[email protected]
github.com/bombsimon/wsl/[email protected] github.com/kr/[email protected]
github.com/securego/[email protected] github.com/kr/[email protected]
github.com/Azure/[email protected] github.com/kr/[email protected]
github.com/securego/gosec/[email protected] github.com/kr/[email protected]
github.com/grpc-ecosystem/[email protected] github.com/kr/[email protected]
github.com/grpc-ecosystem/[email protected] github.com/kr/[email protected]

And:

go mod graph | grep ' github.com/rogpeppe/go-internal'
github.com/containerd/[email protected] github.com/rogpeppe/[email protected]
github.com/kr/[email protected] github.com/rogpeppe/[email protected]
honnef.co/go/[email protected] github.com/rogpeppe/[email protected]
honnef.co/go/[email protected] github.com/rogpeppe/[email protected]
mvdan.cc/[email protected] github.com/rogpeppe/[email protected]
honnef.co/go/[email protected] github.com/rogpeppe/[email protected]
honnef.co/go/[email protected] github.com/rogpeppe/[email protected]
mvdan.cc/[email protected] github.com/rogpeppe/[email protected]

A bogus dependency on github.com/kr/pretty was somehow added to go.mod
by dependabot in PR 3759 (6fb8f99)

Signed-off-by: Akihiro Suda <[email protected]>
@AkihiroSuda
Copy link
Member Author

rebased

@thaJeztah
Copy link
Member

@crazy-max good to go?

@crazy-max crazy-max merged commit 37c4dc1 into moby:master Apr 14, 2023
@thaJeztah
Copy link
Member

looks like this was already addressed in the v0.11 branch, so removing the cherry-pick label

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.

3 participants