-
Notifications
You must be signed in to change notification settings - Fork 396
Commit 72fecd7
Switch to longs for hash values for percent condition evaluation (#2507)
* Get And condition passing
* Support and.or condition
* Support true condition
* Support false condition, and fix tests
* Use or.and, not the other way around
* Integrate conditional values into evaluate method
* Test handling for multiple conditions
* Clean up logs
* Extract condition evaluation to class for testing
* Namespace condition names
* Iterate over ordered condition list
* Test condition ordering
* Differentiate named conditions
* Document condition types
* Generalize condition eval test and fix styling
* Replace log statement with todo
* Implement evaluate percent condition for RC server-side
* Apply lint fixes
* Add context param to evaluate method
* Add tests for percent condition eval
* Update evaluator tests to use context
* Increase threshold to +/- 500 for percent condition eval tests
to prevent some flaky tests.
* Clean up percentCondition tests a bit and add note on the tolerance used
* Apply suggestions from code review
Co-authored-by: jen_h <[email protected]>
* Update copyright date and remove stray log statement
* Mock farmhash in tests
* Add Math.abs for farmhash - to be consistent with the internal implementation
* Regenerate package-lock to fix Node 14 CI error re busboy
* Fix lint errors
* Rename "id" to "randomizationId" per discussion
* Extract API
* Only return false in cases of uknown template evaluation
* Remove product prefix from type names
* Remove product prefix from exported types
* Remove unused "expression" field from server condition
* Extract API
* Remove prefix from impl classes, for consistency
* Remove prefix from new internal classes
* Remove "server" prefix
* Remove prefix from NamedCondition
* Rename "or" and "and" fields to match API
* Rename "operator" field to "percentOperator" to match API
* Extract API after "and" and "or" rename
* use longjs library for hash
* re-run npm install
* re-attempt
* use node 14, re-attempt
* remove file
* Add comment, switch from lte to lt
---------
Co-authored-by: Erik Eldridge <[email protected]>
Co-authored-by: Xin Wei <[email protected]>
Co-authored-by: jen_h <[email protected]>1 parent eeaf1f6 commit 72fecd7Copy full SHA for 72fecd7
File tree
Expand file treeCollapse file tree
4 files changed
+251
-209
lines changedFilter options
- src/remote-config
- test/unit/remote-config
Expand file treeCollapse file tree
4 files changed
+251
-209
lines changed
0 commit comments