-
Notifications
You must be signed in to change notification settings - Fork 55
chore: Add the FDv2 data system protocol implementation #346
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
base: jb/sdk-1541/convert-client-to-datasystem
Are you sure you want to change the base?
chore: Add the FDv2 data system protocol implementation #346
Conversation
lib/ldclient-rb/impl/data_store/feature_store_client_wrapper.rb
Outdated
Show resolved
Hide resolved
lib/ldclient-rb/config.rb
Outdated
| # @param fdv1_fallback_synchronizer [Proc(Config) => LaunchDarkly::Interfaces::DataSystem::Synchronizer, nil] | ||
| # The (optional) builder proc for FDv1-compatible fallback synchronizer | ||
| # | ||
| def initialize(initializers:, primary_synchronizer:, secondary_synchronizer:, |
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.
You don't have to change it in this PR, but remember that we want to make synchronizers a list like the initializers.
Co-authored-by: Matthew M. Keeler <mkeeler@launchdarkly.com>
lib/ldclient-rb/impl/data_store/feature_store_client_wrapper.rb
Outdated
Show resolved
Hide resolved
Co-authored-by: Matthew M. Keeler <mkeeler@launchdarkly.com>
Co-authored-by: Matthew M. Keeler <mkeeler@launchdarkly.com>
|
|
||
| collections.each do |kind, collection| | ||
| collection.each do |key, item| | ||
| @dependency_tracker.update_dependencies_from(kind, key, item) |
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.
Dependency tracker receives raw hashes instead of model objects
The Store class passes raw hash data from changes_to_store_data to DependencyTracker.update_dependencies_from, but DependencyTracker.compute_dependencies_from expects FeatureFlag/Segment model objects and uses method-style access like .prerequisites and .rules. Raw hashes don't have these methods, causing a NoMethodError when dependency tracking executes. The data needs to be decoded into model objects before being passed to the dependency tracker, or the dependency tracker needs to use hash-style access ([:prerequisites]).
Note
Introduces the experimental FDv2 data system and plumbing to acquire, persist, and serve flag data.
DataSystemConfigandLaunchDarkly::DataSystem::ConfigBuilderwith presets (default,streaming,polling,daemon,persistent_store) to compose initializers, synchronizers, and store modeImpl::DataSystem::FDv2) managing initializers/synchronizers, readiness, failover/recovery, diagnostics, and broadcasting status/change eventsinterfaces/data_system.rb,impl/data_system/protocolv2.rb): events, intents, selectors, change sets, payloads, updatesImpl::DataSource::StatusProviderV2,Impl::DataStore::StatusProviderV2) and a feature store client wrapper with availability monitoringdatasystem_configoption; minor model deserialization guard simplificationWritten by Cursor Bugbot for commit 0250999. This will update automatically on new commits. Configure here.