Skip to content

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

Closed
wants to merge 2 commits into from

Conversation

liran2000
Copy link
Member

@liran2000 liran2000 commented Aug 13, 2024

Readme describes the provider.

Signed-off-by: liran2000 <liran2000@gmail.com>
// @Test
void getBooleanEvaluationByUser() {
MutableContext evaluationContext = new MutableContext();
evaluationContext.add("domain", "prefab.cloud");
Copy link
Member Author

@liran2000 liran2000 Aug 13, 2024

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}}

flag config:

just_my_domain: { "feature_flag": "true", value: "new-version", criteria: { operator: PROP_IS_ONE_OF, property: "domain", values: [ "prefab.cloud", "example.com" ] } }

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

Copy link
Member Author

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>
Copy link
Member Author

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 ?

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants