Skip to content

feat: Add flag overrides to the contract test service - #454

Draft
kinyoklion wants to merge 1 commit into
rlamb/overrides-ruby-file-sourcefrom
rlamb/overrides-ruby-contract-tests
Draft

kinyoklion wants to merge 1 commit into
rlamb/overrides-ruby-file-sourcefrom
rlamb/overrides-ruby-contract-tests

Conversation

@kinyoklion

@kinyoklion kinyoklion commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Summary

This PR is stacked on #453 because the test service configures the file-based override source that PR adds.

The contract test service now advertises the flag-overrides capability and accepts the overrides block of the SDK configuration described in the test harness service specification. filePaths, duplicateKeysHandling, changeDetection, and pollIntervalMs map to the options of LaunchDarkly::Integrations::FileData.override_source, which is set on the FDv2 data system builder. An overrides block without a dataSystem block is an error, as in the Go reference service.

The listen gem joins the contract test bundle so that the harness's watching change detection tests can run. The service port can be set with the PORT environment variable and still defaults to 9000, so the existing Makefile and CI steps are unchanged.

Verification against the prebuilt harness (sdk-test-harness branch rlamb/sdk-2657/flag-overrides-tests at 9ad082c, flag-overrides capability): -run 'flag overrides' ran 38 tests with 0 failures, and the full suite with no filter ran 4733 tests with 0 failures (13 skipped by pre-existing capability and long-running gates). The first run of the watching mode tests failed because the watcher relied on listen, which could not scan the system temporary directory where the harness writes its files; the watcher change in #449 corrects that, and both runs above were made with it in place.

The existing FDv1 and FDv2 file data sources keep their current behavior. This series does not change them; the override feature is additive.

The test service advertises the flag-overrides capability and accepts the
overrides block of the SDK configuration: filePaths, duplicateKeysHandling,
changeDetection, and pollIntervalMs map to the options of
LaunchDarkly::Integrations::FileData.override_source on the FDv2 data
system builder. Overrides without a data system configuration are an
error. The listen gem joins the contract test bundle so that the watching
change detection mode can run. The service port can be set with the PORT
environment variable and still defaults to 9000.
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-ruby-file-source branch from 605d0ab to 5bda436 Compare September 28, 2026 20:36
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-ruby-contract-tests branch from 63dd6c6 to 24a8d56 Compare September 28, 2026 20:36

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant