-
Notifications
You must be signed in to change notification settings - Fork 3
feat: Add Java OpenFeature provider #58
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
928e266
to
f7f6ffe
Compare
f7f6ffe
to
433f520
Compare
<plugin> | ||
<groupId>org.xolstice.maven.plugins</groupId> | ||
<artifactId>protobuf-maven-plugin</artifactId> | ||
<version>0.6.1</version> | ||
<configuration> | ||
<protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact> | ||
<pluginId>grpc-java</pluginId> | ||
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact> | ||
</configuration> | ||
<executions> | ||
<!-- Compile the Confidence API protos from this repo to satisfy imports and stubs --> | ||
<execution> | ||
<id>compile-confidence-protos</id> | ||
<phase>generate-sources</phase> | ||
<goals> | ||
<goal>compile</goal> | ||
<goal>compile-custom</goal> | ||
</goals> | ||
<configuration> | ||
<protoSourceRoot>${project.basedir}/../../confidence-resolver/protos</protoSourceRoot> | ||
<includes> | ||
<include>confidence/flags/resolver/v1/**/*.proto</include> | ||
<include>confidence/flags/types/v1/**/*.proto</include> | ||
<include>confidence/flags/admin/v1/**/*.proto</include> | ||
<include>confidence/iam/v1/**/*.proto</include> | ||
<include>confidence/auth/v1/**/*.proto</include> | ||
<include>google/api/**/*.proto</include> | ||
<include>google/type/decimal.proto</include> | ||
<include>confidence/api/annotations.proto</include> | ||
<include>confidence/events/v1/annotations.proto</include> | ||
</includes> | ||
</configuration> | ||
</execution> | ||
<!-- Generate WASM interop messages from the shared wasm/proto/messages.proto --> | ||
<execution> | ||
<id>compile-wasm-messages</id> | ||
<phase>generate-sources</phase> | ||
<goals> | ||
<goal>compile</goal> | ||
<goal>compile-custom</goal> | ||
</goals> | ||
<configuration> | ||
<protoSourceRoot>${project.basedir}/../../wasm/proto</protoSourceRoot> | ||
<includes> | ||
<include>messages.proto</include> | ||
</includes> | ||
<clearOutputDirectory>false</clearOutputDirectory> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> |
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.
This has been changed and needs thorough review
import rust_guest.Messages.SetResolverStateRequest; | ||
import rust_guest.Messages; | ||
import com.spotify.confidence.wasm.Messages; | ||
import com.spotify.confidence.wasm.Messages.SetResolverStateRequest; |
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.
Note that change of naming in the java packaging
79b0241
to
2ebe795
Compare
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.
Looks good to me. There are some funny business in the makefile, like it's copying things when it shouldn't have to, but I just realized we have that in other makefiles to. We can fix that later...
# Force test stages to run by copying marker files | ||
COPY --from=confidence-resolver.test /workspace/Cargo.toml /markers/test-resolver | ||
COPY --from=wasm-msg.test /workspace/Cargo.toml /markers/test-wasm-msg | ||
COPY --from=openfeature-provider-js.test /app/package.json /markers/test-openfeature |
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.
Good!
f92f8b6
to
b571554
Compare
Ported here from the source: https://github.com/spotify/confidence-sdk-java
The plan is to remove this provider from that repo, and unify all WASM-based open feature providers into this repo.
For the reviewer: the Java files in the PR are copied as-is and don't need review. The only change being the import name for
Messages
.