Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
0627ceb
feat!: Remove payload filter support from the FDv2 data system
keelerm84 Nov 5, 2026
9876aae
feat: Add preconfigured flags and event settings to TestDataV2
keelerm84 Nov 5, 2026
d9979ff
test: Run the client specs on the FDv2 data system
keelerm84 Nov 5, 2026
f469ba3
Merge remote-tracking branch 'origin/feat/9.x' into mk/SDK-3471/specs…
keelerm84 Nov 5, 2026
f4887c4
fix: Validate preconfigured TestDataV2 items and deliver changes in o…
keelerm84 Nov 5, 2026
aadae60
fix: Reject preconfigured TestDataV2 values that are not JSON values
keelerm84 Nov 5, 2026
c0f0460
fix: Keep TestDataV2 flags unchanged when a rule builder changes afte…
keelerm84 Nov 5, 2026
c638040
fix: Prevent TestDataV2 from briefly restoring an older flag when a c…
keelerm84 Nov 6, 2026
32c491d
feat!: Remove the FDv1 data system (#487)
keelerm84 Nov 10, 2026
54b1e96
chore: Trigger CI for the merged FDv1 removal
keelerm84 Nov 10, 2026
bc1f9c3
Merge remote-tracking branch 'origin/feat/9.x' into mk/SDK-3471/specs…
keelerm84 Nov 10, 2026
4c20765
test: Report the stream parse error from on_error in the FDv2 streami…
keelerm84 Nov 10, 2026
c148842
test: Wait for the file poller to start before changing the file
keelerm84 Nov 10, 2026
eb8a0b5
feat!: Drop the V2 suffixes and rename data_system_config to data_system
keelerm84 Nov 10, 2026
47de2de
Merge remote-tracking branch 'origin/mk/SDK-3471/specs-on-fdv2' into …
keelerm84 Nov 10, 2026
2147122
feat!: Drop the V2 suffix from the file and test data source builders
keelerm84 Nov 10, 2026
07cb411
Merge remote-tracking branch 'origin/feat/9.x' into mk/SDK-3530/drop-…
keelerm84 Nov 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions contract-tests/client_entity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ def initialize(log, config)
data_system.fdv1_compatible_synchronizer(build_fdv1_fallback_builder(fdv1_fallback_config))
end

opts[:data_system_config] = data_system.build
opts[:data_system] = data_system.build
else
# Without a data system configuration, the client does not connect to LaunchDarkly for data.
opts[:data_system_config] = LaunchDarkly::DataSystem.custom.build
opts[:data_system] = LaunchDarkly::DataSystem.custom.build
end

if config[:events]
Expand Down
6 changes: 3 additions & 3 deletions lib/ldclient-rb/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Config
# @option opts [BigSegmentsConfig] :big_segments See {#big_segments}.
# @option opts [Hash] :application See {#application}
# @option opts [Boolean] :omit_anonymous_contexts See {#omit_anonymous_contexts}
# @option opts [DataSystemConfig] :data_system_config See {#data_system_config}
# @option opts [DataSystemConfig] :data_system See {#data_system}
# @option hooks [Array<Interfaces::Hooks::Hook]
# @option plugins [Array<Interfaces::Plugins::Plugin]
#
Expand Down Expand Up @@ -66,7 +66,7 @@ def initialize(opts = {})
@hooks = (opts[:hooks] || []).keep_if { |hook| hook.is_a? Interfaces::Hooks::Hook }
@plugins = (opts[:plugins] || []).keep_if { |plugin| plugin.is_a? Interfaces::Plugins::Plugin }
@omit_anonymous_contexts = opts.has_key?(:omit_anonymous_contexts) && opts[:omit_anonymous_contexts]
@data_system_config = opts[:data_system_config]
@data_system = opts[:data_system]
@instance_id = nil
end

Expand Down Expand Up @@ -332,7 +332,7 @@ def with_wrapper_information(wrapper_name, wrapper_version = nil)
#
# @return [DataSystemConfig, nil]
#
attr_reader :data_system_config
attr_reader :data_system

#
# The default LaunchDarkly client configuration. This configuration sets
Expand Down
2 changes: 1 addition & 1 deletion lib/ldclient-rb/impl/data_source/status_provider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module DataSource
# This class implements the {LaunchDarkly::Interfaces::DataSource::StatusProvider} interface.
# It maintains the current status of the data source and broadcasts status changes to listeners.
#
class StatusProviderV2
class StatusProvider
include LaunchDarkly::Interfaces::DataSource::StatusProvider

extend Forwardable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ module DataStore
# Provides additional behavior that the client requires before or after feature store operations.
# Currently this just means sorting the data set for init() and dealing with data store status listeners.
#
class FeatureStoreClientWrapperV2
class FeatureStoreClientWrapper
include LaunchDarkly::Interfaces::FeatureStore

#
# Initialize the wrapper.
#
# @param store [LaunchDarkly::Interfaces::FeatureStore] The underlying feature store
# @param store_update_sink [LaunchDarkly::Impl::DataStore::StatusProviderV2] The status provider for updates
# @param store_update_sink [LaunchDarkly::Impl::DataStore::StatusProvider] The status provider for updates
# @param logger [Logger] The logger instance
#
def initialize(store, store_update_sink, logger)
Expand Down Expand Up @@ -144,7 +144,7 @@ def available?
poller_to_stop = @poller
@poller = nil
elsif @poller.nil?
task = LaunchDarkly::Impl::RepeatingTask.new(0.5, 0, method(:check_availability), @logger, "LDClient/DataStoreWrapperV2#check-availability")
task = LaunchDarkly::Impl::RepeatingTask.new(0.5, 0, method(:check_availability), @logger, "LDClient/DataStoreWrapper#check-availability")
@poller = task
@poller.start
end
Expand Down
4 changes: 2 additions & 2 deletions lib/ldclient-rb/impl/data_store/in_memory_feature_store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ module LaunchDarkly
module Impl
module DataStore
#
# InMemoryFeatureStoreV2 is a read-only in-memory store implementation for FDv2.
# InMemoryFeatureStore is a read-only in-memory store implementation for FDv2.
#
class InMemoryFeatureStoreV2
class InMemoryFeatureStore
include LaunchDarkly::Interfaces::DataSystem::ReadOnlyStore
def initialize(logger)
@logger = logger
Expand Down
4 changes: 2 additions & 2 deletions lib/ldclient-rb/impl/data_store/status_provider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ module LaunchDarkly
module Impl
module DataStore
#
# StatusProviderV2 is the FDv2-specific implementation of {LaunchDarkly::Interfaces::DataStore::StatusProvider}.
# StatusProvider is the FDv2-specific implementation of {LaunchDarkly::Interfaces::DataStore::StatusProvider}.
#
class StatusProviderV2
class StatusProvider
include LaunchDarkly::Interfaces::DataStore::StatusProvider

extend Forwardable
Expand Down
6 changes: 3 additions & 3 deletions lib/ldclient-rb/impl/data_store/store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def initialize(flag_change_broadcaster, change_set_broadcaster, logger)
@persistent_store_writable = false

# Source of truth for flag evaluations once initialized
@memory_store = InMemoryFeatureStoreV2.new(logger)
@memory_store = InMemoryFeatureStore.new(logger)

# Used to track dependencies between items in the store. Items are keyed by string,
# the form in which the data model names prerequisites and segments.
Expand Down Expand Up @@ -63,7 +63,7 @@ def initialize(flag_change_broadcaster, change_set_broadcaster, logger)
#
# @param persistent_store [LaunchDarkly::Interfaces::FeatureStore] The persistent store implementation
# @param writable [Boolean] Whether the persistent store should be written to
# @param status_provider [LaunchDarkly::Impl::DataStore::StatusProviderV2, nil] Optional status provider for the persistent store
# @param status_provider [LaunchDarkly::Impl::DataStore::StatusProvider, nil] Optional status provider for the persistent store
# @return [Store] self for method chaining
#
def with_persistence(persistent_store, writable, status_provider = nil)
Expand Down Expand Up @@ -182,7 +182,7 @@ def initialized?
#
# Get the data store status provider for the persistent store, if configured.
#
# @return [LaunchDarkly::Impl::DataStore::StatusProviderV2, nil] The data store status provider for the persistent store, if configured
# @return [LaunchDarkly::Impl::DataStore::StatusProvider, nil] The data store status provider for the persistent store, if configured
#
def get_data_store_status_provider
@lock.synchronize do
Expand Down
8 changes: 4 additions & 4 deletions lib/ldclient-rb/impl/data_system/fdv2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,19 @@ def initialize(sdk_key, config, data_system_config)
@store = LaunchDarkly::Impl::DataStore::Store.new(@flag_change_broadcaster, @change_set_broadcaster, @logger)

# Status providers
@data_source_status_provider = LaunchDarkly::Impl::DataSource::StatusProviderV2.new(
@data_source_status_provider = LaunchDarkly::Impl::DataSource::StatusProvider.new(
@data_source_broadcaster
)
@data_store_status_provider = LaunchDarkly::Impl::DataStore::StatusProviderV2.new(nil, @data_store_broadcaster)
@data_store_status_provider = LaunchDarkly::Impl::DataStore::StatusProvider.new(nil, @data_store_broadcaster)

# Configure persistent store if provided
if @data_system_config.data_store
@data_store_status_provider = LaunchDarkly::Impl::DataStore::StatusProviderV2.new(
@data_store_status_provider = LaunchDarkly::Impl::DataStore::StatusProvider.new(
@data_system_config.data_store,
@data_store_broadcaster
)
writable = @data_system_config.data_store_mode == :read_write
wrapper = LaunchDarkly::Impl::DataStore::FeatureStoreClientWrapperV2.new(
wrapper = LaunchDarkly::Impl::DataStore::FeatureStoreClientWrapper.new(
@data_system_config.data_store,
@data_store_status_provider,
@logger
Expand Down
6 changes: 3 additions & 3 deletions lib/ldclient-rb/impl/data_system/polling.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def initialize(poll_interval, requester, logger)
@logger = logger
@interrupt_event = Concurrent::Event.new
@stop = Concurrent::Event.new
@name = "PollingDataSourceV2"
@name = "PollingDataSource"
end

#
Expand All @@ -134,7 +134,7 @@ def fetch(ss)
# @yieldparam update [LaunchDarkly::Interfaces::DataSystem::Update]
#
def sync(ss)
@logger.info { "[LDClient] Starting PollingDataSourceV2 synchronizer" }
@logger.info { "[LDClient] Starting PollingDataSource synchronizer" }

until @stop.set?
result = @requester.fetch(ss.selector)
Expand Down Expand Up @@ -229,7 +229,7 @@ def sync(ss)
# Stops the synchronizer.
#
def stop
@logger.info { "[LDClient] Stopping PollingDataSourceV2 synchronizer" }
@logger.info { "[LDClient] Stopping PollingDataSource synchronizer" }
@interrupt_event.set
@stop.set
end
Expand Down
6 changes: 3 additions & 3 deletions lib/ldclient-rb/impl/data_system/streaming.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def initialize(sdk_key, http_config, initial_reconnect_delay, config)
@initial_reconnect_delay = initial_reconnect_delay
@config = config
@logger = config.logger
@name = "StreamingDataSourceV2"
@name = "StreamingDataSource"
@sse = nil
@stopped = Concurrent::Event.new
@diagnostic_accumulator = nil
Expand All @@ -68,7 +68,7 @@ def set_diagnostic_accumulator(diagnostic_accumulator)
# @yieldparam update [LaunchDarkly::Interfaces::DataSystem::Update]
#
def sync(ss)
@logger.info { "[LDClient] Starting StreamingDataSourceV2 synchronizer" }
@logger.info { "[LDClient] Starting StreamingDataSource synchronizer" }
log_connection_started

change_set_builder = LaunchDarkly::Interfaces::DataSystem::ChangeSetBuilder.new
Expand Down Expand Up @@ -175,7 +175,7 @@ def sync(ss)
# Stops the streaming synchronizer.
#
def stop
@logger.info { "[LDClient] Stopping StreamingDataSourceV2 synchronizer" }
@logger.info { "[LDClient] Stopping StreamingDataSource synchronizer" }
@sse&.close
@stopped.set
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module Integrations
# The files use the same format as the v1 file data source, supporting flags, flagValues,
# and segments in JSON or YAML format.
#
class FileDataSourceV2
class FileDataSource
include LaunchDarkly::Interfaces::DataSystem::Initializer
include LaunchDarkly::Interfaces::DataSystem::Synchronizer

Expand Down Expand Up @@ -64,7 +64,7 @@ def initialize(logger, paths:, poll_interval: 1)
# @return [String]
#
def name
'FileDataV2'
'FileData'
end

#
Expand All @@ -82,7 +82,7 @@ def fetch(selector_store)
begin
@lock.synchronize do
if @closed
next LaunchDarkly::Result.fail('FileDataV2 source has been closed')
next LaunchDarkly::Result.fail('FileData source has been closed')
end

load_result = load_all_to_changeset
Expand Down Expand Up @@ -377,7 +377,7 @@ def stop
if @@have_listen
start_listener_with_listen_gem(resolved_paths)
else
FileDataSourcePollerV2.new(resolved_paths, @poll_interval, method(:on_file_change), @logger)
FileDataSourcePoller.new(resolved_paths, @poll_interval, method(:on_file_change), @logger)
end
end

Expand All @@ -403,9 +403,9 @@ def stop
end

#
# Used internally by FileDataSourceV2 to track data file changes if the 'listen' gem is not available.
# Used internally by FileDataSource to track data file changes if the 'listen' gem is not available.
#
class FileDataSourcePollerV2
class FileDataSourcePoller
#
# Initialize the file data poller.
#
Expand Down Expand Up @@ -450,11 +450,11 @@ def initialize(resolved_paths, interval, on_change_callback, logger)
last_times = new_times
@on_change.call if changed
rescue => e
Impl::Util.log_exception(@logger, "Unexpected exception in FileDataSourcePollerV2", e)
Impl::Util.log_exception(@logger, "Unexpected exception in FileDataSourcePoller", e)
end
end
end
@thread.name = "LD/FileDataSourceV2"
@thread.name = "LD/FileDataSource"
end

def stop
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ module Impl
module Integrations
module TestData
#
# Internal implementation of both Initializer and Synchronizer protocols for TestDataV2.
# Internal implementation of both Initializer and Synchronizer protocols for TestData.
#
# This component bridges the test data management in TestDataV2 with the FDv2 protocol
# This component bridges the test data management in TestData with the FDv2 protocol
# interfaces. Each instance implements both Initializer and Synchronizer protocols
# and receives change notifications for dynamic updates.
#
class TestDataSourceV2
class TestDataSource
include LaunchDarkly::Interfaces::DataSystem::Initializer
include LaunchDarkly::Interfaces::DataSystem::Synchronizer

# @api private
#
# @param test_data [LaunchDarkly::Integrations::TestDataV2] the test data instance
# @param test_data [LaunchDarkly::Integrations::TestData] the test data instance
#
def initialize(test_data)
@test_data = test_data
Expand All @@ -36,7 +36,7 @@ def initialize(test_data)
# @return [String]
#
def name
'TestDataV2'
'TestData'
end

#
Expand Down Expand Up @@ -131,7 +131,7 @@ def stop
end

#
# Called by TestDataV2 when a flag is updated.
# Called by TestData when a flag is updated.
#
# This method converts the flag update into an FDv2 changeset and
# queues it for delivery through the sync() generator.
Expand Down Expand Up @@ -187,7 +187,7 @@ def upsert_flag(flag_data)
end

#
# Called by TestDataV2 when a segment is updated.
# Called by TestData when a segment is updated.
#
# This method converts the segment update into an FDv2 changeset and
# queues it for delivery through the sync() generator.
Expand Down Expand Up @@ -251,7 +251,7 @@ def upsert_segment(segment_data)
begin
@lock.synchronize do
if @closed
next LaunchDarkly::Result.fail('TestDataV2 source has been closed')
next LaunchDarkly::Result.fail('TestData source has been closed')
end

init_data, version = yield
Expand Down
2 changes: 1 addition & 1 deletion lib/ldclient-rb/integrations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
require "ldclient-rb/integrations/dynamodb"
require "ldclient-rb/integrations/file_data"
require "ldclient-rb/integrations/redis"
require "ldclient-rb/integrations/test_data_v2"
require "ldclient-rb/integrations/test_data"
require "ldclient-rb/integrations/util/persistent_data_store_wrapper"
2 changes: 1 addition & 1 deletion lib/ldclient-rb/integrations/dynamodb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module DynamoDB
#
# @example Configuring the feature store
# store = LaunchDarkly::Integrations::DynamoDB::new_feature_store("my-table-name")
# config = LaunchDarkly::Config.new(data_system_config: LaunchDarkly::DataSystem.persistent_store(store).build)
# config = LaunchDarkly::Config.new(data_system: LaunchDarkly::DataSystem.persistent_store(store).build)
# client = LaunchDarkly::LDClient.new(my_sdk_key, config)
#
# Note that the specified table must already exist in DynamoDB. It must have a partition key called
Expand Down
Loading
Loading