-
Notifications
You must be signed in to change notification settings - Fork 45
chore: Initial structure and implementation of FDv2 datasystem #356
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
Conversation
| Builder = Callable[[], T] | ||
|
|
||
|
|
||
| @dataclass(frozen=True) |
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.
This was moved.
| assert valid.change_set.intent_code == IntentCode.TRANSFER_FULL | ||
|
|
||
|
|
||
| # def test_swallows_goodbye(events): # pylint: disable=redefined-outer-name |
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.
These tests don't really make sense in a polling context as they aren't sent then.
| self._data_system = FDv1(self._config) | ||
| # Provide flag evaluation function for value-change tracking | ||
| self._data_system.set_flag_value_eval_fn( | ||
| self._data_system.set_flag_value_eval_fn( # type: ignore |
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.
These ignores are because the data system protocol doesn't expose these methods, but both fdv1 and fdv2 implementations do. So we have to tell the linter to trust us in a few places.
| # Wait for all threads to complete | ||
| for thread in self._threads: | ||
| if thread.is_alive(): | ||
| thread.join(timeout=5.0) # 5 second timeout |
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.
Envious of join with timeout. Do we need to log anything in the timeout case? (Though the is_alive thing really feels questionable, so maybe not.)
There is still a lot of work to be done to get this functional, but this gives us some shape to the remaining tasks.
Note
Introduce experimental FDv2 data system (store, polling/streaming, status) with new DataSystemConfig and integrate selection into client; update protocols/APIs and tests.
FDv2data system; selectsFDv1whenconfig.datasystem_configis absent, otherwiseFDv2(honorsoffline).data_availability.at_least(DataAvailability.CACHED).data_store_status_provider,data_source_status_provider,flag_tracker,store) and passes diagnostic accumulator.ldclient.impl.datasystem.fdv2.FDv2with initializer/synchronizer orchestration, fallback/recovery logic, availability, and threading.Storefor FDv2 handling apply/commit, selector, dependency tracking, and flag change notifications.datasourcev2.status.DataSourceStatusProviderImpl.datasourcev2.pollinganddatasourcev2.streaming: exposenameproperty; implement sync/fetch behaviors and error handling.InitializerandSynchronizernow requirenameproperty; add toStreamingDataSourceand test data source.DataSystemConfigdataclass added toldclient.configplusdatasystem_configfield onConfig.impl/datasystem/config.pybuilder now producesDataSystemConfig; supports default/streaming/polling/custom setups.data_availabilitycomputed dynamically based on processor/store state.nameproperty, expanded error cases);Written by Cursor Bugbot for commit a5d7c72. This will update automatically on new commits. Configure here.