Skip to content

Conversation

@SoulPancake
Copy link
Member

@SoulPancake SoulPancake commented Jan 9, 2026

Makes streamed list objects client layer available for use

Summary by CodeRabbit

  • New Features

    • Streamed list objects API is now publicly available, allowing clients to retrieve objects using streaming responses
  • Documentation

    • Re-enabled official examples and documentation guides for the streamed list objects functionality
  • Tests

    • Activated integration and unit tests for the streamed list objects feature

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

Copilot AI review requested due to automatic review settings January 9, 2026 15:38
@SoulPancake SoulPancake requested review from a team as code owners January 9, 2026 15:38
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 9, 2026

Walkthrough

This PR re-enables the StreamedListObjects streaming API feature by making three previously package-private method overloads in OpenFgaClient public, uncommenting the example code and README documentation, and activating the corresponding unit and integration tests.

Changes

Cohort / File(s) Summary
StreamedListObjects API Exposure
src/main/java/dev/openfga/sdk/api/client/OpenFgaClient.java
Changed access modifier from package-private to public for three streamedListObjects method overloads, enabling public consumption of the streaming API
Documentation & Example Re-enablement
examples/streamed-list-objects/README.md, examples/streamed-list-objects/src/main/java/dev/openfga/sdk/example/StreamedListObjectsExample.java
Removed HTML comment delimiters and block comment markers to uncomment and activate example documentation and code
Test Activation
src/test-integration/java/dev/openfga/sdk/api/client/OpenFgaClientIntegrationTest.java, src/test/java/dev/openfga/sdk/api/client/StreamedListObjectsTest.java
Removed @Disabled annotation and related import to re-enable previously disabled tests

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • ewanharris
  • curfew-marathon
🚥 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 pull request title clearly and accurately describes the main change: making the streamed list objects client layer public (specifically the three streamedListObjects method overloads in OpenFgaClient).
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e6431f1 and 3f4ac5d.

📒 Files selected for processing (5)
  • examples/streamed-list-objects/README.md
  • examples/streamed-list-objects/src/main/java/dev/openfga/sdk/example/StreamedListObjectsExample.java
  • src/main/java/dev/openfga/sdk/api/client/OpenFgaClient.java
  • src/test-integration/java/dev/openfga/sdk/api/client/OpenFgaClientIntegrationTest.java
  • src/test/java/dev/openfga/sdk/api/client/StreamedListObjectsTest.java
💤 Files with no reviewable changes (4)
  • examples/streamed-list-objects/README.md
  • examples/streamed-list-objects/src/main/java/dev/openfga/sdk/example/StreamedListObjectsExample.java
  • src/test/java/dev/openfga/sdk/api/client/StreamedListObjectsTest.java
  • src/test-integration/java/dev/openfga/sdk/api/client/OpenFgaClientIntegrationTest.java
⏰ 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). (6)
  • GitHub Check: Agent
  • GitHub Check: CodeQL analysis (java)
  • GitHub Check: Test and Build OpenFGA (11)
  • GitHub Check: Test and Build OpenFGA (21)
  • GitHub Check: Test and Build OpenFGA (17)
  • GitHub Check: Analyze (java)
🔇 Additional comments (3)
src/main/java/dev/openfga/sdk/api/client/OpenFgaClient.java (3)

1134-1141: LGTM - Well-designed API entry point

The first overload provides a clean, simple entry point for streaming objects without additional options. The consumer validation and delegation pattern are correct.


1174-1183: LGTM - Consistent overloading pattern

The second overload appropriately extends functionality by accepting options while maintaining the same validation and delegation pattern as the first overload.


1214-1266: LGTM - Robust streaming implementation with comprehensive test coverage

The implementation is well-structured with proper validation, error handling, and configuration management. The dual error reporting strategy (both errorConsumer callback and CompletableFuture failure) provides flexibility for callers.

The error handling at lines 1258-1266 correctly catches synchronous exceptions during setup, while the StreamedListObjectsApi handles asynchronous streaming errors via the passed errorConsumer.

Test coverage is comprehensive, including:

  • Successful streaming with multiple objects (3 documents tested)
  • Diverse error scenarios (stream errors, null error messages, HTTP 400 errors, exception type preservation)
  • Configuration validation (storeId requirement)
  • Edge cases (empty streams, large volumes of 100+ items, CompletableFuture chaining)
  • Options and custom headers handling

Consumer exception handling responsibility correctly rests with StreamedListObjectsApi since the consumer is passed as a parameter rather than invoked directly in OpenFgaClient.


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

dosubot bot commented Jan 9, 2026

Related Documentation

Checked 6 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

Copy link
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 API public by changing the visibility of three method overloads in the OpenFgaClient class from package-private to public, and enables previously disabled tests and examples.

  • Changed visibility of three streamedListObjects method overloads from package-private to public
  • Enabled unit and integration tests by removing @Disabled annotations
  • Uncommented the streamed list objects example code and updated its documentation

Reviewed changes

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

Show a summary per file
File Description
src/main/java/dev/openfga/sdk/api/client/OpenFgaClient.java Made three streamedListObjects method overloads public
src/test/java/dev/openfga/sdk/api/client/StreamedListObjectsTest.java Removed @Disabled annotation and import to enable unit tests
src/test-integration/java/dev/openfga/sdk/api/client/OpenFgaClientIntegrationTest.java Removed @Disabled annotation and import to enable integration test
examples/streamed-list-objects/src/main/java/dev/openfga/sdk/example/StreamedListObjectsExample.java Uncommented example code by removing comment markers
examples/streamed-list-objects/README.md Removed temporary note about API unavailability

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

@codecov-commenter
Copy link

codecov-commenter commented Jan 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 37.06%. Comparing base (e6431f1) to head (3f4ac5d).

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #272      +/-   ##
============================================
+ Coverage     36.59%   37.06%   +0.46%     
- Complexity     1182     1200      +18     
============================================
  Files           194      194              
  Lines          7504     7504              
  Branches        865      865              
============================================
+ Hits           2746     2781      +35     
+ Misses         4633     4593      -40     
- Partials        125      130       +5     

☔ 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.

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