Skip to content

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

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

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

Conversation

@kinyoklion

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

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

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