From bf5e3f56da97cf9c7d2d6dc3dcee17b6548f32e4 Mon Sep 17 00:00:00 2001 From: Derek Wang Date: Thu, 18 Jan 2024 00:00:20 -0800 Subject: [PATCH] doc Signed-off-by: Derek Wang --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 55ac352f..9bca22d0 100644 --- a/README.md +++ b/README.md @@ -18,3 +18,25 @@ Source Transformer, Functions, Sinks or SideInputs in Golang. `make test` - Run the tests. `make proto`- Regenerate the protobuf files from the [proto files](https://github.com/numaproj/numaflow/tree/main/pkg/apis/proto) defined in [numaproj/numaflow](https://github.com/numaproj/numaflow) repository. `make proto ORG=xxx PROJECT=xxx BRANCH=xxx` - Regenerate the protobuf files from specified github repository. Default values: `ORG=numaproj PROJECT=numaflow BRANCH=main` + +### Proto File Changes + +The source proto files are located at [numaflow](https://github.com/numaproj/numaflow/tree/main/pkg/apis/proto) repository, so any proto file change should start from numaflow repository change, and Go should always be the 1st SDK to update. + +This means, usually there will be two PRs to update gRPC contracts, one in `numaflow` for proto file changes, the other one in `numaflow-go` to update the detailed implementation. There is one trick to unblock the code change in `numaflow-go` to run codegen for proto files, before the proto file change PR is merged in `numaflow` repository: + +```shell +make proto ORG=xxx BRANCH=xxx +``` + +This will run proto gen with the source files defined in your own repository and branch. + +For example: + +```shell +# Try to fetch proto files defined in branch "proto-chg" of https://github.com/anyone/numaflow +make proto ORG=anyone BRANCH=proto-chg + +# Try to fetch proto files defined in branch "my-change" of https://github.com/numaproj/numaflow +make proto BRANCH=my-change +```