Skip to content

Conversation

@rhamzeh
Copy link
Member

@rhamzeh rhamzeh commented Oct 8, 2025

Description

Changes

Added:

  • Add configurable --page-size parameter to fga tuple read command with intelligent defaults (#571)
    • When --max-pages=0 (read all tuples), defaults to 100 for better efficiency
    • When --max-pages!=0 (limited pages), defaults to 50 to maintain backward compatibility
    • Custom page size can be specified with --page-size flag
      Changed:
  • Import now ignores duplicate tuples instead of failing the import. Note: this feature requires OpenFGA server v1.10.0 or later. You can still import to previous versions, but this setting will be ignored. Writes that are not imports (aka. writing a single tuple instead of from a file) will still fail on duplicates.

Fixed:

What problem is being solved?

How is it being solved?

What changes are made to solve it?

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

  • New Features

    • Added configurable --page-size for fga tuple read with improved defaults and ability to override.
  • Changed

    • Import now ignores duplicate tuples during import (requires OpenFGA v1.10.0+); older servers may behave differently. Non-import writes unchanged regarding duplicates.
  • Documentation

    • Added Unreleased section for version 0.7.5 (2025-10-08) outlining the new page-size option and import behavior updates.

@rhamzeh rhamzeh requested a review from a team as a code owner October 8, 2025 21:37
@rhamzeh rhamzeh marked this pull request as draft October 8, 2025 21:37
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 8, 2025

Walkthrough

Updates CHANGELOG.md with an Unreleased 0.7.5 entry documenting a new configurable --page-size for fga tuple read (with defaulting rules) and a change to import behavior to ignore duplicate tuples (requires OpenFGA v1.10.0+); also notes a fix for retrying 5xx errors.

Changes

Cohort / File(s) Summary
Documentation: CHANGELOG
CHANGELOG.md
Added Unreleased (0.7.5 – 2025-10-09) notes: new configurable --page-size for tuple reads with intelligent defaults and attribution; clarified default behaviors and override rules; changed import to ignore duplicate tuples (requires OpenFGA v1.10.0+), compatibility caveats for older servers; noted fix for retrying 5xx errors.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant CLI as CLI (user)
    participant Client as OpenFGA Client
    participant Server as OpenFGA Server

    rect rgb(230,245,255)
    CLI->>Client: tuple read (--max-pages, --page-size)
    Client->>Server: ReadTuples(pageSize)
    Server-->>Client: TuplePage (may be multiple pages)
    Client-->>CLI: Aggregated tuples
    end

    rect rgb(245,255,230)
    CLI->>Client: import tuples (file)
    Client->>Server: WriteTuples(import=true)
    note right of Server: If server >= v1.10.0 -> ignore duplicate writes\nelse -> previous duplicate handling applies
    Server-->>Client: Import result (duplicates ignored or error)
    Client-->>CLI: Import report
    end
Loading

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Suggested reviewers

  • aaguiarz
  • jimmyjames

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly indicates this PR’s purpose, namely releasing version 0.7.5, which aligns with the changeset’s addition of new CLI flags, behavior changes, and changelog updates associated with that release. It is concise, clear, and directly related to the main change.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch release/v0.7.5

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.

@rhamzeh rhamzeh changed the title feat: ignore duplicate writes on import release: v0.7.5 Oct 8, 2025
jimmyjames
jimmyjames previously approved these changes Oct 9, 2025
Base automatically changed from feat/ignore-duplicate-writes-on-import to main October 9, 2025 01:19
@rhamzeh rhamzeh dismissed jimmyjames’s stale review October 9, 2025 01:19

The base branch was changed.

@rhamzeh rhamzeh marked this pull request as ready for review October 9, 2025 03:53
@rhamzeh rhamzeh enabled auto-merge October 9, 2025 03:55
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
CHANGELOG.md (1)

21-22: Wrap the bare URL in markdown link formatting.

markdownlint flags bare URLs; consider converting this to [link text](url) to keep lint clean.

-- Issue retrying 5xx errors. Fixed upstream (https://github.com/openfga/go-sdk#204)
+- Issue retrying 5xx errors. Fixed upstream ([openfga/go-sdk#204](https://github.com/openfga/go-sdk#204))
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0f9651a and 91bc223.

📒 Files selected for processing (1)
  • CHANGELOG.md (2 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
CHANGELOG.md

22-22: Bare URL used

(MD034, no-bare-urls)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Tests

@rhamzeh rhamzeh added this pull request to the merge queue Oct 9, 2025
Merged via the queue into main with commit d92e5f5 Oct 9, 2025
22 checks passed
@rhamzeh rhamzeh deleted the release/v0.7.5 branch October 9, 2025 12:08
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.

3 participants