feat: add override source configuration API and FDv2 wiring#409
Draft
kinyoklion wants to merge 2 commits into
Draft
feat: add override source configuration API and FDv2 wiring#409kinyoklion wants to merge 2 commits into
kinyoklion wants to merge 2 commits into
Conversation
9f348dc to
fd1ad82
Compare
…override-source-api
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.
Connects the override layer to the outside world:
subsystems:OverrideSource(implemented by sources;Start(sink)/Close) andOverrideSink(implemented by the SDK;SetOverridestakes a full replacement snapshot of flag/segment collections and the SDK applies the override marker itself). Both are new interfaces — nothing is added to any existing exported interface.OverrideSourcefield onsubsystems.DataSystemConfigurationand anOverrides(...)builder method onldcomponents.DataSystemConfigurationBuilder, so the eventual usage isldcomponents.DataSystem().Default().Overrides(...). A single source, not a list: combining multiple documents (and the duplicate-key policy that implies) is the source's job, per the spec's multi-file semantics.Store()(all three client read paths — evaluation, prerequisites/segments, all-flags — go through that one accessor), starts the source synchronously before the run loop so a synchronously-loading source has its overrides in place before the client evaluates anything, and closes it first onStop(). With no source configured,Store()returns the raw store and nothing about the system changes. The relay data destination and persistence keep seeing the raw store, and data availability is untouched by overrides. Overrides are inert in offline/disabled mode.dataSysteminterface gainsHasFlagOverride/HasOverridesprobes (constant false for FDv1) — these are what the not-initialized short-circuit will consult in the next PR; nothing calls them yet.internal/sharedtestgains a programmaticTestOverrideSource, which is both the test vehicle here and the reference implementation of the seam.FDv1 behavior is unchanged; overrides are structurally FDv2-only since the configuration hangs off
Config.DataSystem.Based on #408 (the override layer this wires up).
SDK-2655