Repository navigation
Conversation
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)".
|
beekld
marked this pull request as ready for review
October 19, 2026 20:21
kinyoklion
reviewed
Oct 19, 2026
Co-Authored-By: Bee Klimt <bklimt@launchdarkly.com>
kinyoklion
reviewed
Oct 19, 2026
kinyoklion
reviewed
Oct 19, 2026
… directive Co-Authored-By: Bee Klimt <bklimt@launchdarkly.com>
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.
Requirements
Related issues
SDK-2984 (part of SDK-2935). Implements the SDK-2527 spec change (sdk-specs#251, DATASYSTEM v2 1.6 / CSFDV2 8.3). Reference:
FDv1FallbackDirective::DefaultTtl/FromServiceTtlin cpp-sdks, cpp-sdks#631.Describe the solution you've provided
Before this change, a TTL of
0meant "fall back indefinitely". The header andgoodbye.protocolFallbackTTLTTLs were used without validation, the 1 hour default had no jitter, and FDv2 was never retried after the FDv1 fallback synchronizer was engaged.resolveFallbackTtl(fallback_directive.dart): a TTL in (0, 1h] is used as-is. A missing, malformed, zero, negative, or > 1h TTL becomes1h - uniform[0, 1800]s. This covers both thex-ld-fd-fallback-ttlheader andgoodbye.protocolFallbackTTL, which already reach the orchestrator asFDv2SourceResult.fdv1FallbackTtl.FDv2DataSourceOrchestrator._processDirective, whether or not an FDv1 tier is configured. It resolves the TTL, callsSourceManager.engageFdv1Fallback(), and schedules recovery.engageFdv1Fallback()blocks the FDv2 synchronizers and enables the FDv1 slot if there is one. With no FDv1 slot, nothing is available, so the synchronizer loop waits for recovery.SourceManager.restoreFdv2Synchronizers()makes the FDv2 slots available again and blocks FDv1. The active FDv1 run then ends (recover), so FDv1 is closed before the FDv2 synchronizer is created and the two never run together. If the FDv1 tier fails first, the loop waits for the timer instead of halting._DirectiveAction.deferRetryand_pendingRetryDelay; the no-tier case now uses the same path as the FDv1 tier.Duration.zeroas indefinite.Describe alternatives you've considered
I kept the raw TTL as
Duration?through the protocol and source layers and resolved it once in the orchestrator. Validating it in each parser would have meant changing every parser; this way the parsers are unchanged and the rule lives in one place.Additional context
fallbackTtlResolveris injectable on the orchestrator so tests can scale the TTLs down and keep real waits short.Link to Devin session: https://app.devin.ai/sessions/f4e0848a068c4648b778346105ba7792
Open in Devin Desktop: https://app.devin.ai/desktop/session/f4e0848a068c4648b778346105ba7792?variant=devin
Requested by: @beekld