Skip to content

feat: adopt the event-delivery cooldown from java-sdk-internal 1.13.0 (SDK-3375) - #257

Draft
tanderson-ld wants to merge 1 commit into
mainfrom
ta/sdk-3375/server-cooldown-adoption
Draft

tanderson-ld wants to merge 1 commit into
mainfrom
ta/sdk-3375/server-cooldown-adoption

Conversation

@tanderson-ld

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.13.0, which replaces the permanent disable-on-unexpected-delivery-failure with bounded, self-recovering cooldown windows (see the internal module PR for the behavior itself).

  • Bumps launchdarklyJavaSdkInternal to 1.13.0.
  • Reinterprets the public subsystems.EventSender.Result.STOP javadoc: it now signals an unexpected failure that makes event delivery back off for a bounded cooldown window rather than permanently stopping. The doc describes the observable contract for implementers: no further analytics calls while a window is open, in-window analytics events are discarded rather than held, diagnostic calls are not suppressed, each additional STOP lengthens the next window up to a ceiling, and delivery resumes on its own once the window elapses. The window schedule itself (5 minutes doubling to a 1 hour ceiling) deliberately stays out of the interface doc, since it belongs to the separately versioned internal module; it is stated here and in the release notes instead. The enum shape is unchanged, so existing custom senders compile and run unmodified.
  • Migrates the internal EventSenderWrapper off the deprecated internal Result constructor onto the new factories (SUCCESS → success(null), FAILURE → failure(), STOP → unexpectedFailure()), and adds the previously missing unit coverage for that mapping (it was unreachable from the default configuration and untested at every level).
  • The data sources' uses of the deprecated boolean HTTP-error helpers are deliberately untouched: there the boolean drives data-source behavior with different semantics, and the FDv2 implementations' migration to the classifier is its own follow-up.
  • Advertises the event-delivery-cooldown capability in the contract test service, activating the four events/delivery cooldown tests (the long-running window-resume test runs in the nightly suite, which already passes -enable-long-running-tests).
  • Suppresses events/delivery cooldown/413 is dropped without disabling delivery in both suppression files, with an in-file rationale comment (the harness treats non-matching lines as inert, which was verified empirically): the shared classifier has no locally-unrecoverable classification for 413, so a 413 currently opens a cooldown window instead of dropping only the oversized payload. That pre-existing gap has its own Jira bug, which includes unsuppressing this test. Two notes: the suppression is coarser than the gap (the test's earlier no-retry assertion already passes), and the FDv2-suite entry is forward-looking, since the v3 harness has not yet ported the cooldown tests.

Dependencies

Draft until two gates clear:

  1. launchdarkly-java-sdk-internal 1.13.0 is released (the internal PR must merge and release-please must publish; CI here fails on the unresolved dependency before then).
  2. A sdk-test-harness release ships feat(events): add event-delivery cooldown contract tests sdk-test-harness#526 as-is. The cooldown tests must arrive together with that PR's configurer-ordering fix: a harness build containing the tests without the fix fails three of them against every SDK (reproduced during review).

Verification

Verified locally end to end: the internal module from its PR branch was published to maven local as 1.13.0, the full server SDK suite is green against it, and the contract test service built from this branch passed the entire events/ suite against the sdk-test-harness #526 build with -enable-long-running-tests (441 total, 424 ran, all passed), with the 413 test skipped by the suppression file and the 5-minute window-resume test passing in real time. Two multi-agent review rounds ran on this diff before it was opened; the wrapper mapping was additionally proven byte-identical to the previous constructor calls for all three enum values.

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.

… (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.

This branch has not been deployed

No deployments
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.

1 participant