Skip to content

Conversation

@jimmyjames
Copy link
Contributor

@jimmyjames jimmyjames commented Aug 15, 2025

release v0.9.0

openfga/java-sdk#207

Summary by CodeRabbit

  • New Features
    • Support for RFC 9110 Retry-After with exponential backoff and jitter.
    • Retry-After value now exposed in error details for better observability.
  • Changed
    • Enhanced retry strategy and delay calculation.
    • Minimum retry delay configuration now uses java.time.Duration.
  • Bug Fixes
    • Resolved telemetry export issues.
    • Improved handling of non-transactional write errors.
  • Documentation
    • Updated changelog and retry README for the new release.
  • Chores
    • Version bump to 0.9.0 for the Java client.

@jimmyjames jimmyjames requested a review from a team as a code owner August 15, 2025 19:46
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 15, 2025

Walkthrough

Updates Java client templates and config for v0.9.0: changelog entry and notes, version bump, and README retry sample reflecting API changes. Introduces a new public getter for Retry-After in FgaError and changes ClientConfiguration.minimumRetryDelay to accept java.time.Duration.

Changes

Cohort / File(s) Summary of Changes
Release/versioning update
config/clients/java/config.overrides.json
Bump packageVersion from 0.8.3 to 0.9.0.
Changelog template updates
config/clients/java/CHANGELOG.md.mustache
Add v0.9.0 entry; document Retry-After support, exponential backoff/jitter, new public API getRetryAfterHeader, enhanced retry delay calculation; refine migration notes; add fixes for telemetry export and write error handling.
Retry README/template
config/clients/java/template/README_retries.mustache
Update sample to use Duration for minimumRetryDelay: replace numeric milliseconds with Duration.ofMillis(100); implies API signature change from int/long to java.time.Duration.
Public API declarations (as described in notes)
.../FgaError.java (referenced)
New method: public String getRetryAfterHeader().
Public API declarations (as described in notes)
dev/openfga/sdk/api/configuration/ClientConfiguration (referenced)
Method signature change: minimumRetryDelay(int) → minimumRetryDelay(java.time.Duration).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested reviewers

  • rhamzeh
  • evansims

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch release/java/v0.9.0

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@jimmyjames jimmyjames added this pull request to the merge queue Aug 15, 2025
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 (6)
config/clients/java/template/README_retries.mustache (5)

25-31: Add missing imports for Duration, FgaError, and ExecutionException; remove unused imports.

The snippet uses Duration and FgaError, and catches ExecutionException, but the imports are missing. Also, ObjectMapper and HttpClient are unused in this example.

Apply this diff to fix the imports:

-import com.fasterxml.jackson.databind.ObjectMapper;
+import java.time.Duration;
+import java.util.concurrent.ExecutionException;
 import dev.openfga.sdk.api.client.OpenFgaClient;
 import dev.openfga.sdk.api.configuration.ClientConfiguration;
-import java.net.http.HttpClient;
+import dev.openfga.sdk.errors.FgaError;

57-60: Avoid implying the Retry-After value is always in seconds.

RFC 9110 allows both delta-seconds and HTTP-date formats. The example should not add "seconds" unconditionally.

Apply this diff to clarify the output:

-            System.out.println("Server requested retry after: " + retryAfter + " seconds");
+            System.out.println("Server requested Retry-After: " + retryAfter);

25-29: Optional: keep the snippet minimal by removing unused imports.

If you prefer brevity in examples, drop imports not used in the snippet.

Apply this diff to remove unused imports (if you don’t plan to extend the sample):

-import com.fasterxml.jackson.databind.ObjectMapper;
-import java.net.http.HttpClient;

20-23: Consider noting the Duration-based minimumRetryDelay in the Breaking Changes list.

You call out getRetryAfterHeader, but not the switch to Duration for minimumRetryDelay here (it is shown in the code). Adding it improves discoverability.

Would you like me to propose wording to add a one-liner about “minimumRetryDelay now accepts java.time.Duration” in this section?


1-1: Optional: clarify “maximum allowable: 15 retries” applies to configuration.

A short parenthetical like “(configured via maxRetries, capped at 15)” can reduce ambiguity.

config/clients/java/CHANGELOG.md.mustache (1)

11-12: Deduplicate “Retry-After header value exposed” bullets.

These two bullets convey the same change.

Apply this diff to merge into a single line:

-- RFC 9110 compliant `Retry-After` header support with exponential backoff and jitter
-- `Retry-After` header value exposed in error objects for better observability
-- `FgaError` now exposes `Retry-After` header value via `getRetryAfterHeader()` method
+- RFC 9110 compliant `Retry-After` header support with exponential backoff and jitter
+- `FgaError` now exposes the `Retry-After` header via `getRetryAfterHeader()` for better observability
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 300b07d and f5d721d.

📒 Files selected for processing (3)
  • config/clients/java/CHANGELOG.md.mustache (1 hunks)
  • config/clients/java/config.overrides.json (1 hunks)
  • config/clients/java/template/README_retries.mustache (1 hunks)
⏰ 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). (2)
  • GitHub Check: build-and-test-java-sdk
  • GitHub Check: build-and-test-go-sdk
🔇 Additional comments (3)
config/clients/java/config.overrides.json (1)

6-6: All Java client templates are up to date
No occurrences of “0.8.3” remain in config/clients/java/ (excluding CHANGELOG.md.mustache). The bump to 0.9.0 aligns with the CHANGELOG and README updates.

config/clients/java/template/README_retries.mustache (1)

37-37: Good API example update to Duration.

Using Duration for minimumRetryDelay aligns with the new API and avoids int millis ambiguity.

config/clients/java/CHANGELOG.md.mustache (1)

7-7: Release date and compare link look correct.

v0.9.0 dated 2025-08-15 with compare v0.8.3...v0.9.0 matches the version bump.

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to Branch Protection failures Aug 15, 2025
You're not authorized to push to this branch. Visit "About protected branches" for more information.
@jimmyjames jimmyjames added this pull request to the merge queue Aug 15, 2025
Merged via the queue into main with commit 6221c43 Aug 15, 2025
16 of 19 checks passed
@jimmyjames jimmyjames deleted the release/java/v0.9.0 branch August 15, 2025 20:12
@coderabbitai coderabbitai bot mentioned this pull request Oct 7, 2025
4 tasks
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