Skip to content

feat: add Prefab provider#915

Closed
liran2000 wants to merge 2 commits intoopen-feature:mainfrom
liran2000:feature/prefab
Closed

feat: add Prefab provider#915
liran2000 wants to merge 2 commits intoopen-feature:mainfrom
liran2000:feature/prefab

Conversation

@liran2000
Copy link
Copy Markdown
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
Copy Markdown
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" ] } }

Copy link
Copy Markdown

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
Copy Markdown
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

Comment thread providers/prefab/pom.xml
<dependency>
<groupId>cloud.prefab</groupId>
<artifactId>client</artifactId>
<version>0.3.20</version>
Copy link
Copy Markdown
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 ?

Copy link
Copy Markdown

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