Merge pull request #75576 from smarterclayton/bad_2

Remove use of `%#v` in frequently accessed code

Kubernetes-commit: 9f15368c5ceda5900a64c9bb54178531d8f7fbf2
This commit is contained in:
Kubernetes Publisher 2019-03-22 23:59:05 -07:00
commit c6841eb0ec
3 changed files with 56 additions and 56 deletions

102
Godeps/Godeps.json generated
View File

@ -420,207 +420,207 @@
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/apitesting", "ImportPath": "k8s.io/apimachinery/pkg/api/apitesting",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/apitesting/fuzzer", "ImportPath": "k8s.io/apimachinery/pkg/api/apitesting/fuzzer",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/apitesting/roundtrip", "ImportPath": "k8s.io/apimachinery/pkg/api/apitesting/roundtrip",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/equality", "ImportPath": "k8s.io/apimachinery/pkg/api/equality",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/errors", "ImportPath": "k8s.io/apimachinery/pkg/api/errors",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/meta", "ImportPath": "k8s.io/apimachinery/pkg/api/meta",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/api/resource", "ImportPath": "k8s.io/apimachinery/pkg/api/resource",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1beta1", "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1beta1",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/conversion", "ImportPath": "k8s.io/apimachinery/pkg/conversion",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams", "ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/fields", "ImportPath": "k8s.io/apimachinery/pkg/fields",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/labels", "ImportPath": "k8s.io/apimachinery/pkg/labels",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime", "ImportPath": "k8s.io/apimachinery/pkg/runtime",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/schema", "ImportPath": "k8s.io/apimachinery/pkg/runtime/schema",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning", "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/selection", "ImportPath": "k8s.io/apimachinery/pkg/selection",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/types", "ImportPath": "k8s.io/apimachinery/pkg/types",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/cache", "ImportPath": "k8s.io/apimachinery/pkg/util/cache",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/clock", "ImportPath": "k8s.io/apimachinery/pkg/util/clock",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/diff", "ImportPath": "k8s.io/apimachinery/pkg/util/diff",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/errors", "ImportPath": "k8s.io/apimachinery/pkg/util/errors",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/framer", "ImportPath": "k8s.io/apimachinery/pkg/util/framer",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream", "ImportPath": "k8s.io/apimachinery/pkg/util/httpstream",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream/spdy", "ImportPath": "k8s.io/apimachinery/pkg/util/httpstream/spdy",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/intstr", "ImportPath": "k8s.io/apimachinery/pkg/util/intstr",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/json", "ImportPath": "k8s.io/apimachinery/pkg/util/json",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch", "ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/naming", "ImportPath": "k8s.io/apimachinery/pkg/util/naming",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/net", "ImportPath": "k8s.io/apimachinery/pkg/util/net",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/remotecommand", "ImportPath": "k8s.io/apimachinery/pkg/util/remotecommand",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/runtime", "ImportPath": "k8s.io/apimachinery/pkg/util/runtime",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/sets", "ImportPath": "k8s.io/apimachinery/pkg/util/sets",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch", "ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/validation", "ImportPath": "k8s.io/apimachinery/pkg/util/validation",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/validation/field", "ImportPath": "k8s.io/apimachinery/pkg/util/validation/field",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/wait", "ImportPath": "k8s.io/apimachinery/pkg/util/wait",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/util/yaml", "ImportPath": "k8s.io/apimachinery/pkg/util/yaml",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/version", "ImportPath": "k8s.io/apimachinery/pkg/version",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/pkg/watch", "ImportPath": "k8s.io/apimachinery/pkg/watch",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json", "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil", "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect", "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect",
"Rev": "46b17dfe5118ea572340b3b9034af2108ad5301e" "Rev": "03ac7a9ade429d715a1a46ceaa3724c18ebae54f"
}, },
{ {
"ImportPath": "k8s.io/klog", "ImportPath": "k8s.io/klog",

View File

@ -592,7 +592,7 @@ func (r *Request) WatchWithSpecificDecoders(wrapperDecoderFn func(io.ReadCloser)
if result := r.transformResponse(resp, req); result.err != nil { if result := r.transformResponse(resp, req); result.err != nil {
return nil, result.err return nil, result.err
} }
return nil, fmt.Errorf("for request '%+v', got status: %v", url, resp.StatusCode) return nil, fmt.Errorf("for request %s, got status: %v", url, resp.StatusCode)
} }
wrapperDecoder := wrapperDecoderFn(resp.Body) wrapperDecoder := wrapperDecoderFn(resp.Body)
return watch.NewStreamWatcher(restclientwatch.NewDecoder(wrapperDecoder, embeddedDecoder)), nil return watch.NewStreamWatcher(restclientwatch.NewDecoder(wrapperDecoder, embeddedDecoder)), nil
@ -845,13 +845,13 @@ func (r *Request) transformResponse(resp *http.Response, req *http.Request) Resu
// 3. Apiserver closes connection. // 3. Apiserver closes connection.
// 4. client-go should catch this and return an error. // 4. client-go should catch this and return an error.
klog.V(2).Infof("Stream error %#v when reading response body, may be caused by closed connection.", err) klog.V(2).Infof("Stream error %#v when reading response body, may be caused by closed connection.", err)
streamErr := fmt.Errorf("Stream error %#v when reading response body, may be caused by closed connection. Please retry.", err) streamErr := fmt.Errorf("Stream error when reading response body, may be caused by closed connection. Please retry. Original error: %v", err)
return Result{ return Result{
err: streamErr, err: streamErr,
} }
default: default:
klog.Errorf("Unexpected error when reading response body: %#v", err) klog.Errorf("Unexpected error when reading response body: %v", err)
unexpectedErr := fmt.Errorf("Unexpected error %#v when reading response body. Please retry.", err) unexpectedErr := fmt.Errorf("Unexpected error when reading response body. Please retry. Original error: %v", err)
return Result{ return Result{
err: unexpectedErr, err: unexpectedErr,
} }

View File

@ -555,7 +555,7 @@ func (p *processorListener) run() {
case deleteNotification: case deleteNotification:
p.handler.OnDelete(notification.oldObj) p.handler.OnDelete(notification.oldObj)
default: default:
utilruntime.HandleError(fmt.Errorf("unrecognized notification: %#v", next)) utilruntime.HandleError(fmt.Errorf("unrecognized notification: %T", next))
} }
} }
// the only way to get here is if the p.nextCh is empty and closed // the only way to get here is if the p.nextCh is empty and closed