Skip to content

Commit a80eaca

Browse files
authored
fix(server-node): honor x-ld-fd-fallback directive in FDv2 initializer phase (#1342)
1 parent 3812c08 commit a80eaca

18 files changed

Lines changed: 1330 additions & 54 deletions

File tree

packages/sdk/server-node/contract-tests/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ app.get('/', (req: Request, res: Response) => {
4444
'event-gzip',
4545
'optional-event-gzip',
4646
'flag-change-listeners',
47+
'fdv1-fallback',
4748
],
4849
});
4950
});

packages/sdk/server-node/contract-tests/src/sdkClientEntity.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,16 @@ export function makeSdkConfig(options: ServerSDKConfigParams, tag: string): LDOp
160160
cf.dataSystem = {
161161
dataSource: dataSourceOptions,
162162
};
163+
164+
// FDv1Fallback configures the SDK's FDv1 Fallback Synchronizer -- engaged only in
165+
// response to a server-directed FDv1 Fallback Directive, separate from the FDv2
166+
// Primary/Fallback synchronizer chain configured above.
167+
if (options.dataSystem.fdv1Fallback) {
168+
cf.dataSystem.fdv1Fallback = {
169+
baseUri: options.dataSystem.fdv1Fallback.baseUri,
170+
pollInterval: maybeTime(options.dataSystem.fdv1Fallback.pollIntervalMs),
171+
};
172+
}
163173
}
164174

165175
return cf;

0 commit comments

Comments
 (0)