feat: Add async FDv2 data system - #486
Draft
jsonbailey wants to merge 2 commits into
Draft
Conversation
jsonbailey
force-pushed
the
jb/sdk-60/async-fdv2-datasystem
branch
2 times, most recently
from
August 13, 2026 22:20
027941e to
b911aa7
Compare
jsonbailey
force-pushed
the
jb/sdk-60/async-fdv2-datasystem
branch
from
August 13, 2026 22:32
b911aa7 to
35dd8be
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Part of the async Python SDK work (epic SDK-60). This is the second of two stacked PRs
that add async FDv2 support. It is stacked on #485 (async FDv2 data sources) and
adds the async FDv2 data system (coordinator) and wires it into the async client.
This is experimental and should not be considered production-ready.
What this PR adds
impl/datasystem/async_fdv2.py—AsyncFDv2, the async data system that coordinatesthe async initializers and synchronizers, mirrors the sync
FDv2fallback/recoverybehavior, and exposes the async data source status and flag tracking.
async_client.pywiring:_make_data_systemnow buildsAsyncFDv2instead of raisingNotImplementedError._wire_data_source_sessionsshares the client's aiohttp session into async datasource builders so the sources reuse the client's connection pool.
__start_upcalls the wiring before start when a data system config is present andthe client is not offline.
Shared refactor
impl/datasystem/fdv2_common.pygainsfallback_conditionandrecovery_conditionas module-level functions, moved out of the sync
FDv2methods so both the sync andasync data systems share one implementation. Sync
fdv2.pynow calls them.Testing
LD_SKIP_DATABASE_TESTS=1 uv run pytest ldclient/testing/impl/datasystem/— 89 passed.ldclient/testing/test_async_client.py— 21 passed.make lint(mypy, isort, pycodestyle) — clean.Tracked internally: SDK-2870