Skip to content

feat: adopt the event-delivery cooldown from java-sdk-internal - #257

Merged
tanderson-ld merged 4 commits into
mainfrom
ta/sdk-3375/server-cooldown-adoption
Nov 20, 2026
Merged

tanderson-ld merged 4 commits into
mainfrom
ta/sdk-3375/server-cooldown-adoption

Conversation

@tanderson-ld

@tanderson-ld tanderson-ld commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

What

Adopts the event-delivery cooldown (EVTPROC Section 1.8, launchdarkly/sdk-specs#278) in the server SDK by picking up launchdarkly-java-sdk-internal 1.14.0, which replaces the permanent disable-on-unexpected-delivery-failure with bounded, self-recovering cooldown windows (see the internal module PR #256 for the behavior itself).

  • Bumps launchdarklyJavaSdkInternal to 1.14.0.
  • Migrates the internal EventSenderWrapper off the deprecated internal Result constructor onto the new factories (SUCCESS to success(null), FAILURE to failure(), STOP to unexpectedFailure()), and adds the previously missing unit coverage for that mapping. This is the one behavioral change in the server module: a custom EventSender returning STOP now drives a bounded cooldown rather than a permanent stop.
  • Leaves the public subsystems.EventSender.Result.STOP enum and its javadoc unchanged. STOP is still the public signal for an unexpected delivery failure; the cooldown is the SDK's internal response to it, documented in the internal module and the release notes rather than in this interface doc.
  • Advertises the event-delivery-cooldown capability in the contract test service, activating the events/delivery cooldown tests.
  • The 413 contract test runs unsuppressed: the locally-unrecoverable 413 carve-out landed in 1.14.0 (feat: replace permanent event-delivery disable with a bounded cooldown #256), so a 413 drops only the oversized payload without entering cooldown, and the test passes.
  • The data sources' uses of the deprecated boolean HTTP-error helpers are deliberately untouched; the FDv2 implementations' migration to the classifier is a separate follow-up.

Dependencies (both gates cleared)

  1. launchdarkly-java-sdk-internal 1.14.0 is released (chore(main): release launchdarkly-java-sdk-internal 1.14.0 #280 merged; on Maven Central).
  2. sdk-test-harness 2.44.0 ships the cooldown tests (#526) with the configurer-ordering fix.

Verification

Built and tested against the released 1.14.0: the server module compiles, checkstyle is clean, and the EventSenderWrapper mapping tests pass (STOP to unexpectedFailure, FAILURE to ordinary failure, SUCCESS to delivered, and the diagnostic path using the same mapping). The full events/ contract suite runs in CI against the released harness.

Release notes

  • Minor (feat). Behavior change worth calling out: event delivery no longer shuts down permanently on an unexpected error such as an invalid SDK key; it backs off in windows from 5 minutes up to 1 hour, probing again after each window, and returns to the normal delivery schedule as soon as a probe succeeds. A custom EventSender returning STOP now causes the same bounded cooldown.

Note

Overview
This PR adopts event-delivery cooldown in the Java server SDK by upgrading launchdarkly-java-sdk-internal to 1.14.0. Unexpected delivery failures (e.g. custom EventSender returning STOP) now trigger bounded backoff and recovery instead of permanently shutting down event delivery.

The server’s EventSenderWrapper is updated to use the internal Result factory APIs (failure(), unexpectedFailure(), success(null)) so STOP maps to unexpected failure and plugs into the new cooldown behavior in the internal event processor.

The contract test service advertises event-delivery-cooldown, enabling harness cooldown tests. Unit tests cover success, ordinary failure, and STOP mapping for both analytics and diagnostic sends.

Reviewed by Cursor Bugbot for commit 2598dcf. Bugbot is set up for automated code reviews on this repo. Configure here.

… (SDK-3375)

Picks up the internal events module release in which an unexpected
delivery failure opens a bounded, self-recovering cooldown window
instead of permanently disabling event delivery.

The public EventSender.Result.STOP javadoc now describes the cooldown
contract instead of a permanent stop; the enum itself is unchanged, so
custom senders compile and run unmodified. The internal wrapper moves
off the deprecated internal Result constructor onto the new factories,
with new unit coverage for all three mappings and their routing.

The contract test service advertises event-delivery-cooldown, which
activates the delivery cooldown tests; the 413 variant is suppressed in
both suppression files with an in-file rationale, since the shared HTTP
classifier still treats a 413 as an unexpected failure rather than a
locally unrecoverable one, which is a pre-existing gap tracked
separately.
@tanderson-ld tanderson-ld changed the title feat: adopt the event-delivery cooldown from java-sdk-internal 1.13.0 (SDK-3375) feat: adopt the event-delivery cooldown from java-sdk-internal 1.13.0 Nov 13, 2026
The 413 carve-out fix ships in java-sdk-internal (SDK-3513), so the
"events/delivery cooldown/413 is dropped without disabling delivery" test now
passes and no longer needs suppressing. Removed from both suppression files;
the v2 file returns to empty.
kinyoklion added a commit that referenced this pull request Nov 19, 2026
**Requirements**

- [ ] 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)
- [ ] I have validated my changes against all supported platform
versions

**Related issues**

- #261: the selectorless FDv2 fix in the shared internal module,
released in 1.13.0
- launchdarkly/sdk-test-harness#600: contract tests for FDv2 payloads
without a selector

**Describe the solution you've provided**

Bumps `launchdarklyJavaSdkInternal` in `lib/sdk/server/build.gradle`
from 1.12.2 to 1.13.0. With 1.12.2, a full transfer with an empty
`state` produced a non-empty selector, so the server SDK sent `basis` on
its next request.

**Describe alternatives you've considered**

#257 also bumps to 1.13.0, but its cooldown changes will ship in a later
internal version.

**Additional context**

Local results on Java 8:
- `./gradlew test` in `lib/sdk/server`: 1987 tests, 0 failures.
- sdk-test-harness#600, `streaming/fdv2/payloads without a selector`:
5/5 pass. 3 of the 5 fail on main.
- Full v3 contract suite with the CI suppression file and persistence
tests: 6311 ran, all passed.

Link to Devin session:
https://app.devin.ai/sessions/fa07e76e6e3346c9b26f2eae4ff6694b
Open in Devin Desktop:
https://app.devin.ai/desktop/session/fa07e76e6e3346c9b26f2eae4ff6694b?variant=devin
Requested by: @kinyoklion

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Overview**
> Bumps **`launchdarklyJavaSdkInternal`** in
`lib/sdk/server/build.gradle` from **1.12.2** to **1.13.0**, pulling in
the shared internal fix for **selectorless FDv2** payloads (issue #261).
> 
> Previously, a full transfer with an empty `state` could still yield a
non-empty selector, so the server SDK incorrectly sent **`basis`** on
the following streaming request. Contract tests for payloads without a
selector are expected to pass after this upgrade.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
703704e. 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>
@tanderson-ld
tanderson-ld marked this pull request as ready for review November 20, 2026 18:57
@tanderson-ld
tanderson-ld requested a review from a team as a code owner November 20, 2026 18:57
@cursor cursor Bot added the risk:medium label Nov 20, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Risk: medium.

Automated risk review (dry run): Medium

This PR would not be automatically approved. Human approval required.

Why: The server SDK now maps EventSender STOP to unexpectedFailure (bounded cooldown instead of a permanent stop) and bumps launchdarkly-java-sdk-internal to 1.14.0, which is a production event-delivery behavior change. Unit tests cover the wrapper mapping, but that is still above the Low-only auto-approve threshold.

If you disagree with this review, share this PR in #feedback-agent-approvals or submit a changes-requested review explaining why.

Open in Web View Automation 

Sent by Cursor Approval Agent: Dry-Run PR Approver

@tanderson-ld tanderson-ld changed the title feat: adopt the event-delivery cooldown from java-sdk-internal 1.13.0 feat: adopt the event-delivery cooldown from java-sdk-internal Nov 20, 2026
@tanderson-ld
tanderson-ld merged commit e21c23b into main Nov 20, 2026
39 of 45 checks passed
@tanderson-ld
tanderson-ld deleted the ta/sdk-3375/server-cooldown-adoption branch November 20, 2026 20:30
tanderson-ld pushed a commit that referenced this pull request Nov 20, 2026
🤖 I have created a release *beep* *boop*
---


##
[7.19.0](launchdarkly-java-server-sdk-7.18.2...launchdarkly-java-server-sdk-7.19.0)
(2026-11-20)


### Features

* adopt the event-delivery cooldown from java-sdk-internal
([#257](#257))
([e21c23b](e21c23b))

---
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**
> Bumps the **Java server SDK** from **7.18.2** to **7.19.0** across
Release Please manifest, `gradle.properties`, `Version.SDK_VERSION`, and
**CHANGELOG**.
> 
> The **7.19.0** notes document a **feature** release: the server SDK
now **adopts event-delivery cooldown behavior from `java-sdk-internal`**
([#257](#)), so failed analytics delivery uses a **bounded cooldown**
instead of staying disabled permanently until restart.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
c9f5dc0. 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants