Commit efbda89
[FSSDK-11170] update: decision service methods for cmab (#583)
* update: add CmabService to Optimizely class and builder
* update: integrate CMAB service into OptimizelyFactory
* update: change CmabService field to non-nullable in Optimizely class
* update: add CmabService to DecisionService and its tests
* update: implement CMAB traffic allocation in Bucketer and DecisionService
* update: enhance DecisionService, FeatureDecision, and DecisionResponse to support CMAB UUID handling
* update: enhance DecisionService and DecisionMessage to handle errors and include CMAB UUIDs in responses
* update: add validConfigJsonCMAB method to DatafileProjectConfigTestUtils for CMAB configuration
* update: add tests to verify precedence of whitelisted and forced variations over CMAB service decisions in DecisionService
* update: add test to verify error handling in getVariation for CMAB service failures
* update: modify DecisionResponse to include additional error handling information
* update: fix error handling assertion in DecisionServiceTest to correctly verify error state
* update: add tests for CMAB experiment variations in DecisionService
* update: implement decision-making methods to skip CMAB logic in Optimizely and DecisionService
* update: add methods to OptimizelyUserContext for decision-making without CMAB logic
* update: add asynchronous decision-making methods in OptimizelyUserContext and related fetcher classes
* update: add decision-making methods without CMAB logic in OptimizelyUserContextTest
* update: remove unused parameter 'useCmab' from DecisionService method documentation
* update: rename methods to use 'Sync' suffix for clarity in decision-making logic
* update: return cmab error decision whenever found
* update: enhance error handling by specifying CMAB error messages in decision responses
* update: improve error handling by checking for null values in experiment key retrieval
* update: fix CMAB error handling by providing a valid Experiment in FeatureDecision
* update: add Javadoc comments for async decision methods and config creation in CMAB client
* update: refactor build to use cmabClient instead of default service
* update: refactor DefaultCmabClient to utilize CmabClientHelper
* update: refactor AsyncDecisionsFetcher to AsyncDecisionFetcher and enhance decision handling
* update: add missing copyright notice and license information to CmabClientHelper
* update: enhance CMAB handling in bucketing and decision services, add backward compatibility for mobile apps
* update: add backward compatibility support for Android sync and async decisions in OptimizelyUserContext
* update: add empty list parameter to decision methods in OptimizelyUserContextTest for consistency
* update: replace null with empty list parameter in async decision method for consistency
* update: add useCmab parameter to decideForKeys methods for enhanced decision handling
* Update core-api/src/main/java/com/optimizely/ab/Optimizely.java
Co-authored-by: Jae Kim <[email protected]>
* update: refactor decision-making logic to use DecisionPath enum for clarity and maintainability
* Update core-api/src/main/java/com/optimizely/ab/Optimizely.java
Co-authored-by: Jae Kim <[email protected]>
* Update core-api/src/main/java/com/optimizely/ab/Optimizely.java
Co-authored-by: Jae Kim <[email protected]>
* update: modify OptimizelyUserContext to change optimizely field to package-private and add copyright notice to DecisionPath
* update: implement asynchronous decision-making methods in Optimizely and OptimizelyUserContext with corresponding tests
* update: refactor DefaultCmabService to remove CmabServiceOptions dependency and adjust related tests
* update: refactor DefaultCmabService to use a generic Cache interface and enhance builder methods for cache configuration
* fix to support android-sdk
* clean up
* update: refactor bucketing logic to remove CMAB handling from DecisionService and adjust tests accordingly
* update: introduce CacheWithRemove interface and refactor DefaultCmabService to utilize it
* update: implement CacheWithRemove interface in DefaultLRUCache class
* update: refactor OptimizelyFactory to remove CMAB cache methods and adjust instance creation logic
* update: refactor DefaultCmabService to streamline logger initialization and enhance cache handling logging
* update: refactor DefaultCmabService to use Cache interface, enhance cache size and timeout, and remove CacheWithRemove interface
* update: change parameter type from DefaultCmabService to CmabService in OptimizelyFactory
* update: change parameter type from DefaultCmabService to CmabService in newDefaultInstance method of OptimizelyFactory
* update: add missing newline at end of file in multiple classes
* update: add missing newline at end of OptimizelyDecisionsCallback.java
* update: modify DefaultCmabClient constructor to use default retry configuration
* update: add cmabEndpoint handling in DefaultCmabClient and CmabClientConfig
* Update core-api/src/main/java/com/optimizely/ab/optimizelydecision/OptimizelyDecisionsCallback.java
Co-authored-by: Jae Kim <[email protected]>
* update: refactor CmabClientConfig to include cmabEndpoint handling and add factory method
* update: add overloaded constructor to DecisionService for improved initialization
* update: refactor decision methods in Optimizely for improved CMAB handling and backward compatibility
* update: add missing newline at end of Bucketer.java file
---------
Co-authored-by: Jae Kim <[email protected]>
Co-authored-by: Jae Kim <[email protected]>1 parent 0215660 commit efbda89
File tree
27 files changed
+1666
-338
lines changed- core-api/src
- main/java/com/optimizely/ab
- bucketing
- cmab
- client
- service
- internal
- optimizelydecision
- test/java/com/optimizely/ab
- bucketing
- cmab
- config
- internal
- core-httpclient-impl/src/main/java/com/optimizely/ab
- cmab
27 files changed
+1666
-338
lines changedLines changed: 170 additions & 39 deletions
Large diffs are not rendered by default.
Lines changed: 58 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
29 | | - | |
30 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
31 | 39 | | |
32 | 40 | | |
33 | 41 | | |
| |||
42 | 50 | | |
43 | 51 | | |
44 | 52 | | |
45 | | - | |
| 53 | + | |
46 | 54 | | |
47 | 55 | | |
48 | 56 | | |
| |||
390 | 398 | | |
391 | 399 | | |
392 | 400 | | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
393 | 441 | | |
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
0 commit comments