Skip to content
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

Merged
merged 2 commits into from Aug 19, 2019

Conversation

jfbai
Copy link
Contributor

@jfbai jfbai commented Aug 11, 2019

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Replace the self defined const StatusTooManyRequests with http.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?:

None

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

None

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Aug 11, 2019
@k8s-ci-robot
Copy link
Contributor

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 11, 2019
@jfbai
Copy link
Contributor Author

jfbai commented Aug 11, 2019

/sig api-machinery

@k8s-ci-robot k8s-ci-robot added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Aug 11, 2019
@dims
Copy link
Member

dims commented Aug 11, 2019

/ok-to-test
/priority important-soon

@k8s-ci-robot k8s-ci-robot added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Aug 11, 2019
@dims
Copy link
Member

dims commented Aug 11, 2019

/assign @Random-Liu @derekwaynecarr
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 11, 2019
Copy link
Contributor

@draveness draveness left a 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

@dims
Copy link
Member

dims commented Aug 11, 2019

/lgtm cancel

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 11, 2019
@jfbai jfbai force-pushed the replace-status-too-many-request branch from b648a94 to 444db41 Compare August 12, 2019 02:03
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 12, 2019
@jfbai
Copy link
Contributor Author

jfbai commented Aug 12, 2019

/test pull-kubernetes-bazel-test

@jfbai jfbai force-pushed the replace-status-too-many-request branch from 444db41 to 07077a8 Compare August 12, 2019 12:52
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 12, 2019
@jfbai
Copy link
Contributor Author

jfbai commented Aug 12, 2019

/retest

1 similar comment
@jfbai
Copy link
Contributor Author

jfbai commented Aug 12, 2019

/retest

@fedebongio
Copy link
Contributor

/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
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sense, fixed.

@jfbai jfbai force-pushed the replace-status-too-many-request branch from af8ee42 to 2a6e6c9 Compare August 13, 2019 02:30
@jfbai
Copy link
Contributor Author

jfbai commented Aug 13, 2019

/retest

@jfbai
Copy link
Contributor Author

jfbai commented Aug 13, 2019

/test pull-kubernetes-e2e-gce

@jfbai
Copy link
Contributor Author

jfbai commented Aug 14, 2019

@yue9944882 @yliaog PTAL, thanks a lot.

@yliaog
Copy link
Contributor

yliaog commented Aug 14, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 14, 2019
@jfbai
Copy link
Contributor Author

jfbai commented Aug 16, 2019

ping @yue9944882 to review and remove do-not-merge/hold label.

@yue9944882
Copy link
Member

sry, notification is flooding

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 16, 2019
@jfbai
Copy link
Contributor Author

jfbai commented Aug 18, 2019

ping @liggitt to help review and approve, thanks a lot. :)

@liggitt
Copy link
Member

liggitt commented Aug 19, 2019

/approve

@liggitt
Copy link
Member

liggitt commented Aug 19, 2019

/priority backlog

@k8s-ci-robot k8s-ci-robot added the priority/backlog Higher priority than priority/awaiting-more-evidence. label Aug 19, 2019
@liggitt liggitt removed the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Aug 19, 2019
@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 19, 2019
@k8s-ci-robot k8s-ci-robot merged commit a6aea3f into kubernetes:master Aug 19, 2019
@k8s-ci-robot k8s-ci-robot added this to the v1.16 milestone Aug 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/backlog Higher priority than priority/awaiting-more-evidence. release-note-none Denotes a PR that doesn't merit a release note. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants