This document explains the development process for the Numaflow Java SDK.
After you make certain changes to the Java SDK implementation, you would like to use it to build a brand new UDF image, and run it on a pipeline to verify the image continues working well with the Numaflow platform. In order to do this you can follow these steps:
- Make the changes
- Update your local repository using maven, to reflect your latest changes. This can be done in the root
directory by running:
mvn clean install
(make sure that the version in thepom.xml
in the root and examples directories match) - In the examples directory you can then run
mvn clean install -Ddocker.tag=<tag>
, which will buildnumaflow-java-examples
, run unit tests, and then build all example images. Now that the images are available locally, you can take the desired image and test it in a pipeline
You can build and push a specific example image by running the following:
./hack/update_examples.sh -bpe <example-execution-id> -t <tag>
The default tag is stable
, but it is recommended you specify your own for testing purposes, as the Github Actions CI uses the stable
tag.
This consistent tag name is used so that the tags in the E2E test pipelines do not need to be
updated each time an SDK change is made.
-bpe
first builds a local image with the naming convention
numaflow-java-examples/<example-execution-id>:<tag>
, which then gets pushed as
quay.io/numaio/numaflow-java/<example-execution-id>:<tag>
. If you want to build and tag all images locally,
without pushing to quay.io, as mentioned in step 3, run: mvn clean install -Ddocker.tag=<tag>
.
Note: before running the script, ensure that through the CLI, you are logged into quay.io.
After confirming that your changes pass local testing:
- Clean up testing artifacts
- Create a PR. Once your PR has been merged, a Github Actions workflow (
Docker Publish
) will be triggered, to build, tag (withstable
), and push all example images. This ensures that all example images are using the most up-to-date version of the SDK, i.e. the one including your changes
If you add a new example, there are a few steps to follow in order for it to be used by the update script and the
Docker Publish
workflow:
- Add the example to the
examples/pom.xml
, within an execution element. Note that theid
tag you specify must be exactly the same as the quay.io repository name for the example - Add the
id
tag you specified in step 1 to theexecution_ids
matrix in.github/workflows/build-push.yaml