Skip to content

Conversation

@jsonbailey
Copy link
Contributor

@jsonbailey jsonbailey commented Jan 29, 2026

BEGIN_COMMIT_OVERRIDE
feat: Support FDv2 through the configs new data_system_config option
END_COMMIT_OVERRIDE

Note

Medium Risk
Changes core FDv2 synchronization/fallback behavior and configuration shape, which could affect initialization and failover semantics; coverage is improved via updated specs/contract tests.

Overview
Adds support for an ordered list of FDv2 synchronizers instead of a fixed primary/secondary pair, updating DataSystemConfig/DataSystem::ConfigBuilder APIs and defaults to accept synchronizers: [ ... ].

FDv2’s synchronizer loop is refactored to iterate/fallback across the list, remove permanently failing synchronizers, optionally recover back to the first synchronizer, and optionally switch the list to the FDv1 fallback synchronizer when requested.

Contract tests, specs, and docs/examples are updated to the new list shape; contract test harness version is bumped to v3.0.0-alpha.3, and data source status handling is tightened to prevent regressing back to INITIALIZING after leaving it.

Written by Cursor Bugbot for commit eaedc31. This will update automatically on new commits. Configure here.

@jsonbailey jsonbailey marked this pull request as ready for review January 30, 2026 22:21
@jsonbailey jsonbailey requested a review from a team as a code owner January 30, 2026 22:21
end

# Special handling: You can't go back to INITIALIZING after being anything else
if new_state == LaunchDarkly::Interfaces::DataSource::Status::INITIALIZING && !old_status.state.nil?
Copy link
Member

Choose a reason for hiding this comment

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

@kinyoklion want to make sure you agree with Jason and I on this one.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I think that is right.

I think this is my expectation for state.

stateDiagram-v2
    [*] --> INITIALIZING
    INITIALIZING --> VALID
    INITIALIZING --> OFF
    VALID --> INTERRUPTED
    VALID --> OFF
    INTERRUPTED --> VALID
    INTERRUPTED --> OFF
    OFF --> [*]
    
Loading

end

@logger.info { "[LDClient] Primary synchronizer #{@active_synchronizer.name} is starting" }
@logger.info { "[LDClient] Synchronizer[#{current_index}] #{@active_synchronizer.name} is starting" }
Copy link
Member

Choose a reason for hiding this comment

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

I still think we should let people set some sort of name or label to these.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree but would like to do this in a future PR.

Copy link
Member

@kinyoklion kinyoklion Jan 30, 2026

Choose a reason for hiding this comment

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

I've not done it yet, but I am thinking about adding basically a log of the synchronizer state that would look something like this (for java).
[Streaming(blocked), Polling(available), File(available, active)]
or
[Streaming(unrecoverable), Polling(recoverable), File(available, active)]

So basically the synchronizers in their priority order with their current state.

@jsonbailey jsonbailey merged commit 368aa3c into main Jan 30, 2026
11 checks passed
@jsonbailey jsonbailey deleted the jb/sdk-1732/synchronizer-list branch January 30, 2026 22:40
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.

4 participants