trillian icon indicating copy to clipboard operation
trillian copied to clipboard

Switch from glog to klog

Open jdolitsky opened this issue 2 years ago • 4 comments

Please see the following explanation of the reasons for klog vs. glog: https://github.com/kubernetes/klog#why-was-klog-created

jdolitsky avatar Jul 29 '22 19:07 jdolitsky

This should pull in latest go-licenses once this is merged: https://github.com/google/go-licenses/pull/138

jdolitsky avatar Jul 29 '22 19:07 jdolitsky

/gcbrun

I've just rebased this to fix conflicts in the go.mod file

mhutchinson avatar Aug 02 '22 08:08 mhutchinson

This is currently failing presubmit checks because klog.Fatalf is not recognized as an exit condition, and we're getting staticcheck errors from this. This is fixed (https://github.com/dominikh/go-tools/pull/1110) but we'll need to update the libraries. Error:

running golangci-lint
experimental/batchmap/cmd/verify/verify.go:101:6: SA5011(related information): this check suggests that the pointer can be nil (staticcheck)
		if leaf == nil {
		   ^

mhutchinson avatar Aug 02 '22 09:08 mhutchinson

I've got #2791 to update to the latest linter, but it doesn't fix this problem. https://github.com/dominikh/go-tools/blob/v0.3.3/go/ir/exits.go#L100 - looks like more work is required upstream in the staticcheck library to detect the v2 version of klog.

mhutchinson avatar Aug 02 '22 09:08 mhutchinson

/gcbrun

AlCutter avatar Aug 16 '22 13:08 AlCutter

I've rebased/jimmied onto HEAD and fixed a few follow-up bits, @hickford would you mind casting an eye over the tweaks so I'm not approving my own code?

AlCutter avatar Aug 16 '22 13:08 AlCutter

Added #2801 to track removing the //nolint comments once @mhutchinson's fix to golangci-lint is present in a released version.

AlCutter avatar Aug 18 '22 12:08 AlCutter