openfga / openfga/java-sdk

Tracking: retire ClientWriteOptions.disableTransactions in favour of transactions()/isTransactionsEnabled()

Open
#371 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
54
Forks
26
Avg merge
2d 7h
Merged PRs (30d)
9

Description

Goal

Retire the double-negative ClientWriteOptions.disableTransactions(boolean) / disableTransactions() in favour of the affirmative transactions(boolean) / isTransactionsEnabled() added in PR #352. Both APIs coexist today and the old methods are not deprecated yet.

This tracks the full deprecation lifecycle across three repos. The methods cannot be deprecated until public guidance stops teaching them, which is what review on PR #352 flagged.

Sequence

Tickets are numbered (N of 5) as one continuous sequence across repos. Positions 1 to 3 are step 1 and run in parallel. Position 4 is step 2. Position 5 is step 4.

Step 1: update docs and examples (must be released, not just merged)

  • (1 of 5) openfga/sdk-generator#718: Java README template, the source of the generated README.md
  • (2 of 5) openfga/java-sdk#368: Javadoc in OpenFgaClient.java plus the three example projects
  • (3 of 5) openfga/spring-boot-starter#186: servlet example

Step 2: deprecate

  • (4 of 5) openfga/java-sdk#369: re-apply @Deprecated, migrate tests, keep one back-compat test. Blocked until 1 to 3 ship in a release.

Step 3: wait

  • One release cycle so consumers on the updated, released docs can migrate during the deprecated-but-present window. No ticket: this is a human-held gate, not an actionable task.

Step 4: remove (breaking, major bump)

  • (5 of 5) openfga/java-sdk#370: remove both methods. Blocked by position 4 plus the wait.

Why staged

The gate between step 1 and step 2 is release, not merge. Deprecating before the updated docs ship publishes a README and Javadoc that teach a method which now warns, which is the exact problem raised in review. Sequencing docs first, then deprecation, then a wait, then removal, gives users a clean migration path with no warning churn on current guidance.

Migration mapping

  • disableTransactions(true) becomes transactions(false)
  • disableTransactions(false) becomes transactions(true)
  • disableTransactions() becomes !isTransactionsEnabled()

Not doing

  • Renaming the shared disableTransactions property in sdk-generator's GENERATING-A-NEW-SDK.md. The Go, JS, Python, and .NET SDKs use different transaction option shapes, so aligning the cross-SDK spec is a separate design question. This effort is Java-scoped.

Owner: @curfew-marathon

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the three Step 1 tickets: sdk-generator#718, java-sdk#368, and spring-boot-starter#186, including OpenFgaClient.java, the Java README template, and the example projects they mention. Done means the documentation and examples ship in a release before java-sdk#369 and the later removal ticket proceed.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.