-
Notifications
You must be signed in to change notification settings - Fork 53
feat: add Prefab provider #915
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
Conversation
Signed-off-by: liran2000 <liran2000@gmail.com>
// @Test | ||
void getBooleanEvaluationByUser() { | ||
MutableContext evaluationContext = new MutableContext(); | ||
evaluationContext.add("domain", "prefab.cloud"); |
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.
hi @jkebinger,
can you help on why this evaluation not returning true by the context domain ?
it translates to:
prefabCloudClient.featureFlagClient().featureIsOn(key, context);
with context - notice "\n" which is audo added to the string:
PrefabContext{name=User, properties={domain=string: "prefab.cloud"\n}}
just_my_domain: { "feature_flag": "true", value: "new-version", criteria: { operator: PROP_IS_ONE_OF, property: "domain", values: [ "prefab.cloud", "example.com" ] } }
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.
I’m traveling this week so I can’t help with any of this yet. A Java 8 client is probably a pretty substantial lift but it’ll require some study
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.
ok I managed to solved it via the docs, replaced the deprecated yaml config with json config.
You can review this PR on your convenient time.
For Java 8, you may update Prefab Java client to version 8 if there are not too many specific Java>8 code sections.
thanks
<dependency> | ||
<groupId>cloud.prefab</groupId> | ||
<artifactId>client</artifactId> | ||
<version>0.3.20</version> |
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.
hi @jkebinger,
OpenFeature SDK built with Java 8, so it will require Java 8 version.
Is it possible to release Java 8 Prefab client ?
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 appears the primary change to get to java8 compatibility will be removing the use of the java 11 HttpClient, so not too bad. Can't make any promises on when we may be able to prioritize that work; I'll probably aim to implement it such that there's a java8 compatibility add on so java 11+ users don't have to get an additional set of dependencies (probably okhttp). We'll see
Signed-off-by: liran2000 <liran2000@gmail.com>
Readme describes the provider.