-
Notifications
You must be signed in to change notification settings - Fork 0
Migrate Javascript SDK to use V2 Randomization Endpoint #10
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
Conversation
- also add "-dto" suffix to dto file names - remove duplicate rules dto file
rm -rf $(testDataDir) | ||
mkdir -p $(testDataDir) | ||
gsutil cp gs://sdk-test-data/rac-experiments.json $(testDataDir) | ||
gsutil cp gs://sdk-test-data/rac-experiments-v2.json $(testDataDir) |
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.
Uses the new test RAC uploaded to S3.
percentExposure: 1, | ||
enabled: true, | ||
subjectShards: 100, | ||
variations: mockVariations, |
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.
variations
and percentExposure
no longer live at the top level, they live on individual allocations.
end: 67, | ||
const experimentName = 'mock-experiment'; | ||
|
||
const mockExperimentConfig = { |
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.
Added this to DRY up this file a bit.
also add comments to getAssignment function
078b3c1
to
a482d5b
Compare
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.
Looks good, only minor comments
- matchesAnyRule -> findMatchingRule - remove redundant rule length check
Co-authored-by: Eric Petzel <epetzel@gmail.com>
Fixes Eppo-exp/eppo#4711
Description
Updated the
getAssignment
logic to use the allocation (variations + exposure) for the matched targeting rule. The API response inserts a default rule that always matches if the experiment does not have any rules.See the above design doc for details.
Also made some changes to code organization:
-dto
and grouped them in adto
folder.client
.How has this been tested?