Skip to content

Conversation

@jsonbailey
Copy link
Contributor

@jsonbailey jsonbailey commented Dec 9, 2025

Note

Replaces legacy data-source/store wiring in LDClient with FDv1 DataSystem and updates client to use its store, status providers, and broadcasters.

  • DataSystem (impl/data_system/fdv1.rb):
    • Add FDv1 implementation wiring v1 data sources/stores behind a unified interface.
    • Wrap original config.feature_store in FeatureStoreClientWrapper (avoid nested wrapping on postfork) and expose status providers/broadcasters/update sinks.
    • Manage processor lifecycle (start/stop), executor, and compute data availability/target; log when streaming is disabled (polling).
  • Core (ldclient.rb):
    • Initialize and use FDv1 for store access (@data_system.store), flag change broadcaster, and data/data-store status providers.
    • Simplify startup/shutdown and postfork by delegating to @data_system; remove legacy data source plumbing.
    • Update initialized? to compare data_availability vs target_availability.
    • Adjust SDK key nil validation to allow LDD or custom data source without events.
    • Update flag evaluation and all_flags_state to read from @data_system.store.
  • Tests (spec/impl/data_system/fdv1_spec.rb):
    • Add comprehensive specs for store wrapping behavior, processor selection (streaming/polling/offline/LDD/custom), lifecycle, availability states, and diagnostic accumulator propagation.

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

@jsonbailey jsonbailey requested a review from a team as a code owner December 9, 2025 18:50
# @return [Array<EvaluationDetail, [LaunchDarkly::Impl::Model::FeatureFlag, nil], [String, nil]>]
#
def variation_with_flag(key, context, default)
private def variation_with_flag(key, context, default)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The file used a mix of per method private and all methods after the declaration on line 717 of the original file. Moving to defining per method.

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.

2 participants