-
Notifications
You must be signed in to change notification settings - Fork 38.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automated cherry pick of #120559: e2e pods: fix WaitForPodsResponding retry #120573
Automated cherry pick of #120559: e2e pods: fix WaitForPodsResponding retry #120573
Conversation
The status error was embedded inside the new error constructed by WaitForPodsResponding's get function, but not wrapped. Therefore `apierrors.IsServiceUnavailable(err)` didn't find it and returned false -> no retries. Wrapping fixes this and Gomega formatting of the error remains useful: err := &errors.StatusError{} err.ErrStatus.Code = 503 err.ErrStatus.Message = "temporary failure" err2 := fmt.Errorf("Controller %s: failed to Get from replica pod %s:\n%w\nPod status:\n%s", "foo", "bar", err, "some status") fmt.Println(format.Object(err2, 1)) fmt.Println(errors.IsServiceUnavailable(err2)) => <*fmt.wrapError | 0xc000139340>: Controller foo: failed to Get from replica pod bar: temporary failure Pod status: some status { msg: "Controller foo: failed to Get from replica pod bar:\ntemporary failure\nPod status:\nsome status", err: <*errors.StatusError | 0xc0001a01e0>{ ErrStatus: { TypeMeta: {Kind: "", APIVersion: ""}, ListMeta: { SelfLink: "", ResourceVersion: "", Continue: "", RemainingItemCount: nil, }, Status: "", Message: "temporary failure", Reason: "", Details: nil, Code: 503, }, }, } true
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/assign @aojea |
/lgtm Thanks |
LGTM label has been added. Git tree hash: 86df626141f64e2eb0472b5b2241e405567a6bf9
|
/kind bug |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aojea, pohly, saschagrunert The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Cherry pick of #120559 on release-1.27.
#120559: e2e pods: fix WaitForPodsResponding retry
For details on the cherry pick process, see the cherry pick requests page.