-
Notifications
You must be signed in to change notification settings - Fork 1
Assignment Details Part 1 of 7: AssignmentDetails return object and supporting classes #175
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: main
Are you sure you want to change the base?
Conversation
| * | ||
| * @param <T> The type of the variation value (Boolean, Integer, Double, String, etc.) | ||
| */ | ||
| public class AssignmentDetails<T> { |
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.
This is the top-level class that will be returned by get<type>Details() methods.
We use generics so that the customer's code doesn't have to unwrap an EppoValue if they retrieve the variation (which is top level, typed T).
| public class AllocationDetails { | ||
| private final String key; | ||
| private final AllocationEvaluationCode allocationEvaluationCode; | ||
| private final int orderPosition; |
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.
You're making Twitch happy with this!
| import java.util.List; | ||
|
|
||
| /** | ||
| * Contains comprehensive debugging information about a flag evaluation. This includes why a |
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.
comprehensive is right!
📚Assignment Details Stacked Pull Requests📚
👉 AssignmentDetails return object and supporting classes (#175)
🔲 Parse more UFC metadata (#176)
🔲 Ingest details part of shared test cases (#177)
🔲 FlagEvaluator computes details (#183)
🔲 Ability to unwrap EppoValue to a given type (#184)
🔲 Public assignment details methods (#181)
🔲 Bandit details (#182)
Eppo Internal
🎟️ Ticket: FFESUPPORT-378 - Implement assignment details for common Java core
Motivation and Context
We want to bring detailed assignment capabilities (e.g.,
get<Type>Details()) to Android and Java SDKs.Description
This pull request gets the ball rolling by preparing the return type that the
get<Type>Details()methods will return.This is a generic
AssignmentDetails<T>, whereTwill beBoolean,Integer,Double,String, orJsonNode. The template type allows the top levelvariationof the details to be the desired type without the customer having to unbox.How has this been documented?
Documentation will be updated for the upstream SDKs once this is incorporated into them
How has this been tested?
This chunk is untested in this pull request as they are currently unused, but will be tested later on by changes to
FlagEvaluatorTest,BaseEppoClientTest, andBaseEppoClientBanditTest.