-
Notifications
You must be signed in to change notification settings - Fork 21
feat: remove max page size validation for ReadChanges #241
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
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Pull request overview
This PR removes the maximum page size validation (100) for the ReadChanges API endpoint, allowing clients to request larger page sizes while maintaining the minimum requirement of 1.
Changes:
- Updated proto validation rules to remove the
lte: 100constraint onReadChangesRequest.page_size - Regenerated validation code to enforce only the minimum value constraint
- Updated validation error message to reflect the new constraint
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| openfga/v1/openfga_service.proto | Removed lte: 100 validation constraint from ReadChangesRequest page_size field |
| proto/openfga/v1/openfga_service.pb.validate.go | Regenerated validation code reflecting the removed maximum page size constraint |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
What problem is being solved?
The ReadChanges API had a hardcoded max page size of 100 defined at the proto level, making it impossible to customize this limit for different deployment environments. Different deployments may need different max page sizes based on their infrastructure capacity, performance requirements, or specific use cases.
https://github.com/openfga/api/blob/main/openfga/v1/openfga_service.proto#L1682-L1709
How is it being solved?
By moving the max page size validation from the proto definition to server-side validation with configurable limits. The proto-level max validation has been removed (in the openfga/api repository), and server-side validation has been implemented with configuration options via CLI flags and environment variables. The default max remains 100 to maintain backward compatibility with existing deployments.
What changes are made to solve it?
openfga/openfga#2887
References
Review Checklist
mainSummary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.