-
Notifications
You must be signed in to change notification settings - Fork 54
chore: Support synchronizer lists in data system config #362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| 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? |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 --> [*]
| end | ||
|
|
||
| @logger.info { "[LDClient] Primary synchronizer #{@active_synchronizer.name} is starting" } | ||
| @logger.info { "[LDClient] Synchronizer[#{current_index}] #{@active_synchronizer.name} is starting" } |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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::ConfigBuilderAPIs and defaults to acceptsynchronizers: [ ... ].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 toINITIALIZINGafter leaving it.Written by Cursor Bugbot for commit eaedc31. This will update automatically on new commits. Configure here.