Commit b996c8b9 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #45875 from YuPengZTE/devGetForObject

Automatic merge from submit-queue fix missing argument for Errorf(%v): format reads arg 1, have only 0 args Signed-off-by: 's avataryupengzte <yu.peng36@zte.com.cn> **What this PR does / why we need it**: add the missing code of "len(res.Items)" **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note ```
parents 3948a2d6 fd6992c4
......@@ -216,7 +216,7 @@ func (m *namespacedMetrics) GetForObject(groupKind schema.GroupKind, name string
}
if len(res.Items) != 1 {
return nil, fmt.Errorf("the custom metrics API server returned %v results when we asked for exactly one")
return nil, fmt.Errorf("the custom metrics API server returned %v results when we asked for exactly one", len(res.Items))
}
return &res.Items[0], nil
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment