Commit 81f5be9
authored
[FSSDK-11175] Update: Implement Decision Service methods to handle CMAB (#457)
* update: integrate CMAB components into OptimizelyFactory
* update: add cmab_service parameter to Optimizely constructor for CMAB support
* update: add docstring to DefaultCmabService class for improved documentation
* update: implement CMAB support in bucketer and decision service, revert OptimizelyFactory
* linting fix
* update: add cmab_uuid handling in DecisionService and related tests
* - updated function bucket_to_entity_id
- test_optimizely.py fixed to expect new Decision objects
* update: add None parameter to Decision constructor in user context tests
* update: enhance CMAB decision handling and add related tests
* update: fix logger message formatting in CMAB experiment tests
* mypy fix
* update: refine traffic allocation type hints and key naming in bucketer and decision service
* update: remove unused import of cast in bucketer.py
* update: fix return type for numeric_metric_value in get_numeric_value and ensure key is of bytes type in hash128
* update: specify type hint for numeric_metric_value in get_numeric_value function
* update: fix logger reference in DefaultCmabClient initialization and add __init__.py for cmab module
* update: enhance error logging for CMAB fetch failures with detailed messages and add a test for handling 500 errors
* update: enhance decision result handling by introducing VariationResult and updating get_variation return type to include detailed error information
* update: refactor get_variation return structure and change tests accordingly
* -Error propagated to optimizely.py
-test cases changed to handle return type dicts of DecisionResult and VariationResult
* update: modify get_variation to return VariationResult and adjust related logic for improved variation handling
* update: unit test fixes
* Revert "update: unit test fixes"
This reverts commit d2fc631.
* Revert "update: modify get_variation to return VariationResult and adjust related logic for improved variation handling"
This reverts commit b901c5f.
* update: enhance decision service to handle error states and improve bucketing logic
* update: remove debug print statement from Optimizely class
* update: enhance bucketing logic to support CMAB traffic allocations
* update: improve error logging for CMAB decision fetch failures
* update: improve logging and error handling in bucketer and decision service1 parent 82ec019 commit 81f5be9
File tree
13 files changed
+1255
-433
lines changed- optimizely
- cmab
- decision
- helpers
- lib
- tests
13 files changed
+1255
-433
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
122 | 150 | | |
123 | 151 | | |
124 | 152 | | |
| |||
151 | 179 | | |
152 | 180 | | |
153 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
154 | 190 | | |
155 | 191 | | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
| 192 | + | |
160 | 193 | | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
| 194 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
38 | 50 | | |
39 | 51 | | |
40 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
0 commit comments