-
Notifications
You must be signed in to change notification settings - Fork 38.6k
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
Replace self defined const StatusTooManyRequests with http.StatusTooM… #81265
Replace self defined const StatusTooManyRequests with http.StatusTooM… #81265
Conversation
Hi @jfbai. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/sig api-machinery |
/ok-to-test |
/assign @Random-Liu @derekwaynecarr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please take a look at the error message:
# k8s.io/kubernetes/plugin/pkg/admission/eventratelimit [k8s.io/kubernetes/plugin/pkg/admission/eventratelimit.test]
plugin/pkg/admission/eventratelimit/admission_test.go:519:43: undefined: "k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/api/errors".StatusTooManyRequests
/lgtm cancel |
b648a94
to
444db41
Compare
/test pull-kubernetes-bazel-test |
444db41
to
07077a8
Compare
/retest |
1 similar comment
/retest |
/assign @yliaog |
@@ -32,6 +32,8 @@ import ( | |||
const ( | |||
// StatusTooManyRequests means the server experienced too many requests within a | |||
// given window and that the client must wait to perform the action again. | |||
// DEPRECATED: please use http.StatusTooManyRequests, this will be removed in | |||
// the future version. | |||
StatusTooManyRequests = 429 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about replacing 429 with http.StatusTooManyRequests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make sense, fixed.
af8ee42
to
2a6e6c9
Compare
/retest |
/test pull-kubernetes-e2e-gce |
@yue9944882 @yliaog PTAL, thanks a lot. |
/lgtm |
ping @yue9944882 to review and remove |
sry, notification is flooding /hold cancel |
ping @liggitt to help review and approve, thanks a lot. :) |
/approve |
/priority backlog |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jfbai, liggitt 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 |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Replace the self defined const
StatusTooManyRequests
withhttp.StatusTooManyRequests
to make status code more consistent.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
None
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: