feat: Add FDv2 data system support to NodeClient#1775
Conversation
|
@launchdarkly/js-client-sdk-common size report |
|
@launchdarkly/js-sdk-common size report |
|
@launchdarkly/js-client-sdk size report |
|
@launchdarkly/browser size report |
|
@cursor review |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 14bd7e4. Configure here.
2c4d81c to
65b044a
Compare
fix: Restore FDv2 connection mode when an offline transition fails fix: Await in-flight FDv2 transition on duplicate-mode setConnectionMode
65b044a to
c4aa363
Compare
SDK-2468
Note
Medium Risk
Touches core flag data path and connection/offline/event-sending behavior when FDv2 is enabled; FDv1 path is largely preserved but shared connection-mode APIs changed implementation.
Overview
Adds FDv2 to the Node client when
dataSystemis set: the data manager factory wirescreateFDv2DataManagerBase(desktop defaults/transition table) instead ofNodeDataManager, withbuildQueryParamsfor client-side ID (auth/h) and empty params plus hash warnings in mobile key mode.Connection mode is tracked on
NodeClientfor both FDv1 and FDv2. FDv2setConnectionModevalidates modes, no-ops aftercloseor when unchanged, serializes concurrent transitions (flush before offline, then event sending + data manager), and keeps the queue usable after a failed flush.getConnectionMode/isOfflineread the cached mode rather than the FDv1 data manager.CI runs FDv2 contract tests (harness
v3.1.1-alpha.6) against the same long-lived test service (stop_service: 'false'on FDv1), with an FDv2 suppression list including one new skipped wrapper test. Unit coverage lives inNodeClientFDv2.test.ts.Reviewed by Cursor Bugbot for commit f4a4c39. Bugbot is set up for automated code reviews on this repo. Configure here.