feat(testservice): support file-based flag overrides - #416
kinyoklion wants to merge 4 commits into
Conversation
a8e7b3f to
d908177
Compare
f5ddaf5 to
669cd50
Compare
abeb245 to
7657c3e
Compare
7657c3e to
3b324a7
Compare
e53b4d2 to
2f0e71b
Compare
3b324a7 to
079665a
Compare
2f0e71b to
5e46a28
Compare
079665a to
04cb0c1
Compare
5e46a28 to
393b4bc
Compare
04cb0c1 to
f0853ba
Compare
393b4bc to
595f835
Compare
f0853ba to
5931e29
Compare
595f835 to
d99d55c
Compare
5931e29 to
42cfae2
Compare
d99d55c to
3af8e81
Compare
Watching and polling were two independent switches, which allowed both on and both off. They are alternatives, so the builder now takes one ChangeDetection mode. Polling is the default because it does not depend on notification delivery. Build rejects an unrecognized mode.
(cherry picked from commit 267384d)
42cfae2 to
393312c
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 393312c. Configure here.
| FilePaths []string `json:"filePaths"` | ||
| DuplicateKeysHandling *string `json:"duplicateKeysHandling,omitempty"` | ||
| ChangeDetection *string `json:"changeDetection,omitempty"` | ||
| PollIntervalMS *int `json:"pollIntervalMs,omitempty"` |
There was a problem hiding this comment.
Watch/poll harness fields ignored
Medium Severity
The test service overrides block reads changeDetection, but the harness contract cited here (sdk-test-harness#374) sends watch and poll booleans. Those fields are dropped, so every client stays on the Polling default. Watching-mode harness tests still pass because polling also reloads on file changes, so the suite never actually runs Watching.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 393312c. Configure here.


Reopens #413 (auto-marked merged for the same base-branch reason as #412; see #415). Rebuilt as a cherry-pick stacked on #415 so the diff shows only the test service changes. Review discussion lives on #413.
Wires the contract-test service up to the flag-overrides feature so the harness suite (launchdarkly/sdk-test-harness#374) can run against this SDK: advertises the
flag-overridescapability, mirrors the harness'soverridesconfig block in the test service'sservicedef, and maps it ontoldoverrides.FileSource()on the data system builder; requesting overrides without a data system configuration is an error, since overrides are an FDv2 feature. The test service module pins the same override-aware pseudo-versions of go-sdk-common, go-sdk-events, and go-server-sdk-evaluation as the SDK.Verified locally against the harness branch with the updated override tests (which expect the
overrideAffectedreason indicator and summary counter marker): the flag-overrides suite passes (32 tests ran, 0 failures, across static configuration, uninitialized client, summary events, transitive marking, multiple files, YAML, and watching and polling hot reload), and the full harness run is green (4961 tests total, 4949 ran, 12 skipped, 0 failures).SDK-2657
Note
Overview
Refactors file-based flag overrides to use a single
ChangeDetectionmode (PollingvsWatching) instead of independentWatch/Polltoggles, and defaults to polling (1s) rather than filesystem watches.Buildnow rejects unknown detection modes;PollIntervalapplies only in polling mode.The contract test service advertises
flag-overrides, accepts anoverridesconfig block (paths, duplicate-key handling, change detection, poll interval), wires it toldoverrides.FileSource()on the FDv2 data system, and errors if overrides are requested without a data system. The testservice module bumps Go and pins override-related dependencies.Reviewed by Cursor Bugbot for commit 393312c. Bugbot is set up for automated code reviews on this repo. Configure here.