Skip to content

feat: Add async FDv2 data system - #486

Draft
jsonbailey wants to merge 2 commits into
jb/sdk-60/async-fdv2-sourcesfrom
jb/sdk-60/async-fdv2-datasystem
Draft

feat: Add async FDv2 data system#486
jsonbailey wants to merge 2 commits into
jb/sdk-60/async-fdv2-sourcesfrom
jb/sdk-60/async-fdv2-datasystem

Conversation

@jsonbailey

@jsonbailey jsonbailey commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

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.

Stacked on #485 — review and merge that PR first. This PR targets
jb/sdk-60/async-fdv2-sources; it will retarget to main once #485 merges.

This is experimental and should not be considered production-ready.

What this PR adds

  • impl/datasystem/async_fdv2.pyAsyncFDv2, the async data system that coordinates
    the async initializers and synchronizers, mirrors the sync FDv2 fallback/recovery
    behavior, and exposes the async data source status and flag tracking.
  • async_client.py wiring:
    • _make_data_system now builds AsyncFDv2 instead of raising NotImplementedError.
    • New _wire_data_source_sessions shares the client's aiohttp session into async data
      source builders so the sources reuse the client's connection pool.
    • __start_up calls the wiring before start when a data system config is present and
      the client is not offline.

Shared refactor

  • impl/datasystem/fdv2_common.py gains fallback_condition and recovery_condition
    as module-level functions, moved out of the sync FDv2 methods so both the sync and
    async data systems share one implementation. Sync fdv2.py now 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

@jsonbailey
jsonbailey force-pushed the jb/sdk-60/async-fdv2-datasystem branch 2 times, most recently from 027941e to b911aa7 Compare August 13, 2026 22:20
@jsonbailey
jsonbailey force-pushed the jb/sdk-60/async-fdv2-datasystem branch from b911aa7 to 35dd8be Compare August 13, 2026 22:32
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