-
Notifications
You must be signed in to change notification settings - Fork 41
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
feat: add Togglz provider #415
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: liran2000 <[email protected]>
Hi @bennetelli, @hennr, you can have a look and share your thoughts. Thanks |
boolean featureBooleanValue = feature.isActive(); | ||
return ProviderEvaluation.<Boolean>builder() | ||
.value(featureBooleanValue) | ||
.reason(Reason.TARGETING_MATCH.name()) |
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 may want to use the reason STATIC
since it doesn't look like evaluation context is being used.
https://openfeature.dev/specification/types#resolution-details
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.
Not sure that STATIC is correct here, since Activation can be done by user even without passing context if I understand correctly.
@bennetelli, @hennr can share their thoughts.
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.
Wouldn't you need to include FeatureUser
when calling isActive
?
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.
@beeme1mr I don't think so. It seems like Togglz uses pre-configured features/beans to get these values contextually. For example, to get the user name you configure one of these: https://www.togglz.org/documentation/authentication, which take the user-name from the servlet context, etc.
This is actually configured in the feature
(see the constructor) if I understand correctly.
I'm honestly not sure how to properly determine the reason with this provider.
providers/togglz/README.md
Outdated
# Unofficial Togglz OpenFeature Provider for Java | ||
|
||
## Usage | ||
See [TogglzProviderTest.java](./src/test/java/dev/openfeature/contrib/providers/togglz/TogglzProviderTest.java) |
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.
It can be addressed in a follow-up PR, but please add more information to the readme. Please include information such as install instructions, basic usage, limitations (only booleans are supported), etc.
Signed-off-by: liran2000 <[email protected]>
Signed-off-by: liran2000 <[email protected]>
@liran2000 will have a look at it tomorrow. Thanks for your PR :) it's has been on my list for a while as well |
@liran2000 I'll give this a proper review soon from a general OpenFeature perspective. In the meantime, could you add yourself (and anyone else relevant, maybe @bennetelli ?) to the component owners? We're trying to identify owners for all new components. It functions somewhat like CODEOWNERS but just adds you as assignee when these files change. |
Signed-off-by: liran2000 <[email protected]>
hi @bennetelli, can you review this from Togglz point of view ? |
…ure#415) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Add Togglz provider.
Related Issues
Togglz issue.
Notes