Skip to content

chore: Make the FDv2 feature-store client wrappers internal - #508

Merged
jsonbailey merged 3 commits into
mainfrom
jb/sdk-60/sync-fdv2-wrapper-relocation
Aug 28, 2026
Merged

chore: Make the FDv2 feature-store client wrappers internal#508
jsonbailey merged 3 commits into
mainfrom
jb/sdk-60/sync-fdv2-wrapper-relocation

Conversation

@jsonbailey

@jsonbailey jsonbailey commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

What

Two related tidy-ups to the FDv2 store-client wrappers — internal helpers in ldclient/impl/datasystem/:

  1. Relocate the sync wrapper. Move FeatureStoreClientWrapper from fdv2_common.py into fdv2.py. fdv2_common.py is for logic shared between sync FDv2 and async AsyncFDv2 (via _FDv2Base); this wrapper is sync-only (only fdv2.py uses it — the async side has its own). Mirrors the earlier FDv1 wrapper move (5948b78).

  2. Make both FDv2 wrappers private. Rename FeatureStoreClientWrapper_FeatureStoreClientWrapper (sync) and AsyncFeatureStoreClientWrapper_AsyncFeatureStoreClientWrapper (async), and drop both from their modules' __all__. They're internal implementation helpers, matching the FDv1 equivalent (_FeatureStoreClientWrapper, already private). Internal importers (test_cache_lifecycle.py, test_async_fdv2.py) updated.

Pure internal cleanup — no behavior change, no public API change (everything is under ldclient.impl).

Validation

  • mypy / isort / pycodestyle clean.
  • test_fdv2_datasystem.py, test_fdv2_persistence.py, test_cache_lifecycle.py, test_async_fdv2.py — 84 passed.

Note

Overview
Internal cleanup for FDv2 persistent-store wrappers under ldclient.impl.datasystem: no intended behavior or public API change.

The sync FeatureStoreClientWrapper moves out of shared fdv2_common.py into fdv2.py, since only the sync coordinator uses it (async keeps its own wrapper in async_fdv2.py). Both sync and async wrappers are renamed to _FeatureStoreClientWrapper and _AsyncFeatureStoreClientWrapper, matching the existing FDv1 private helper, and they are removed from module __all__. Tests that construct these helpers directly are updated to the new names and import paths.

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

@jsonbailey
jsonbailey requested a review from a team as a code owner August 28, 2026 15:34
@jsonbailey jsonbailey changed the title refactor: Move the sync FeatureStoreClientWrapper into the FDv2 data system chore: Move the sync FeatureStoreClientWrapper into the FDv2 data system Aug 28, 2026
@jsonbailey jsonbailey changed the title chore: Move the sync FeatureStoreClientWrapper into the FDv2 data system chore: Make the FDv2 feature-store client wrappers internal Aug 28, 2026
…system

FeatureStoreClientWrapper lived in fdv2_common.py, which is meant for logic
shared between the sync FDv2 and the async AsyncFDv2 (via _FDv2Base). This
wrapper is sync-only — only fdv2.py uses it; the async side has its own
wrapper in async_fdv2.py. Move it into fdv2.py, next to its sole user, and
drop the now-unused imports and __all__ entry from fdv2_common.py. This
mirrors the earlier FDv1 wrapper move (5948b78). Pure relocation, no
behavior change.
Rename FeatureStoreClientWrapper -> _FeatureStoreClientWrapper (sync) and
AsyncFeatureStoreClientWrapper -> _AsyncFeatureStoreClientWrapper (async),
and drop both from their modules' __all__. They are internal helpers in
ldclient.impl.datasystem, matching the FDv1 wrapper's private convention.
… gate

The relocation removed the log import (only the moved wrapper used it on
the pre-#506 main), but #506's warm-start guard in _FDv2Base.data_availability
uses log.error. After rebasing onto current main the guard is present, so
the import must stay.
@jsonbailey
jsonbailey force-pushed the jb/sdk-60/sync-fdv2-wrapper-relocation branch from 75dd5aa to 81f5933 Compare August 28, 2026 16:46
@jsonbailey
jsonbailey merged commit e772499 into main Aug 28, 2026
16 checks passed
@jsonbailey
jsonbailey deleted the jb/sdk-60/sync-fdv2-wrapper-relocation branch August 28, 2026 16:55
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