[AI-FSSDK] [FSSDK-12418] Remove experiment type validation from config parsing#443
Open
FarhanAnjum-opti wants to merge 3 commits intomasterfrom
Open
[AI-FSSDK] [FSSDK-12418] Remove experiment type validation from config parsing#443FarhanAnjum-opti wants to merge 3 commits intomasterfrom
FarhanAnjum-opti wants to merge 3 commits intomasterfrom
Conversation
The injectFeatureRolloutVariations function was modifying experiments in experimentIDMap but not updating the copies in feature.FeatureExperiments. This caused the decision service to use experiments without the injected "everyone else" variation, leading to incorrect bucketing and fallthrough to rollout rules instead of returning the FR experiment decision. When MapFeatures runs, it creates feature.FeatureExperiments by copying experiments from experimentIDMap. Since Go copies struct values, later modifications to experimentIDMap experiments (like appending to TrafficAllocation slice) don't affect the copies in FeatureExperiments. The fix updates both experimentIDMap AND feature.FeatureExperiments to ensure the decision service sees the complete injected variations. This fixes FSC test failures where users were getting rule_key from rollout rules (e.g., "ee_rule_1002") instead of from FR experiments (e.g., "fr_zero_exp").
…Experiments This test ensures that the Feature Rollout injection properly updates both the experimentIDMap and the feature's FeatureExperiments slice, preventing regression of the bug where only experimentIDMap was updated.
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
Removes experiment type validation from config parsing to ensure forward compatibility. Previously, unknown experiment type values caused a fatal error that rejected the entire datafile, which would break existing SDK versions when new experiment types are added in the future.
Changes
Jira Ticket
FSSDK-12418