Skip to content

Conversation

@jpadilla
Copy link
Member

@jpadilla jpadilla commented Jan 21, 2026

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

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

Summary by CodeRabbit

  • Bug Fixes
    • Removed the upper limit on page size parameter for change log retrieval, allowing larger batch requests.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 21, 2026

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The page_size field validation constraint in ReadChangesRequest was modified to remove the upper bound limit. The validation rule now enforces only a minimum value of 1, eliminating the previous maximum constraint of 100. Both the proto definition and its generated validation code were updated accordingly.

Changes

Cohort / File(s) Summary
Validation constraint removal
openfga/v1/openfga_service.proto, proto/openfga/v1/openfga_service.pb.validate.go
Removed upper bound constraint (lte: 100) from ReadChangesRequest.page_size validation rule. Now only enforces gte: 1. Generated validation code and error message updated consistently to reflect the new constraint (value >= 1).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly describes the main change: removing the maximum page size validation constraint from ReadChanges. It aligns perfectly with the changeset modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jpadilla jpadilla marked this pull request as ready for review January 21, 2026 21:47
@jpadilla jpadilla requested a review from a team as a code owner January 21, 2026 21:47
Copilot AI review requested due to automatic review settings January 21, 2026 21:47
@dosubot
Copy link

dosubot bot commented Jan 21, 2026

Related Documentation

Checked 5 published document(s) in 0 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

Copy link

Copilot AI left a 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: 100 constraint on ReadChangesRequest.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.

@jpadilla jpadilla merged commit 25e22cb into main Jan 22, 2026
10 checks passed
@jpadilla jpadilla deleted the read-changes-max-page-size branch January 22, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants