-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add max limit for refs or values in requests #21
Conversation
If we do this, we should agree on a global max, i.e. all places that take repeated |
Includes but may not be limited to:
|
@@ -264,7 +267,10 @@ message GetCommitNodesRequest { | |||
bool allow_paths_not_exist = 3; | |||
} | |||
// The File sets to request. | |||
repeated Value values = 1 [(buf.validate.field).repeated.min_items = 1]; | |||
repeated Value values = 1 [ |
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 isn't a ref, but I presume we want to set an upper limit for these repeated values 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.
Yea
This PR adds
max_items
toGetOwnersRequest
.I think we should avoid unbounded repeated refs and have sane limits. If a client needs to resolve >250 IDs or names, they can hit the endpoint multiple times.
Although it's not a list endpoint, used 250 for parity.