Repository navigation
Comparing changes
Open a pull request
base repository: launchdarkly/openfeature-java-server
base: 1.2.0
head repository: launchdarkly/openfeature-java-server
compare: 1.2.1
- 5 commits
- 7 files changed
- 3 contributors
Commits on Aug 31, 2026
-
fix: Include the last data source error in the provider error event (#59
) The `PROVIDER_ERROR` event now carries the last data source error instead of a fixed "Provider shutdown" message. - Matches the OFP spec, which requires the error event to report the last data source error, with a description as a fallback - Matches the `PROVIDER_STALE` branch, which already reports the last error, and the wording used by the Python provider <details> <summary>Implementation details</summary> Found during the weekly OpenFeature provider audit against `launchdarkly/sdk-specs` (`OFP`). `handleDataSourceStatus` discarded `res.getLastError()` in the `OFF` case, so an application listening for `PROVIDER_ERROR` had no way to see why the data source permanently failed (for example a `401` from an invalid SDK key). The state transition and initialization behavior are unchanged. The message is `ErrorInfo.toString()`, not `ErrorInfo.getMessage()`: `ErrorInfo.fromHttpError` leaves the message null and records the failure as a kind plus a status code, so `getMessage()` would emit a null message for exactly the HTTP failures this change is meant to surface. `toString()` is the SDK's own rendering of the kind, status code, and message. **Requirements** - [x] I have added test coverage for new or changed functionality - [x] I have followed the repository's [pull request submission guidelines](../blob/main/CONTRIBUTING.md#submitting-pull-requests) - [x] I have validated my changes against all supported platform versions **Related issues** None. **Describe alternatives you've considered** Keeping the static message and adding the error as event metadata: OpenFeature only exposes a message on the event details, so the message is the right place for it. **Testing** `./gradlew test checkstyleMain`. Lifecycle tests cover a data source that fails after initialization with a kind/status/message error, and one that fails with an HTTP-only error, asserting the emitted message is non-empty and names the status code. </details> Link to Devin session: https://app.devin.ai/sessions/38a6eaf69fcf41109e136a1d0fe5e899 Open in Devin Desktop: https://app.devin.ai/desktop/session/38a6eaf69fcf41109e136a1d0fe5e899?variant=devin Requested by: @kinyoklion --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 765b4fc - Browse repository at this point
Copy the full SHA 765b4fcView commit details
Commits on Sep 1, 2026
-
docs: Add an OpenFeature feature matrix to the README (#60)
Adds a feature matrix to the README mirroring the OpenFeature Java SDK's own feature table, so a reader can see at a glance what this provider supports. - Same rows and order as the [OpenFeature Java SDK matrix](https://github.com/open-feature/java-sdk#-features), plus `Initialization` and `Flag metadata` - Rows that are not fully supported state whether the limitation is in the OpenFeature SDK or in the provider, and link the tracking issue - Only `Initialization` is marked partial: it has no timeout of its own ([#58](#58)) - The same matrix format is being added to the Python, .NET and JavaScript providers, and already exists in the Ruby provider, so they can be compared side by side <details> <summary>Implementation details</summary> Written during the weekly OpenFeature provider audit. Each row was checked against the provider source rather than assumed; the wording follows the matrix already present in the Ruby provider README. **Requirements** - [x] I have added test coverage for new or changed functionality (documentation only) - [x] I have followed the repository's [pull request submission guidelines](../blob/main/CONTRIBUTING.md#submitting-pull-requests) - [x] I have validated my changes against all supported platform versions **Related issues** [#58](#58) </details> Link to Devin session: https://app.devin.ai/sessions/38a6eaf69fcf41109e136a1d0fe5e899 Requested by: @kinyoklion <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Overview** > Adds a **Feature matrix** section to the README (between supported Java versions and Getting started) so readers can compare this LaunchDarkly OpenFeature provider against the [OpenFeature Java SDK feature table](https://github.com/open-feature/java-sdk#-features). > > The table lists each capability with ✅/
⚠️ status and short notes on provider vs SDK responsibility (e.g. multi-provider, hooks, transaction context from the SDK; targeting, eventing, tracking, flag metadata from the provider). **Initialization** is the only row marked partial (⚠️ ), with a link to [#58](#58) for the lack of a dedicated initialize timeout. A legend clarifies supported, partial, and not-supported icons. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 1f5bac8. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>Configuration menu - View commit details
-
Copy full SHA for 1f35bc8 - Browse repository at this point
Copy the full SHA 1f35bc8View commit details -
fix: Do not emit a redundant ready event during initialization (#63)
Stops the provider from emitting a second `PROVIDER_READY` event during initialization, and makes `LifeCycleTest.itCanHandleClientThatIsNotInitializedImmediately` wait for the event instead of racing it. - The provider emitted ready from its data source status listener while `initialize` was still running, and the OpenFeature SDK emits its own ready event when initialization succeeds — consumers got two. - The test only passed because it asserted the counter before the second event was dispatched; adding a wait made it fail `expected: <1> but was: <2>` 25/25 times, which is how the double emit surfaced. - Ready events for later recoveries (stale/error back to valid) are unaffected — only the emit that happens while `initialize` is in flight is suppressed. - Under CPU load, `LifeCycleTest` now passes 25/25; before this branch it failed 9/25 with `expected: <1> but was: <0>`. <details> <summary>Implementation details</summary> **Requirements** - [x] I have added test coverage for new or changed functionality - [x] I have followed the repository's [pull request submission guidelines](../blob/main/CONTRIBUTING.md#submitting-pull-requests) - [x] I have validated my changes against all supported platform versions **Mechanism** `initialize` sets an `initializing` flag for the duration of the call. In the `VALID` branch of `handleDataSourceStatus` the flag is read *before* completing the initialization future, so the initialize thread cannot clear it between the read and the emit: ```java if (emit) { boolean duringInitialization = initializing; completer.complete(true); if (!duringInitialization) { emitProviderReady(...); } } ``` `setProviderAndWait` also returns before API-level handlers have run, since the OpenFeature SDK dispatches events on its own executor; the test now waits on a `CompletableFuture` (1s timeout) and then asserts the count after a short grace period so a duplicate emit is still caught. **Alternatives rejected** Dropping the exact-count assertion from the test — it hides exactly the duplicate-emit bug this change fixes. **Testing** `./gradlew test --tests '*LifeCycleTest*' --rerun-tasks` repeated 25x with six busy loops pinning the CPUs, and the full suite once: all green. On `main` the same loop failed 9/25 (and 5/20 in an earlier round). CI on this branch was also re-triggered 11 times with empty commits, all green, before the provider change. **Related** Found while investigating #32 (debug output for a flaky `itEmitsReadyEvents`); that flake did not reproduce in ~75 runs and its debug prints are superseded by #59, so #32 looks closable. </details> Link to Devin session: https://app.devin.ai/sessions/3c9b094de4f84a0f82ba266098e823e9 Open in Devin Desktop: https://app.devin.ai/desktop/session/3c9b094de4f84a0f82ba266098e823e9?variant=devin Requested by: @kinyoklion <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Overview** > Fixes **double `PROVIDER_READY` events** when the LaunchDarkly data source becomes valid while `initialize` is still running. The OpenFeature SDK already emits ready on successful initialization; the provider was also calling `emitProviderReady` from the data-source status listener, so listeners could see two events. > > An **`initializing` flag** wraps the wait in `initialize` (cleared in `finally`). On transition to `VALID`, the provider still completes initialization and updates state, but **skips `emitProviderReady` while `initializing` is true**. Recoveries after init (e.g. stale/error back to valid) still emit ready as before. > > **Tests:** `itCanHandleClientThatIsNotInitializedImmediately` now waits for the ready event and rechecks the count after a short delay to catch races. A new case uses a controllable data source to assert that **failed init followed by `VALID` still produces exactly one ready event**. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit f8a6052. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>Configuration menu - View commit details
-
Copy full SHA for 373eac5 - Browse repository at this point
Copy the full SHA 373eac5View commit details
Commits on Sep 8, 2026
-
fix: Accept any numeric tracking event value (#65)
`track` threw a `ClassCastException` for a tracking event value which was not a `Double`. - `TrackingEventDetails.getValue()` is an `Optional<Number>`, so `new MutableTrackingEventDetails(99)` (an `Integer`) reached the provider and failed the `(Double)` cast before any event was sent. - The value is now converted with `Number.doubleValue()`, which is what the LaunchDarkly `trackMetric` API takes. - Added a test tracking an integer value. <details> <summary>Implementation details</summary> The OpenFeature Java SDK does not constrain the numeric type an application passes, and `MutableTrackingEventDetails` stores the `Number` as given, so any of `Integer`, `Long`, `Float`, or `BigDecimal` reached the cast. Only `Double` worked. Testing: the change is covered by `ProviderTest.itCanTrackAnIntegerTrackingEventValue`. The test suite could not be run on this machine because Maven Central and the Gradle plugin portal answered dependency resolution with HTTP 429 from this network; CI runs the suite. </details> Link to Devin session: https://app.devin.ai/sessions/fe1eb757fe694ef79f3d09f6307d4b47 Open in Devin Desktop: https://app.devin.ai/desktop/session/fe1eb757fe694ef79f3d09f6307d4b47?variant=devin Requested by: @kinyoklion <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Overview** > Fixes **`track`** failing with a **`ClassCastException`** when **`TrackingEventDetails`** carries a metric that is not a **`Double`** (for example **`MutableTrackingEventDetails(99)`** with an **`Integer`**). > > The provider now reads **`Optional<Number>`** via **`Number.doubleValue()`** before calling LaunchDarkly **`trackMetric`**, matching the API’s double metric parameter. A unit test asserts integer metrics are forwarded as **`99.0`**. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit d3177c0. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Signed-off-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for bfce072 - Browse repository at this point
Copy the full SHA bfce072View commit details -
chore(main): release 1.2.1 (#62)
🤖 I have created a release *beep* *boop* --- ## [1.2.1](1.2.0...1.2.1) (2026-09-08) ### Bug Fixes * Accept any numeric tracking event value ([#65](#65)) ([bfce072](bfce072)) * Do not emit a redundant ready event during initialization ([#63](#63)) ([373eac5](373eac5)) * Include the last data source error in the provider error event ([#59](#59)) ([765b4fc](765b4fc)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Overview** > **Release Please** bumps the library from **1.2.0** to **1.2.1** in `gradle.properties` and `.release-please-manifest.json`, and adds the **1.2.1** section to `CHANGELOG.md` (2026-09-08). > > This PR does not change runtime code—only release metadata. The changelog records three bug fixes already on the branch: broader acceptance of numeric **tracking** event values ([#65](#65)), no redundant **ready** event during provider initialization ([#63](#63)), and including the last **data source error** in provider **error** events ([#59](#59)). > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit a7908f4. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for c87a967 - Browse repository at this point
Copy the full SHA c87a967View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 1.2.0...1.2.1