-
Notifications
You must be signed in to change notification settings - Fork 44
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: multi-provider implementation #1028
feat: multi-provider implementation #1028
Conversation
Signed-off-by: liran2000 <liran2000@gmail.com>
Signed-off-by: liran2000 <liran2000@gmail.com>
Signed-off-by: Liran M <77168114+liran2000@users.noreply.github.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.
Thank you, this looks really cool. But especially the Strategy initialization and the handling of 'exception-less Errors' might be problematic
...r/src/main/java/dev/openfeature/contrib/providers/multiprovider/FirstSuccessfulStrategy.java
Outdated
Show resolved
Hide resolved
...ovider/src/main/java/dev/openfeature/contrib/providers/multiprovider/FirstMatchStrategy.java
Outdated
Show resolved
Hide resolved
Signed-off-by: liran2000 <liran2000@gmail.com>
providers/multiprovider/CHANGELOG.md
Outdated
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.
Please remove this changelog. A new one should be created by Release Please.
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.
done
release-please-config.json
Outdated
@@ -100,6 +100,17 @@ | |||
"README.md" | |||
] | |||
}, | |||
"providers/multi-provider": { |
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.
The file path is providers/multiprovider
. Please either update the path name or this configuration.
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.
done
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.
BTW, originally I had "multi-provider" like other providers, but it failed validation on Invalid Automatic-Module-Name:
❌ no - allowed
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.
Why would Maven Central allow invalid names to be uploaded?
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.
Maybe it's because they aren't invalid in other JVM langauges, like Scala or Kotlin, and maven supports all of these.
Signed-off-by: liran2000 <liran2000@gmail.com>
Signed-off-by: liran2000 <liran2000@gmail.com>
Signed-off-by: liran2000 <liran2000@gmail.com>
...rovider/src/test/java/dev/openfeature/contrib/providers/multiprovider/MultiProviderTest.java
Show resolved
Hide resolved
*/ | ||
@Override | ||
public void initialize(EvaluationContext evaluationContext) throws Exception { | ||
JSONObject json = new JSONObject(); |
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.
Instead of JSON object, could we use a HashMap
, or our SDK's own build-in object representation (Structure and it's implementations)?
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.
According to Multi-provider metadata spec, it is expected to be printed as JSON, which makes sense.
Both HashMap and Structure not printed as Json.
...ltiprovider/src/main/java/dev/openfeature/contrib/providers/multiprovider/MultiProvider.java
Outdated
Show resolved
Hide resolved
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 left a few comments but overall looks very close.
Signed-off-by: liran2000 <liran2000@gmail.com>
Signed-off-by: liran2000 <liran2000@gmail.com> Signed-off-by: Liran M <77168114+liran2000@users.noreply.github.com> Signed-off-by: Matheus Veríssimo <rodrigues.verissimo.matheus@gmail.com>
Signed-off-by: liran2000 <liran2000@gmail.com> Signed-off-by: Liran M <77168114+liran2000@users.noreply.github.com> Signed-off-by: Matheus Veríssimo <rodrigues.verissimo.matheus@gmail.com>
Readme describes the provider.
References