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>
aepfli
left a comment
There was a problem hiding this comment.
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.
Please remove this changelog. A new one should be created by Release Please.
release-please-config.json
Outdated
| "README.md" | ||
| ] | ||
| }, | ||
| "providers/multi-provider": { |
There was a problem hiding this comment.
The file path is providers/multiprovider. Please either update the path name or this configuration.
There was a problem hiding this comment.
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.
Why would Maven Central allow invalid names to be uploaded?
There was a problem hiding this comment.
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.
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.
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
toddbaert
left a comment
There was a problem hiding this comment.
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