Skip to content

feat: Add FDv2 support to the test data source - #200

Open
beekld wants to merge 1 commit into
mainfrom
bklimt/SDK-2944/fdv2-test-data-source
Open

feat: Add FDv2 support to the test data source#200
beekld wants to merge 1 commit into
mainfrom
bklimt/SDK-2944/fdv2-test-data-source

Conversation

@beekld

@beekld beekld commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

The FDv1 TestData source does not work with the FDv2 data system, so tests that rely on it cannot run against FDv2. This teaches the same TestData to also act as an FDv2 synchronizer, so it can be passed to ConfigBuilder::data_source for FDv1 or to DataSystemBuilder::synchronizer for FDv2.

Under FDv2 it delivers a full payload of the current flags on first read, then a partial for each later update. The FDv2 data system is pull-based, so the source hands change sets to it rather than writing the store directly. As a result, updates propagate asynchronously, unlike FDv1's synchronous update().


Note

Overview
TestData now works with the FDv2 data system in addition to the existing FDv1 data_source path. Wire it via DataSystemBuilder::synchronizer instead of ConfigBuilder::data_source.

The implementation adds an FDv2 synchronizer that returns a full change set on the first pull, registers an mpsc channel for live updates, and broadcasts partial change sets when flags/segments change through update, use_preconfigured_flag, or use_preconfigured_segment. FDv1 behavior (direct store upserts) is unchanged. Docs note that FDv2 updates are asynchronous.

ItemChange gains Clone so partial sets can be fan-out to multiple synchronizers. New client and test_data tests cover end-to-end FDv2 evaluation and full-then-partial synchronizer events.

Reviewed by Cursor Bugbot for commit eca1ea1. Bugbot is set up for automated code reviews on this repo. Configure here.

@beekld
beekld marked this pull request as ready for review September 10, 2026 19:58
@beekld
beekld requested a review from a team as a code owner September 10, 2026 19:58
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.

1 participant