The higher level Development Guide gives contributing to Feast codebase as a whole.
This guide is targeted at developers looking to contribute to Feast components in the feast-java Repository:
Don't see the Feast component that you want to contribute to here?
Check out the Development Guide to learn how Feast components are distributed over multiple repositories.
Common Environment Setup for all feast-java Feast components:
- feast-java contains submodules that need to be updated:
git submodule init
git submodule update --recursive
- Ensure following development tools are installed:
- Java SE Development Kit 11, Maven 3.6,
make
feast-java's codebase conforms to the Google Java Style Guide.
Automatically format the code to conform the style guide by:
# formats all code in the feast-java repository
mvn spotless:apply
If you're using IntelliJ, you can import these code style settings if you'd like to use the IDE's reformat function.
The Project Makefile provides useful shorthands for common development tasks:
Run all Unit tests:
make test-java
Run all Integration tests:
make test-java-integration
Building Docker images for Feast Core & Feast Serving:
make build-docker REGISTRY=gcr.io/kf-feast VERSION=develop
Setting up your development environment for Feast Core:
- Complete the feast-java Common Setup
- Boot up a PostgreSQL instance (version 11 and above). Example of doing so via Docker:
# spawn a PostgreSQL instance as a Docker container running in the background
docker run \
--rm -it -d \
--name postgres \
-e POSTGRES_DB=postgres \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=password \
-p 5432:5432 postgres:12-alpine
Feast Core is configured using it's application.yml.
- Build / Compile Feast Core with Maven to produce an executable Feast Core JAR
mvn package -pl core --also-make -Dmaven.test.skip=true
- Run Feast Core using the built JAR:
# where X.X.X is the version of the Feast Core JAR built
java -jar core/target/feast-core-X.X.X-exec.jar
Unit & Integration Tests can be used to verify functionality:
# run unit tests
mvn test -pl core --also-make
# run integration tests
mvn verify -pl core --also-make
Setting up your development environment for Feast Serving:
- Complete the feast-java Common Setup
- Boot up a Redis instance (version 5.x). Example of doing so via Docker:
docker run --name redis --rm -it -d -p 6379:6379 redis:5-alpine
Feast Serving requires a running Feast Core instance to retrieve Feature metadata in order to serve features. See the Feast Core section for how to get a Feast Core instance running.
Feast Serving is configured using it's application.yml.
- Build / Compile Feast Serving with Maven to produce an executable Feast Serving JAR
mvn package -pl serving --also-make -Dmaven.test.skip=true
2. Run Feast Serving using the built JAR:
```sh
# where X.X.X is the version of the Feast serving JAR built
java -jar serving/target/feast-serving-X.X.X-exec.jar
Unit & Integration Tests can be used to verify functionality:
# run unit tests
mvn test -pl serving --also-make
# run integration tests
mvn verify -pl serving --also-make
Setting up your development environment for Feast Java SDK:
- Complete the feast-java Common Setup
Feast Java Client is a Java Client for retrieving Features from a running Feast Serving instance.
See the Feast Serving Section section for how to get a Feast Serving instance running.
Feast Java Client is configured as code
- Build / Compile Feast Java Client with Maven:
mvn package -pl sdk/java --also-make -Dmaven.test.skip=true
Unit Tests can be used to verify functionality:
mvn package -pl sdk/java test --also-make