-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Introduce datatypes/java module for proto generation #391
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| Feast Data Types for Java | ||
| ========================= | ||
|
|
||
| This module produces Java class files for Feast's data type and gRPC service | ||
| definitions, from Protobuf IDL. These are used across Feast components for wire | ||
| interchange, contracts, etc. | ||
|
|
||
| End users of Feast will be best served by our Java SDK which adds higher-level | ||
| conveniences, but the data types are published independently for custom needs, | ||
| without any additional dependencies the SDK may add. | ||
|
|
||
| Dependency Coordinates | ||
| ---------------------- | ||
|
|
||
| ```xml | ||
| <dependency> | ||
| <groupId>dev.feast</groupId> | ||
| <artifactId>datatypes-java</artifactId> | ||
| <version>0.4.0-SNAPSHOT</version> | ||
| </dependency> | ||
| ``` | ||
|
|
||
| Using the `.proto` Definitions | ||
| ------------------------------ | ||
|
|
||
| The `.proto` definitions are packaged as resources within the Maven artifact, | ||
| which may be useful to `include` them in dependent Protobuf definitions in a | ||
| downstream project, or for other JVM languages to consume from their builds to | ||
| generate more idiomatic bindings. | ||
|
|
||
| Google's Gradle plugin, for instance, [can use protos in dependencies][Gradle] | ||
| either for `include` or to compile with a different `protoc` plugin than Java. | ||
|
|
||
| [sbt-protoc] offers similar functionality for sbt/Scala. | ||
|
|
||
| [Gradle]: https://github.com/google/protobuf-gradle-plugin#protos-in-dependencies | ||
| [sbt-protoc]: https://github.com/thesamet/sbt-protoc | ||
|
|
||
| Publishing | ||
| ---------- | ||
|
|
||
| TODO: this module should be published to Maven Central upon Feast releases—this | ||
| needs to be set up in POM configuration and release automation. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!-- | ||
| ~ Copyright 2019 The Feast Authors | ||
| ~ | ||
| ~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
| ~ you may not use this file except in compliance with the License. | ||
| ~ You may obtain a copy of the License at | ||
| ~ | ||
| ~ https://www.apache.org/licenses/LICENSE-2.0 | ||
| ~ | ||
| ~ Unless required by applicable law or agreed to in writing, software | ||
| ~ distributed under the License is distributed on an "AS IS" BASIS, | ||
| ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| ~ See the License for the specific language governing permissions and | ||
| ~ limitations under the License. | ||
| ~ | ||
| --> | ||
| <project xmlns="http://maven.apache.org/POM/4.0.0" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
| <modelVersion>4.0.0</modelVersion> | ||
|
|
||
| <name>Feast Data Types for Java</name> | ||
| <description> | ||
| Data types and service contracts used throughout Feast components and | ||
| their interchanges. These are generated from Protocol Buffers and gRPC | ||
| definitions included in the package. | ||
| </description> | ||
| <artifactId>datatypes-java</artifactId> | ||
|
|
||
| <parent> | ||
| <groupId>dev.feast</groupId> | ||
| <artifactId>feast-parent</artifactId> | ||
| <version>${revision}</version> | ||
| <relativePath>../..</relativePath> | ||
| </parent> | ||
|
|
||
| <build> | ||
| <plugins> | ||
| <plugin> | ||
| <groupId>org.xolstice.maven.plugins</groupId> | ||
| <artifactId>protobuf-maven-plugin</artifactId> | ||
| <configuration> | ||
| <checkStaleness>true</checkStaleness> | ||
| <protocArtifact> | ||
| com.google.protobuf:protoc:${protocVersion}:exe:${os.detected.classifier} | ||
| </protocArtifact> | ||
| <pluginId>grpc-java</pluginId> | ||
| <pluginArtifact> | ||
| io.grpc:protoc-gen-grpc-java:${grpcVersion}:exe:${os.detected.classifier} | ||
| </pluginArtifact> | ||
| </configuration> | ||
| <executions> | ||
| <execution> | ||
| <goals> | ||
| <goal>compile</goal> | ||
| <goal>compile-custom</goal> | ||
| <goal>test-compile</goal> | ||
| </goals> | ||
| </execution> | ||
| </executions> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
|
|
||
| <dependencies> | ||
| <dependency> | ||
| <groupId>io.grpc</groupId> | ||
| <artifactId>grpc-services</artifactId> | ||
| </dependency> | ||
| </dependencies> | ||
| </project> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../../../../../protos/third_party |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
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.
@davidheryanto Maybe you can help us here if you already have Maven configuration for publishing the SDK to Sonatype. Things can be published later by a credential holder, but we can include any needed build config in this branch so it gets cherry-picked for backport. (Not sure if Sonatype will approve a group ID of
feast, let's see).I think CI configuration for publishing on release builds can be a separate PR, including the SDK too, unless you disagree. You probably know best how you'd like that automation to work, how secrets are handled in Prow, etc.
Uh oh!
There was an error while loading. Please reload this page.
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.
Hi @ches
Yes, we already have a PR for the publishing of Feast library to Sonatype (which will sync it to Maven Central) #394 The group id we use is
dev.feastWill include the publishing of these protos as well in another PR.