Skip to content

feat: Add flag overrides to the contract test services - #530

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

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

Conversation

@kinyoklion

@kinyoklion kinyoklion commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Summary

This is the last step of the flag overrides port described by the OVERRIDE specification. It is based on the file source branch because the phases are stacked; retarget to feat/overrides once that branch merges.

Both contract test services (the Flask service for LDClient and the aiohttp service for AsyncLDClient) advertise the flag-overrides capability and accept the overrides object in the SDK configuration as the test harness service specification describes: filePaths (required, in precedence order) and the optional duplicateKeysHandling, changeDetection, and pollIntervalMs properties. The values configure a FileOverrideSourceBuilder on the FDv2 data system through ConfigBuilder.overrides(...) or AsyncDataSystemConfig.override_source. An overrides object without a dataSystem configuration is rejected with an error, because overrides are an option of the FDv2 data system only.

Verification with the prebuilt harness from sdk-test-harness branch rlamb/sdk-2657/flag-overrides-tests (v3.2.0-alpha.10):

  • Sync service: -run 'flag overrides' 38 ran, all passed; full suite 4809 total, 15 skipped, 4794 ran, all passed.
  • Async service: -run 'flag overrides' 38 ran, all passed; full suite 4807 total, 16 skipped, 4791 ran, all passed.

The 15 tests skipped by the overrides runs are the other top-level suites excluded by the filter. The tests skipped in the full runs are those for capabilities the services do not advertise (strongly-typed, tls:verify-peer, service-endpoints, user-type, track-hooks, wrapper, and on the async service hook-environment-id), the long-running tests, and the persistent data store tests, all of which were skipped before this change too.

Both contract test services advertise the flag-overrides capability and
accept the overrides object in the SDK configuration: filePaths, and the
optional duplicateKeysHandling, changeDetection, and pollIntervalMs
properties, which configure the file-based override source on the FDv2 data
system. An overrides object without a data system configuration is rejected,
because overrides are an option of the FDv2 data system only.
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