[AI-FSSDK] [FSSDK-12760] add localHoldouts to datafile for backward compatibility#633
Open
jaeopt wants to merge 1 commit into
Open
[AI-FSSDK] [FSSDK-12760] add localHoldouts to datafile for backward compatibility#633jaeopt wants to merge 1 commit into
jaeopt wants to merge 1 commit into
Conversation
Contributor
Author
|
I reviewed and it looks good to me. |
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
Adds support for the new top-level
localHoldoutsdatafile section so older SDKs (Gen 1/Gen 2) that don't understand local holdouts safely ignore them while Gen 3 SDKs scope holdouts by section membership.Changes
HoldoutConfig— section-aware constructor(globalHoldouts, localHoldouts). Entries inholdoutsare global (anyincludedRulesis stripped); entries inlocalHoldoutsmust carryincludedRules(null/missing → log error + skip; empty list → valid but inert). Legacy single-list constructor preserved as deprecated.DatafileProjectConfig— new 21-arg v4 constructor acceptinglocalHoldoutsseparately. Legacy 20-arg constructor auto-partitions a mixed list by entity-levelincludedRulesfor backward compatibility with existing callers.localHoldoutsarray and pass it through alongsideholdouts.Holdout— docstring updates clarifying that scope comes from the datafile section, notincludedRules.HoldoutConfigTest(8 added, 25 total) plus moved the existing local-holdout entry inholdouts-project-config.jsoninto the newlocalHoldoutssection. All existing parser/DecisionService/UserContext tests continue to pass unchanged.Jira ticket
FSSDK-12760
Reference PRs
Test plan
./gradlew :core-api:test— all suites pass (HoldoutConfigTest: 25/25; all 4 parser tests pass; DecisionServiceTest and OptimizelyUserContextTest pass)./gradlew test— all modules pass