-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Request Limiter reloadable config #25095
Conversation
CI Results: |
c97d244
to
c46ca85
Compare
ea6671b
to
5c6b0f9
Compare
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.
return ValidateUnusedFields(r.UnusedKeys, source) | ||
} | ||
|
||
func (r *RequestLimiter) GoString() string { |
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.
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.
Maybe for tests? Truthfully not sure, but other configs used this so I followed suit.
if result.RequestLimiter.Disable, err = parseutil.ParseBool(result.RequestLimiter.DisableRaw); err != nil { | ||
return err | ||
} | ||
result.RequestLimiter.DisableRaw = nil |
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.
Is this a common pattern, setting it to nil after parsing it? I haven't seen that before.
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.
Yeah, for some reason we clear the raw entry after parsing. I'm not sure I understand it, but copied it from other implementations.
Build Results: |
This commit introduces a new reloadable stanza to the server config to allow disabling the Request Limiter.
This PR builds on top of #25093 to establish a reloadable break-glass config for disabling the request limiter.
Two follow-up PRs are needed: