Skip to content

Commit

Permalink
Merge pull request #129519 from kishen-v/automated-cherry-pick-of-#12…
Browse files Browse the repository at this point in the history
…7422-upstream-release-1.31

Automated cherry pick of #127422: Fix Go vet errors for master golang

Kubernetes-commit: d7fc7e30cb630dab3351480c806c58a8c480156f
  • Loading branch information
k8s-publishing-bot committed Jan 22, 2025
2 parents b39cc9a + 9688574 commit 6da0824
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ require (
gopkg.in/square/go-jose.v2 v2.6.0
k8s.io/api v0.0.0-20240827081448-46f6230a4e83
k8s.io/apimachinery v0.0.0-20240719190441-a8f449e276fe
k8s.io/client-go v0.0.0-20240801004130-5e3e8ea98fe9
k8s.io/client-go v0.0.0-20250122203833-8eaec8fb352c
k8s.io/component-base v0.0.0-20240801005513-6332889bcf10
k8s.io/klog/v2 v2.130.1
k8s.io/kms v0.0.0-20240801005948-e16c35c51bb1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,8 @@ k8s.io/api v0.0.0-20240827081448-46f6230a4e83 h1:EHuPy/62w9Llhp491zNknjEuET9oMPQ
k8s.io/api v0.0.0-20240827081448-46f6230a4e83/go.mod h1:sSxNOmsgxkyv9k7Nu9ysVYNCkTkTemOgz4HxbATSKDQ=
k8s.io/apimachinery v0.0.0-20240719190441-a8f449e276fe h1:lt6b7CTEYMgUTCGIZrATyWMZTQThE+qIQq5YTCbpMVQ=
k8s.io/apimachinery v0.0.0-20240719190441-a8f449e276fe/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo=
k8s.io/client-go v0.0.0-20240801004130-5e3e8ea98fe9 h1:FtksMSsr8nNBmsSXlqvs3hPE/7BJ5wI/mJYjGypoEtk=
k8s.io/client-go v0.0.0-20240801004130-5e3e8ea98fe9/go.mod h1:2bbCJ3Sd+yFlCoexz86XNKsJ8hBFUVTeHsjEhrODbfE=
k8s.io/client-go v0.0.0-20250122203833-8eaec8fb352c h1:2KWIT9nRYHqRPUnJ7hPiWNRnvZjM29KezMf1jJHmS9w=
k8s.io/client-go v0.0.0-20250122203833-8eaec8fb352c/go.mod h1:Ej+MeavJjLACzTBTUQxDzM/jq+XTcmChX/4PvmdDc9o=
k8s.io/component-base v0.0.0-20240801005513-6332889bcf10 h1:tHph4IwKpAlb5BF1qvmAiZPsekcg7ulTIhHrGrw/OgY=
k8s.io/component-base v0.0.0-20240801005513-6332889bcf10/go.mod h1:4BSQhq9G+cFOChP5FQhxewvI8nzmsOPyetLz/Gh2Npw=
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
Expand Down
2 changes: 1 addition & 1 deletion pkg/cel/lazy/lazy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func TestLazyMapType(t *testing.T) {
evalCounter++
v, err := compileAndRun(env, activation, `{"a": "a"}`)
if err != nil {
return types.NewErr(err.Error())
return types.NewErr("%s", err.Error())
}
return v
})
Expand Down
6 changes: 3 additions & 3 deletions pkg/endpoints/apiserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2818,7 +2818,7 @@ func TestDeleteWithOptions(t *testing.T) {
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
t.Logf(string(s))
t.Log(string(s))
}
if simpleStorage.deleted != ID {
t.Errorf("Unexpected delete: %s, expected %s", simpleStorage.deleted, ID)
Expand Down Expand Up @@ -2858,7 +2858,7 @@ func TestDeleteWithOptionsQuery(t *testing.T) {
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
t.Logf(string(s))
t.Log(string(s))
}
if simpleStorage.deleted != ID {
t.Fatalf("Unexpected delete: %s, expected %s", simpleStorage.deleted, ID)
Expand Down Expand Up @@ -2901,7 +2901,7 @@ func TestDeleteWithOptionsQueryAndBody(t *testing.T) {
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
t.Logf(string(s))
t.Log(string(s))
}
if simpleStorage.deleted != ID {
t.Errorf("Unexpected delete: %s, expected %s", simpleStorage.deleted, ID)
Expand Down
2 changes: 1 addition & 1 deletion pkg/endpoints/handlers/responsewriters/writers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ func TestSerializeObject(t *testing.T) {
compressionEnabled: true,
statusCode: http.StatusInternalServerError,
out: smallPayload,
outErrs: []error{fmt.Errorf(string(largePayload)), fmt.Errorf("bad2")},
outErrs: []error{errors.New(string(largePayload)), errors.New("bad2")},
mediaType: "application/json",
req: &http.Request{
Header: http.Header{
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/filters/maxinflight.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ var (
func handleError(w http.ResponseWriter, r *http.Request, err error) {
errorMsg := fmt.Sprintf("Internal Server Error: %#v", r.RequestURI)
http.Error(w, errorMsg, http.StatusInternalServerError)
klog.Errorf(err.Error())
klog.Error(err.Error())
}

// requestWatermark is used to track maximal numbers of requests in a particular phase of handling
Expand Down
2 changes: 1 addition & 1 deletion pkg/storage/cacher/cacher_whitebox_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1603,7 +1603,7 @@ func verifyEvents(t *testing.T, w watch.Interface, events []watch.Event, strictO
if !valid {
t.Logf("(called from line %d)", line)
for _, err := range errors {
t.Errorf(err)
t.Error(err)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/util/peerproxy/peerproxy_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func (h *peerProxyHandler) WrapHandler(handler http.Handler) http.Handler {
// TODO: maintain locally serviceable GVRs somewhere so that we dont have to
// consult the storageversion-informed map for those
if len(serviceableByResp.peerEndpoints) == 0 {
klog.Errorf(fmt.Sprintf("GVR %v is not served by anything in this cluster", gvr))
klog.Error(fmt.Sprintf("GVR %v is not served by anything in this cluster", gvr))
handler.ServeHTTP(w, r)
return
}
Expand Down

0 comments on commit 6da0824

Please sign in to comment.