Skip to content
This repository has been archived by the owner on Feb 14, 2022. It is now read-only.

remove uses of github.com/golang/glog #181

Merged
merged 1 commit into from
Jan 28, 2022
Merged

Conversation

thaJeztah
Copy link
Member

glog has the same issue as k8s.io/klog, and is calling user.Current()
inside an init(); see kubernetes/klog@466fbb6

Calling user.Current() on Windows can result in remove connections being
made to get the user's information, which can be a heavy call. See docker/cli#2420 and docker/cli#2515

glog was only used in a single location, so we may as well remove it.

@thaJeztah
Copy link
Member Author

🤞 hoping vendor check passes; I manually removed the dependency from GoDep.lock. if I run dep ensure locally, it does have some changes, but it wants to add

  • some symlinks in github.com/docker/docker/integration-cli (those are only for tests, and I know adding symlinks to git can be funky)
  • adds / removes a missing newline in vendor/github.com/coreos/etcd/Documentation/README.md
git status -u
On branch fix_init
Your branch is up to date with 'origin/fix_init'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	vendor/github.com/coreos/etcd/Documentation/README.md
	vendor/github.com/docker/docker/integration-cli/fixtures/https/ca.pem
	vendor/github.com/docker/docker/integration-cli/fixtures/https/client-cert.pem
	vendor/github.com/docker/docker/integration-cli/fixtures/https/client-key.pem
	vendor/github.com/docker/docker/integration-cli/fixtures/https/server-cert.pem
	vendor/github.com/docker/docker/integration-cli/fixtures/https/server-key.pem

nothing added to commit but untracked files present (use "git add" to track)

@thaJeztah
Copy link
Member Author

Looks like no version was specified for ginkgo, so it picks "latest", which expects
Go 1.16 or up.

Step 23/51 : RUN go get github.com/onsi/ginkgo/ginkgo
---> Running in e81e14cdf955
# github.com/onsi/ginkgo/types
../../onsi/ginkgo/types/code_location.go:30:19: undefined: os.ReadFile
../../onsi/ginkgo/types/flags.go:125:23: undefined: io.Discard
The command '/bin/sh -c go get github.com/onsi/ginkgo/ginkgo' returned a non-zero code: 2
make: *** [docker.Makefile:73: dockereng/kube-compose-controller] Error 2

glog has the same issue as k8s.io/klog, and is calling `user.Current()`
inside an `init()`; see kubernetes/klog@466fbb6

Calling `user.Current()` on Windows can result in remove connections being
made to get the user's information, which can be a heavy call.

glog was only used in a single location, so we may as well remove it.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Copy link
Member

@rumpl rumpl left a comment

Choose a reason for hiding this comment

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

LGTM

Love to see -1506 :)

@thaJeztah thaJeztah merged commit 1f9b5b8 into docker:master Jan 28, 2022
@thaJeztah
Copy link
Member Author

Relates to docker/cli#3411

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants