-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
ratelimit: allow rate limit names in the global rate limit response #10557
Conversation
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.
/wait
@@ -91,6 +91,9 @@ message RateLimitResponse { | |||
|
|||
// The unit of time. | |||
Unit unit = 2; | |||
|
|||
// A name or description of this limit. | |||
string name = 3; |
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.
This seems reasonable. Could you place it as the first field (but retain field number 3) for clarity? Thanks.
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.
Done
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.
Can you run fix_format so that the CI checks pass? Thanks. You will probably want to make the change to the v2 RLS, as fix_format currently forward propagates that to v3.
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.
This is my first envoy PR so I might be running fix format incorrectly, but it's not doing anything to these files. The format check errors on CI look unrelated?...
diff: /source/bazel-bin/tools/testdata/protoxform/envoy/v2/protos/tools/testdata/protoxform/envoy/v2/oneof.proto.v3.proto: No such file or directory
diff: /source/bazel-bin/tools/testdata/protoxform/envoy/v2/protos/tools/testdata/protoxform/envoy/v2/oneof.proto.v3.envoy_internal.proto: No such file or directory
diff: /source/bazel-bin/tools/testdata/protoxform/envoy/v2/protos/tools/testdata/protoxform/envoy/v2/discovery_service.proto.v2.proto: No such file or directory
diff: /source/bazel-bin/tools/testdata/protoxform/envoy/v2/protos/tools/testdata/protoxform/envoy/v2/discovery_service.proto.v3.proto: No such file or directory
diff: /source/bazel-bin/tools/testdata/protoxform/envoy/v2/protos/tools/testdata/protoxform/envoy/v2/discovery_service.proto.v3.proto: No such file or directory
diff: /source/bazel-bin/tools/testdata/protoxform/envoy/v2/protos/tools/testdata/protoxform/envoy/v2/discovery_service.proto.v3.envoy_internal.proto: No such file or directory
Updated v2 as well
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.
Yes, this is strange, I'll look into this, I can replicate locally.
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.
Fix should be in #10582. If you scroll up, I think for some reason or another, check_format
was unhappy with this PR still.
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.
Just merged #10582, can you merge master?
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.
I merged from master. Still not getting any changes recommended when I run fix formatting
The command I'm using is tools/code_format/check_format.py fix api/envoy/service/ratelimit
b140c56
to
c7d540e
Compare
e8b185f
to
ac18449
Compare
@dweitzman it looks like you haven't included the changes that |
ac18449
to
b7cf21d
Compare
Format should be updated (managed to install xcode, Whenever https://www.githubstatus.com/ stays the outage is over I'll rebase to get the tests to re-run |
b7cf21d
to
463be14
Compare
Updated. test/extensions/common/proxy_protocol/proxy_protocol_regression_test.cc seems to have a compile error in the presubmit, but it seems unrelated to these changes For my own future reference, to get the format fixer working I did this:
|
@dweitzman can you do another merge master and push? We've fixed some of these issues that CI failed on (master was broken yesterday for a bit). Thanks! |
This part of the global rate limiter api is not currently used by envoy, but for anyone implementing the envoy global rate limiter api being able to describe what specific limit you've hit in a human-readable and/or machine-readable way will be useful for debugging, alerting, etc. See envoyproxy#10556 Signed-off-by: David Weitzman <dweitzman@pinterest.com>
463be14
to
bd5289c
Compare
Looks like the presubmit is green now |
Signed-off-by: Harvey Tuch <htuch@google.com>
Description:
This part of the global rate limiter api is not currently used by envoy, but for anyone implementing the envoy global rate limiter api being able to describe what specific limit you've hit in a human-readable and/or machine-readable way will be useful for debugging, alerting, etc.
Risk Level: Low
Testing: n/a
Docs Changes: n/a
Release Notes: n/a
Fixes #10556