Skip to content

Conversation

@jsonbailey
Copy link
Contributor

@jsonbailey jsonbailey commented Dec 23, 2025

Note

Introduces the experimental FDv2 data system and plumbing to acquire, persist, and serve flag data.

  • Adds DataSystemConfig and LaunchDarkly::DataSystem::ConfigBuilder with presets (default, streaming, polling, daemon, persistent_store) to compose initializers, synchronizers, and store mode
  • New FDv2 coordinator (Impl::DataSystem::FDv2) managing initializers/synchronizers, readiness, failover/recovery, diagnostics, and broadcasting status/change events
  • Implements protocol/types for FDv2 (interfaces/data_system.rb, impl/data_system/protocolv2.rb): events, intents, selectors, change sets, payloads, updates
  • Adds data/source & data/store status providers (Impl::DataSource::StatusProviderV2, Impl::DataStore::StatusProviderV2) and a feature store client wrapper with availability monitoring
  • Introduces an FDv2 in-memory read-only store and a composite store that switches from persistent to memory, handles deltas, dependency tracking, change events, and optional persistence/commit on recovery
  • Config: new datasystem_config option; minor model deserialization guard simplification

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

@jsonbailey jsonbailey requested a review from a team as a code owner December 23, 2025 20:08
# @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:,
Copy link
Member

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>
jsonbailey and others added 3 commits December 24, 2025 14:56
Co-authored-by: Matthew M. Keeler <mkeeler@launchdarkly.com>
Co-authored-by: Matthew M. Keeler <mkeeler@launchdarkly.com>
@jsonbailey jsonbailey requested a review from keelerm84 December 24, 2025 22:39

collections.each do |kind, collection|
collection.each do |key, item|
@dependency_tracker.update_dependencies_from(kind, key, item)
Copy link

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]).

Additional Locations (1)

Fix in Cursor Fix in Web

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.

3 participants