Skip to content

Commit e3b1bf6

Browse files
chore(docs): clarify some breaking changes in v10 (#368)
1 parent 9818cd5 commit e3b1bf6

4 files changed

Lines changed: 73 additions & 12 deletions

File tree

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ Unleash is a private, secure, and scalable [feature management platform](http
88

99
You can use this client with [Unleash Enterprise](https://www.getunleash.io/pricing?utm_source=readme&utm_medium=java) or [Unleash Open Source](https://github.com/Unleash/unleash).
1010

11-
> **Migrating to v10**
11+
> **Migration guides**
1212
>
13-
> If you're using `MoreOperations`, custom or fallback strategies, subscribers or bootstrapping, please see the full [migration guide](v10_MIGRATION_GUIDE.md) for details. If you use GraalVM or Quarkus, please hold off on upgrading to v10, support is planned but not implemented.
13+
> - [Migrating to v10](v10_MIGRATION_GUIDE.md)
14+
> - [Migrating to v11](v11_MIGRATION_GUIDE.md)
15+
> - [Migrating to v12](v12_MIGRATION_GUIDE.md)
16+
>
17+
> For ongoing updates, prefer v12. The latest patch releases of v10, v11, and v12 are currently aligned on the same optimized implementation path.
1418
1519
## Java Version Compatibility
1620

@@ -110,21 +114,17 @@ You can also **provide an [Unleash context](https://docs.getunleash.io/reference
110114

111115
### Activation strategies
112116

113-
The Java client comes with implementations for the built-in activation strategies provided by Unleash:
117+
The Java client supports Unleash built-in activation strategies (such as `default`, `userWithId`, `gradualRolloutRandom`, `gradualRolloutUserId`, `gradualRolloutSessionId`, `remoteAddress`, and `applicationHostname`).
114118

115-
- DefaultStrategy
116-
- UserWithIdStrategy
117-
- GradualRolloutRandomStrategy
118-
- GradualRolloutUserWithIdStrategy
119-
- GradualRolloutSessionIdStrategy
120-
- RemoteAddressStrategy
121-
- ApplicationHostnameStrategy
119+
As of v10, these built-ins are evaluated by the embedded Yggdrasil engine and are not exposed as public Java strategy classes in this SDK.
122120

123121
Read more about the strategies in the [activation strategies reference documentation](https://docs.getunleash.io/reference/activation-strategies).
124122

125123
#### Custom strategies
126-
You may also specify and implement your own strategy. The specification must be registered in the Unleash UI and
127-
you must register the strategy implementation when you set up Unleash.
124+
You may also specify and implement your own strategy. The specification must be registered in the Unleash UI and you must register the strategy implementation when you set up Unleash.
125+
126+
You can also provide a `fallbackStrategy` via `UnleashConfig` if the client receives a strategy
127+
name it does not recognize.
128128

129129
```java
130130
Strategy s1 = new MyAwesomeStrategy();

v10_MIGRATION_GUIDE.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22

33
This guide highlights the key changes you need to be aware of when upgrading to v10.0.0 of the Unleash client.
44

5+
## Version guidance
6+
7+
For ongoing updates, prefer v12.
8+
9+
The latest patch releases in v10, v11, and v12 are currently aligned on the same optimized
10+
implementation path.
11+
12+
Early v11 introduced a WASM-engine direction that we later reverted in v11 patch releases.
13+
14+
If you need to stay on a specific major version, make sure you run the latest patch in that major.
15+
516
## Custom bootstrapping
617

718
The Bootstrapping interface now requires an `Optional<String>` to be returned rather than a `String`. If the bootstrapper fails to load the feature set, return an `Optional` of empty.
@@ -16,6 +27,12 @@ The Bootstrapping interface now requires an `Optional<String>` to be returned ra
1627

1728
The strategy interface has changed to only include the two methods `getName` and `isEnabled`. `isEnabled` now requires both a parameter map and an `UnleashContext`. This only affects users who are implementing custom or fallback strategies.
1829

30+
Built-in strategy classes from `io.getunleash.strategy` (for example
31+
`GradualRolloutRandomStrategy`, `GradualRolloutUserWithIdStrategy`, and
32+
`GradualRolloutSessionIdStrategy`) are no longer part of the Java SDK public API in v10.
33+
34+
These strategies are evaluated internally by Yggdrasil. There is no class-for-class replacement to import for built-ins; use the built-ins via Unleash configuration, and implement `Strategy` only for custom or fallback behavior.
35+
1936
## Events
2037

2138
The following subscriber functions are no longer available: `togglesBackedUp`, `toggleBackupRestored`, and `togglesBootstrapped`. Subscribing to `featuresBackedUp`, `featuresBackupRestored`, and `featuresBootstrapped` respectively serves the same purpose. These subscribers no longer yield events that contain the full feature flag definition, instead, they expose a `getFeatures` method which returns a list of lightweight Java objects containing the feature name, the type of flag, and the project it's bound to.

v11_MIGRATION_GUIDE.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Migrating to Unleash-Client-Java 11.x
2+
3+
This guide highlights what to know when upgrading from v10 to v11.
4+
5+
## Java runtime requirement
6+
7+
v11 requires Java 11+.
8+
9+
## Migration path
10+
11+
For API-level migration details, refer to the v10 guide:
12+
[v10_MIGRATION_GUIDE.md](v10_MIGRATION_GUIDE.md)
13+
14+
The latest patch releases in v10, v11, and v12 are currently aligned on the same optimized
15+
implementation path.
16+
17+
Early v11 introduced a WASM-engine direction that we later reverted in v11 patch releases.
18+
19+
## Recommendation
20+
21+
v11 is maintained for stability and critical fixes when needed, but for ongoing updates and new
22+
improvements, prefer v12.

v12_MIGRATION_GUIDE.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Migrating to Unleash-Client-Java 12.x
2+
3+
This guide highlights what to know when upgrading from v11 to v12.
4+
5+
## Java runtime requirement
6+
7+
v12 requires Java 11+.
8+
9+
## Migration path
10+
11+
For API-level migration details that still apply, refer to the v10 guide:
12+
[v10_MIGRATION_GUIDE.md](v10_MIGRATION_GUIDE.md)
13+
14+
For current guidance on the v11 line, refer to:
15+
[v11_MIGRATION_GUIDE.md](v11_MIGRATION_GUIDE.md)
16+
17+
The latest patch releases in v10, v11, and v12 are currently aligned on the same optimized
18+
implementation path.
19+
20+
## Recommendation
21+
22+
Use v12 for ongoing updates and future improvements.

0 commit comments

Comments
 (0)