Repository navigation
Conversation
… default Co-Authored-By: Bee Klimt <bklimt@launchdarkly.com>
Contributor
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
…y timer is pending Co-Authored-By: Bee Klimt <bklimt@launchdarkly.com>
This was referenced Oct 19, 2026
Draft
Draft
Draft
Draft
beekld
marked this pull request as ready for review
October 19, 2026 19:57
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This brings the server SDK FDv1 fallback directive in line with the updated spec (DATASYSTEM v2 1.6 / CSFDV2 8.3, sdk-specs#251): a fallback is never indefinite. Part of SDK-2982 / SDK-2935.
Before this change,
X-LD-FD-Fallback-TTL/goodbye.protocolFallbackTTLwere used verbatim, so0meant "stay on FDv1 forever":ScheduleFDv2RetryLockedreturned early. There was no upper bound, and the 1h default for a missing TTL had no jitter.FDv1FallbackDirectivenow matches the client SDK's API (libs/client-sdk/src/data_sources/fdv2/fdv2_source_result.*):ParseTtland thettl = kDefaultTtlmember default are removed. Both are internal, not public API.FDv2DataSystem::ScheduleFDv2RetryLockednow always schedules FDv2 recovery. It already ran when no FDv1 synchronizer was configured.Tests:
fdv2_source_result_test.cpp, mirroring the client tests.ttl{0}to mean "no retry" now use a 1h TTL. They drain ready handlers (RunReadyHandlers, anioc.poll()loop) instead ofioc.run(), which would now wait on the pending recovery timer.The client SDK isn't touched because it already follows these semantics. The Windows jobs fail on
maintoo, because Chocolatey can't findboost-msvc-14.31.87.0.Link to Devin session: https://app.devin.ai/sessions/a7de2991e66545b6aab5484f7a36088b
Open in Devin Desktop: https://app.devin.ai/desktop/session/a7de2991e66545b6aab5484f7a36088b?variant=devin
Requested by: @beekld
Note
Overview
Aligns the server SDK FDv1 fallback directive with the updated FDv2 spec: fallback is never indefinite, service TTLs are bounded, and the default retry delay is jittered.
FDv1FallbackDirectivemoves TTL construction intofdv2_source_result.cppwithDefaultTtl()(1h minus uniform jitter in[0, 30min]),FromServiceTtl(seconds)(uses values in(0, 1h]as-is; otherwise jittered default), andFromServiceTtl(string_view)forX-LD-FD-Fallback-TTL. InlineParseTtland the struct’s implicit default TTL are removed.FDv2 polling, streaming, and goodbye paths now build directives through those factories instead of ad hoc parsing.
FDv2DataSystem::ScheduleFDv2RetryLockedalways schedules FDv2 recovery (the TTL=0 early return is gone), so even without an FDv1 adapter the SDK will retry FDv2 after the directive expires.Tests add
fdv2_source_result_test.cpp, cover out-of-range/malformed TTLs, assert recovery when no FDv1 synchronizer is configured, and useRunReadyHandlerswhere tests must not block on the recovery timer.Reviewed by Cursor Bugbot for commit f0602e0. Bugbot is set up for automated code reviews on this repo. Configure here.