feat: add file-based override source (ldoverrides)#415
Draft
kinyoklion wants to merge 4 commits into
Draft
Conversation
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.
Reopens #412, which GitHub auto-marked as merged when its branch was merged into the old integration branch it was based on. The branch is rebuilt as clean cherry-picks onto
rlamb/overrides-base, the junction of the two prerequisite stacks (file machinery #405–#407, override system #404/#408–#411); the diff is identical in content to #412 plus its follow-up lifecycle comment. Review discussion lives on #412.Adds the public
ldoverridespackage withFileSource(), the file-based override source defined by the OVERRIDE spec, completing the user-facing feature:flags,flagValues,segments; JSON and YAML), withflagValuesentries expanded into full flag definitions. Multiple files merge in configured order under the configured duplicate-key handling.internal/filedatamachinery: every reload is serialized, debounced, all-or-nothing with last-good retention, retried after failures, and skipped when contents are unchanged. Missing files at startup just mean no overrides until they appear.ldfilewatch/fsnotify), with an optional stat-basedPollmode for filesystems where notifications are unreliable; both may run together. Poll interval defaults to one second, clamped to a one-second minimum.Package tests cover initial load, YAML, multi-file ordering and duplicates, missing-file startup and recovery, watch and poll reload modes, malformed-edit retention and recovery, interval clamping, and close semantics; a client-level test drives hot add/change/remove end-to-end on a running uninitialized client.
SDK-2656