Skip to content

Commit 3ea0f33

Browse files
authored
feat: Add FDv2 data system support to NodeClient (#1775)
SDK-2468 <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Touches core flag data plumbing and connection/offline semantics, but FDv1 behavior is preserved behind the existing data manager when `dataSystem` is absent. > > **Overview** > When **`dataSystem`** is configured, **NodeClient** now wires **`createFDv2DataManagerBase`** (desktop defaults, transition table, query params for client-side ID vs mobile) instead of **`NodeDataManager`**, while leaving the FDv1 path unchanged. > > **Connection mode** is tracked on the client (`_connectionMode`). In FDv2, **`setConnectionMode`** validates modes, no-ops after close or on duplicate mode, serializes concurrent transitions (flush before offline, then event sending + data manager), and **`getConnectionMode` / `isOffline`** read that state rather than the FDv1 data manager. > > CI runs **FDv2 contract tests** (harness v3) against the same long-lived test service (`stop_service: 'false'`), with a new suppressions file and harness updates (**mobile**, **`useMobileKey`**, extra capabilities). Unit coverage is added in **`NodeClientFDv2.test.ts`**; **`FDv2ConnectionMode`** is exported from **`LDCommon`**. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 01ac80d. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent b273e89 commit 3ea0f33

7 files changed

Lines changed: 544 additions & 13 deletions

File tree

.github/workflows/node-client.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,13 @@ jobs:
4646
with:
4747
test_service_port: 8000
4848
token: ${{ secrets.GITHUB_TOKEN }}
49+
stop_service: 'false'
4950
extra_params: '--skip-from=${{ github.workspace }}/packages/sdk/node-client/contract-tests/testharness-suppressions.txt'
51+
- name: Run contract tests (FDv2)
52+
uses: launchdarkly/gh-actions/actions/contract-tests@5adb11fd6953e1bc35d9cf1fc1b4374c464e3a8b # contract-tests-v1.3.0
53+
with:
54+
test_service_port: 8000
55+
token: ${{ secrets.GITHUB_TOKEN }}
56+
version: v3
57+
branch: v3
58+
extra_params: '--skip-from=${{ github.workspace }}/packages/sdk/node-client/contract-tests/testharness-suppressions-fdv2.txt'

0 commit comments

Comments
 (0)