Skip to content

feat: Configure or disable the FDv1 fallback per connection mode - #420

Open
kinyoklion wants to merge 1 commit into
mainfrom
rlamb/fdv1-fallback-mode-config
Open

kinyoklion wants to merge 1 commit into
mainfrom
rlamb/fdv1-fallback-mode-config

Conversation

@kinyoklion

@kinyoklion kinyoklion commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Summary

A customized connection mode always got the SDK's default FDv1 fallback, with no way to change its poll interval or endpoint or to remove it. ConnectionModeBuilder now has:

  • fdv1FallbackSynchronizer(FDv1FallbackSynchronizerEntry): the entry comes from DataSystemComponents.fdv1FallbackSynchronizer() and has pollIntervalMillis(int) and serviceEndpointsOverride(...), like PollingSynchronizerEntry. The fallback synchronizer polls the override's polling endpoint when one is given, and the SDK's polling endpoint otherwise.
  • disableFdv1Fallback(): the mode has no FDv1 fallback.

A mode that does neither keeps the default fallback for that mode, as before.

Disabling the fallback depends on launchdarkly/sdk-specs#281. The contract test "directive without FDv1 fallback configured halts the data system" needs the halting in #413 to pass with the fallback disabled; on main the SDK ignores the directive when a mode has no fallback.

Tested with new unit tests. The SDK's unit tests pass locally, on this branch and merged with #413.

Opened from termag

SDK-3492


Note

Overview
Custom connection modes can now override or remove the FDv1 fallback synchronizer instead of always inheriting the SDK default.

ConnectionModeBuilder adds fdv1FallbackSynchronizer(FDv1FallbackSynchronizerEntry) and disableFdv1Fallback(). Entries come from DataSystemComponents.fdv1FallbackSynchronizer() and support poll interval and polling service endpoint overrides, wired through DataSystemBuilder.buildModeTable() and FDv1PollingSynchronizerBuilderImpl. Modes that configure neither keep the previous default fallback; empty overrides still get no fallback.

Unit tests cover builder state, per-mode disable/enable, endpoint routing, and poll scheduling.

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

ConnectionModeBuilder gains fdv1FallbackSynchronizer(), which takes an
FDv1FallbackSynchronizerEntry from DataSystemComponents.fdv1FallbackSynchronizer()
with a poll interval and a service endpoints override, and
disableFdv1Fallback(), which leaves the mode with no FDv1 fallback. A mode
that does neither keeps the SDK's default FDv1 fallback for that mode.

The FDv1 fallback synchronizer polls the override's polling endpoint when
one is given and the SDK's polling endpoint otherwise.

Generated-by: termag
@kinyoklion
kinyoklion marked this pull request as ready for review November 12, 2026 17:52
@kinyoklion
kinyoklion requested a review from a team as a code owner November 12, 2026 17:52

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