-
Notifications
You must be signed in to change notification settings - Fork 19
[FSSDK-11551] Adding project config support for holdouts to go-sdk #415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for holdouts in the Go SDK by establishing flag dependencies on holdouts through the ProjectConfig. The change enables features to track and reference holdout IDs for proper experiment isolation and traffic allocation.
- Adds
HoldoutIDs
field to the Feature struct and related entities - Updates the feature mapping logic to populate holdout IDs from datafile
- Includes comprehensive test coverage for the new holdout functionality
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
pkg/entities/feature.go | Adds HoldoutIDs field to the Feature struct |
pkg/config/datafileprojectconfig/entities/entities.go | Adds HoldoutIDs field to the FeatureFlag struct with JSON mapping |
pkg/config/datafileprojectconfig/mappers/feature.go | Updates MapFeatures function to populate holdout IDs from datafile |
pkg/config/datafileprojectconfig/mappers/feature_test.go | Adds test coverage for holdout ID mapping functionality |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
I added holdouts model. I followed go & go-sdk idiomatic pattern so I created a new holdouts.go file and grouped holdout fields inside HoldoutMaps struct. go-sdk does similarly for other parts of sdk. Let me know if that is too much different from other sdk-s and we prefer to have everything inside project config. We could do that, just that then go-sdk will have this different that rest of the sdk because the rest of the sdk favors golang patterns specific to go versus consistency across sdk-s. Here is comparison to Js:
One unrelated files is included (experiment bucketer service test) - just fixed formatting |
2baa839
to
88e9b1a
Compare
Update ProjectConfig to establish the flag's dependency on holdouts.
Jira: https://jira.sso.episerver.net/browse/FSSDK-11551