Skip to content

Commit

Permalink
Merge pull request #115405 from MikeSpreitzer/automated-cherry-pick-o…
Browse files Browse the repository at this point in the history
…f-#115259-upstream-release-1.25

Automated cherry pick of #115259: Carefully compute request path for metrics
  • Loading branch information
k8s-ci-robot committed Mar 2, 2023
2 parents b43fa62 + 792b44d commit ce29ac8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/e2e/apimachinery/flowcontrol.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,10 @@ func createPriorityLevel(f *framework.Framework, priorityLevelName string, assur
}

func getPriorityLevelConcurrency(c clientset.Interface, priorityLevelName string) (int32, error) {
resp, err := c.CoreV1().RESTClient().Get().RequestURI("/metrics").DoRaw(context.TODO())
req := c.CoreV1().RESTClient().Get().AbsPath("/metrics")
resp, err := req.DoRaw(context.TODO())
if err != nil {
return 0, err
return 0, fmt.Errorf("error requesting metrics; request=%#+v, request.URL()=%s: %w", req, req.URL(), err)
}
sampleDecoder := expfmt.SampleDecoder{
Dec: expfmt.NewDecoder(bytes.NewBuffer(resp), expfmt.FmtText),
Expand Down

0 comments on commit ce29ac8

Please sign in to comment.