Skip to content

chore: make streamed list objects client methods private#264

Merged
SoulPancake merged 3 commits intomainfrom
feat/make-streamed-lists-pvt
Dec 6, 2025
Merged

chore: make streamed list objects client methods private#264
SoulPancake merged 3 commits intomainfrom
feat/make-streamed-lists-pvt

Conversation

@SoulPancake
Copy link
Copy Markdown
Member

@SoulPancake SoulPancake commented Dec 2, 2025

Description

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

  • Breaking Changes

    • The streaming API for list objects operations has been removed from the public interface and is no longer available.
  • Documentation

    • Streaming example code has been temporarily disabled.

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

Copilot AI review requested due to automatic review settings December 2, 2025 13:13
@SoulPancake SoulPancake requested a review from a team as a code owner December 2, 2025 13:13
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Dec 2, 2025

Walkthrough

The PR converts public streaming API methods StreamedListObjects and StreamedListObjectsExecute to internal (unexported) methods by renaming them with lowercase identifiers. Test cases and example code are updated to reference the new internal APIs, and the streaming example is temporarily disabled via comment.

Changes

Cohort / File(s) Change Summary
Streaming API internalization
client/client.go
Removed public StreamedListObjects() and StreamedListObjectsExecute() methods; introduced internal streamedListObjects() and streamedListObjectsExecute() equivalents; updated Execute() to delegate to internal method
Test updates
client/streaming_test.go
Updated all test invocations from public StreamedListObjects to internal streamedListObjects
Example deprecation
example/streamed_list_objects/main.go
Replaced active example code with comment block explaining temporary access restrictions; main function now contains minimal no-op implementation

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify all external callers of the removed public API have been identified and updated
  • Confirm no breaking changes are introduced to the public SDK surface beyond the intended streaming API removal
  • Check that internal method delegation in Execute() maintains functional equivalence

Possibly related PRs

Suggested reviewers

  • sergiught
  • ewanharris
  • daniel-jonathan

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main change: converting streamed list objects client methods from public to private (unexported) identifiers.
✨ 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 feat/make-streamed-lists-pvt

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.

@dosubot
Copy link
Copy Markdown

dosubot bot commented Dec 2, 2025

Documentation Updates

1 document(s) were updated by changes in this PR:

OpenFGA's Space

How did I do? Any feedback?  Join Discord

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Dec 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 33.89%. Comparing base (e6dd3e6) to head (e80beaf).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #264   +/-   ##
=======================================
  Coverage   33.89%   33.89%           
=======================================
  Files         114      114           
  Lines       11022    11022           
=======================================
  Hits         3736     3736           
  Misses       6922     6922           
  Partials      364      364           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

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 makes the StreamedListObjects and StreamedListObjectsExecute client methods private by renaming them to lowercase variants (streamedListObjects and streamedListObjectsExecute), removing them from the public SdkClient interface, and updating all internal references and tests accordingly.

  • The methods are made private in the client layer
  • The example code is preserved in comments with explanatory notes
  • All tests are updated to use the new private method names

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
client/client.go Renamed StreamedListObjects and StreamedListObjectsExecute to lowercase (private) versions and removed them from the SdkClient interface
client/streaming_test.go Updated all test calls to use the new private method names (streamedListObjects)
example/streamed_list_objects/main.go Commented out the example code with explanatory notes about the methods being private

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

@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: 0

🧹 Nitpick comments (3)
client/client.go (2)

3339-3344: Consider adding a godoc comment explaining the internal status.

The method is now unexported, but there's no documentation explaining:

  • Why this is internal-only
  • Whether it's intended to become public in the future
  • What alternatives users should use

Consider adding a comment like:

// streamedListObjects is an internal method for streaming list objects.
// This API is not yet stabilized and may change in future releases.
// Use ListObjects for the stable paginated API.
func (client *OpenFgaClient) streamedListObjects(ctx _context.Context) SdkClientStreamedListObjectsRequestInterface {

3286-3304: Public types remain but lack a public entry point.

The types SdkClientStreamedListObjectsRequest, SdkClientStreamedListObjectsRequestInterface, ClientStreamedListObjectsRequest, ClientStreamedListObjectsOptions, and ClientStreamedListObjectsResponse are still exported (public), but there's no public method to use them with.

This creates an inconsistent API surface. Consider either:

  1. Making these types internal as well (lowercase) if they're only for internal use
  2. Documenting why they remain public (e.g., for future public API)
  3. Adding a comment indicating they're reserved for future use
example/streamed_list_objects/main.go (1)

1-8: Reconsider the approach of maintaining a disabled example file.

Rather than keeping a commented-out example, consider one of these alternatives:

  • Remove the example file entirely until the API is made public
  • Move it to a documentation or design folder as a reference implementation
  • Use Go's build tags or file suffix (e.g., main.go.disabled) to exclude it from builds

An empty main() function in the examples directory serves no purpose for users. If the streamedListObjects API will eventually become public, preserve the full implementation in a version control history or design document rather than as a disabled file in the active codebase.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e6dd3e6 and 1980c90.

📒 Files selected for processing (3)
  • client/client.go (3 hunks)
  • client/streaming_test.go (6 hunks)
  • example/streamed_list_objects/main.go (2 hunks)
🧰 Additional context used
🪛 GitHub Actions: Build, Test and Publish
example/streamed_list_objects/main.go

[error] 1-1: gofmt formatting check failed. The following files are not formatted: example/streamed_list_objects/main.go. Run 'gofmt -w .' to fix.

⏰ 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: Agent
🔇 Additional comments (3)
client/streaming_test.go (1)

59-59: LGTM! Test updates are consistent.

All test cases have been correctly updated to call the internal streamedListObjects method. The tests maintain their structure and continue to validate the streaming functionality appropriately.

Also applies to: 118-118, 165-165, 190-190, 233-233, 300-300

client/client.go (2)

3371-3371: Verify consistency: Execute() delegates to internal method.

The change correctly updates the internal delegation from StreamedListObjectsExecute to streamedListObjectsExecute. This maintains consistency with the method renaming.


3386-3440: Implementation correctly made internal.

The streamedListObjectsExecute method is now properly unexported and maintains all its functionality. The implementation looks correct.

@SoulPancake SoulPancake requested review from a team as code owners December 2, 2025 13:21
@SoulPancake SoulPancake changed the title chore: make streamed list client methods private chore: make streamed list object client methods private Dec 5, 2025
@SoulPancake SoulPancake changed the title chore: make streamed list object client methods private chore: make streamed list objects client methods private Dec 5, 2025
@SoulPancake SoulPancake added this pull request to the merge queue Dec 6, 2025
Merged via the queue into main with commit 944ecd8 Dec 6, 2025
17 checks passed
@SoulPancake SoulPancake deleted the feat/make-streamed-lists-pvt branch December 6, 2025 02:24
SoulPancake added a commit that referenced this pull request Jan 9, 2026
github-merge-queue bot pushed a commit that referenced this pull request Jan 12, 2026
* Revert "chore: make streamed list objects client methods private (#264)"

This reverts commit 944ecd8.

* feat: add changelog entry
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