Skip to content

Conversation

@tanderson-ld
Copy link
Contributor

@tanderson-ld tanderson-ld commented Apr 24, 2025

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions
    Will validate on holding branch later.

Related issues

SDK-1179

Describe the solution you've provided

Adds FDv1 fallback error type. FDv2 datasources now report that error type if they see the fallback header from the FDv2 endpoints.

Updates FDv2 polling datasource to support being constructed in a FDv1 to FDv2 conversion mode. In that mode, the response from an FDv1 endpoint will be converted to an FDv2 payload and passed through the FDv2 payloadProcessor.

CompositeDataSource now supports an FDv1 fallback synchronizer list. If any datasource reports the FDv1 fallback error, the CompositeDataSource switches to use the fallback synchronizer list.

This PR also contains tweaks to get the holding branch working with the latest contract tests that got some tweaks during recent integration testing.

@tanderson-ld tanderson-ld requested a review from a team as a code owner April 24, 2025 22:25
@tanderson-ld
Copy link
Contributor Author

Added @keelerm84 as he is privy to the expected behavior.

@tanderson-ld tanderson-ld requested a review from keelerm84 April 24, 2025 22:28
"@launchdarkly/js-server-sdk-common": "2.10.0",
"https-proxy-agent": "^5.0.1",
"launchdarkly-eventsource": "2.0.3"
"launchdarkly-eventsource": "2.2.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reviewers: This adds support for getting header from event source.

const payload = data.payloads[0];

switch (payload?.code) {
switch (payload?.intentCode) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reviewers: Tweak following integration testing with FD team.

],
},
},
]);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reviewers: id and target don't matter for this case since it is a xfer full.

};

const DEFAULT_POLL_INTERVAL = 30;
export const DEFAULT_POLL_INTERVAL = 30;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reviewers: Used by LDClientImpl for FDv1 fallback polling interval.

@tanderson-ld tanderson-ld merged commit 063c778 into ta/fdv2-temporary-holding Apr 29, 2025
3 checks passed
@tanderson-ld tanderson-ld deleted the ta/SDK-1179/fdv1-fallback branch April 29, 2025 14:53
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.

3 participants