feat: Add flag overrides to the contract test services - #530
Draft
kinyoklion wants to merge 1 commit into
Draft
kinyoklion wants to merge 1 commit into
kinyoklion wants to merge 1 commit into
Conversation
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.
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.
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/overridesonce that branch merges.Both contract test services (the Flask service for
LDClientand the aiohttp service forAsyncLDClient) advertise theflag-overridescapability and accept theoverridesobject in the SDK configuration as the test harness service specification describes:filePaths(required, in precedence order) and the optionalduplicateKeysHandling,changeDetection, andpollIntervalMsproperties. The values configure aFileOverrideSourceBuilderon the FDv2 data system throughConfigBuilder.overrides(...)orAsyncDataSystemConfig.override_source. Anoverridesobject without adataSystemconfiguration 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):-run 'flag overrides'38 ran, all passed; full suite 4809 total, 15 skipped, 4794 ran, all passed.-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 servicehook-environment-id), the long-running tests, and the persistent data store tests, all of which were skipped before this change too.