From 01d7c0c0c2b356e54c1b07ed022d35ce759dd8e0 Mon Sep 17 00:00:00 2001 From: Abdullah Yildirim Date: Mon, 11 Mar 2024 10:39:39 -0400 Subject: [PATCH] feat: implement update script and build/push workflow (#102) Signed-off-by: a3hadi --- .github/workflows/build-push.yaml | 42 +++++++++ .github/workflows/{ci.yaml => run-tests.yaml} | 0 development.md | 33 +++++++ pkg/mapper/examples/even_odd/Makefile | 2 +- pkg/mapper/examples/even_odd/go.mod | 4 +- pkg/mapper/examples/even_odd/go.sum | 2 - pkg/mapper/examples/flatmap/Makefile | 2 +- pkg/mapper/examples/flatmap/go.mod | 4 +- pkg/mapper/examples/flatmap/go.sum | 2 - pkg/mapper/examples/forward_message/Makefile | 2 +- pkg/mapper/examples/forward_message/go.mod | 4 +- pkg/mapper/examples/forward_message/go.sum | 2 - pkg/mapper/examples/retry/Makefile | 2 +- pkg/mapper/examples/retry/go.mod | 4 +- pkg/mapper/examples/retry/go.sum | 2 - pkg/mapper/examples/tickgen/Makefile | 2 +- pkg/mapper/examples/tickgen/go.mod | 4 +- pkg/mapper/examples/tickgen/go.sum | 2 - .../examples/flatmap_stream/Makefile | 2 +- .../examples/flatmap_stream/go.mod | 4 +- .../examples/flatmap_stream/go.sum | 2 - pkg/reducer/examples/counter/Makefile | 2 +- pkg/reducer/examples/counter/go.mod | 4 +- pkg/reducer/examples/counter/go.sum | 2 - pkg/reducer/examples/sum/Makefile | 2 +- pkg/reducer/examples/sum/go.mod | 4 +- pkg/reducer/examples/sum/go.sum | 2 - pkg/reducestreamer/examples/counter/Makefile | 2 +- pkg/reducestreamer/examples/counter/go.mod | 4 +- pkg/reducestreamer/examples/counter/go.sum | 4 - pkg/reducestreamer/examples/sum/Makefile | 2 +- pkg/reducestreamer/examples/sum/go.mod | 4 +- pkg/reducestreamer/examples/sum/go.sum | 2 - pkg/sessionreducer/examples/counter/Makefile | 2 +- pkg/sessionreducer/examples/counter/go.mod | 4 +- pkg/sessionreducer/examples/counter/go.sum | 2 - .../examples/simple-sideinput/Makefile | 2 +- .../examples/simple-sideinput/go.mod | 4 +- .../examples/simple-sideinput/go.sum | 2 - .../examples/simple-sideinput/udf/Makefile | 2 +- .../examples/simple-sideinput/udf/go.mod | 4 +- .../examples/simple-sideinput/udf/go.sum | 2 - pkg/sinker/examples/log/Makefile | 2 +- pkg/sinker/examples/log/go.mod | 4 +- pkg/sinker/examples/log/go.sum | 2 - pkg/sourcer/examples/simple_source/Makefile | 2 +- pkg/sourcer/examples/simple_source/go.mod | 4 +- pkg/sourcer/examples/simple_source/go.sum | 2 - .../examples/assign_event_time/Makefile | 2 +- .../examples/assign_event_time/go.mod | 4 +- .../examples/assign_event_time/go.sum | 2 - .../examples/event_time_filter/Makefile | 2 +- .../examples/event_time_filter/go.mod | 4 +- .../examples/event_time_filter/go.sum | 2 - update_examples.sh | 87 +++++++++++++++++++ 55 files changed, 230 insertions(+), 70 deletions(-) create mode 100644 .github/workflows/build-push.yaml rename .github/workflows/{ci.yaml => run-tests.yaml} (100%) create mode 100644 development.md create mode 100755 update_examples.sh diff --git a/.github/workflows/build-push.yaml b/.github/workflows/build-push.yaml new file mode 100644 index 00000000..7637f73a --- /dev/null +++ b/.github/workflows/build-push.yaml @@ -0,0 +1,42 @@ +name: Docker Publish + +on: + push: + branches: [ main ] + tags: + - '*' + +jobs: + build_push_examples: + name: Build and Push Images + runs-on: ubuntu-latest + + strategy: + matrix: + repository: [ + "map-even-odd" + "map-flatmap", "map-forward-message", "map-retry", "map-tickgen" + "map-flatmap-stream", "reduce-counter", "reduce-sum", "reduce-stream-counter", + "reduce-stream-sum", "session-counter", "sideinput-example", "udf-sideinput-example", + "sink-log", "source-simple-source", "mapt-assign-event-time", "mapt-event-time-filter" + ] + + steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Quay.io registry + uses: docker/login-action@v3 + with: + registry: quay.io + username: ${{ secrets.NUMAIO_USERNAME }} + password: ${{ secrets.NUMAIO_PASSWORD }} + - name: Build and tag images + run: ./update_examples --build + - name: Push images + env: + IMAGE_PREFIX: "quay.io/numaio/numaflow-go" + TAG: "stable" + run: | + docker push ${{ env.IMAGE_PREFIX }}/${{ matrix.repository }}:${{ env.TAG }} diff --git a/.github/workflows/ci.yaml b/.github/workflows/run-tests.yaml similarity index 100% rename from .github/workflows/ci.yaml rename to .github/workflows/run-tests.yaml diff --git a/development.md b/development.md new file mode 100644 index 00000000..a8cae1ab --- /dev/null +++ b/development.md @@ -0,0 +1,33 @@ +# Development + +This document explains the development process for the Numaflow Go SDK. + + +### Testing + +The SDK uses local references in the `go.mod` file, i.e. the `github.com/numaproj/numaflow-go` dependency is pointing to your local +`numaflow-go` directory. Thus, you can automatically test your SDK changes without the need to push to your forked repository or modify the `go.mod` file. +Simply make your changes, build and push the desired example image, and you are ready to use it in any pipeline. + +### Deploying + +1. Create a PR for your changes. Once merged, it will trigger a workflow to build and push the images for all the examples, +with the tag `stable`. This consistent tag name is used so that the tags in the [E2E test pipelines](https://github.com/numaproj/numaflow/tree/main/test) do not need to be +updated each time a new change is made. +2. After the changes have been merged it is encouraged to update the dependency management files so that the version +displayed in the `go.mod` file reflects the commit SHA of the merged changes. This can be done simply by getting the +commit SHA of the merged changes and using it with the update script: +```shell +./update_examples -c +``` +After running the script, create another PR for these changes. + +Updating the version may not seem necessary since we are using local references. However, the client prints +out information related to the server, which includes the SDK version, which is retrieved from the `go.mod` file. +After a change is merged, even though the images will be using the most up to date SDK +version, if the dependency management files are not updated, the logs will print the previous commit SHA as the SDK version. +Thus, in order for the correctness of the server information, consistency, and to avoid future confusion, it is recommended +to update the `numaflow-go` dependency version across all the example directories, after a change has been made to the SDK. + + + diff --git a/pkg/mapper/examples/even_odd/Makefile b/pkg/mapper/examples/even_odd/Makefile index 4a12dee4..87609b7d 100644 --- a/pkg/mapper/examples/even_odd/Makefile +++ b/pkg/mapper/examples/even_odd/Makefile @@ -4,7 +4,7 @@ build: .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/map-even-odd:v0.6.1" --target even-odd . + docker build -t "quay.io/numaio/numaflow-go/map-even-odd:stable" --target even-odd . clean: -rm -rf ./dist diff --git a/pkg/mapper/examples/even_odd/go.mod b/pkg/mapper/examples/even_odd/go.mod index c221cdcb..1e27d242 100644 --- a/pkg/mapper/examples/even_odd/go.mod +++ b/pkg/mapper/examples/even_odd/go.mod @@ -2,7 +2,9 @@ module even_odd go 1.20 -require github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069 +replace github.com/numaproj/numaflow-go => ../../../.. + +require github.com/numaproj/numaflow-go v0.6.1-0.20240221033908-7c1198bc89f1 require ( github.com/golang/protobuf v1.5.3 // indirect diff --git a/pkg/mapper/examples/even_odd/go.sum b/pkg/mapper/examples/even_odd/go.sum index dd3945cb..95c8479a 100644 --- a/pkg/mapper/examples/even_odd/go.sum +++ b/pkg/mapper/examples/even_odd/go.sum @@ -4,8 +4,6 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069 h1:LBMIrUytoxuZazEnwxo+WPAxjHL1rrVhphTyByLiDYY= -github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069/go.mod h1:WoMt31+h3up202zTRI8c/qe42B8UbvwLe2mJH0MAlhI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= diff --git a/pkg/mapper/examples/flatmap/Makefile b/pkg/mapper/examples/flatmap/Makefile index 872a8283..87a75e8a 100644 --- a/pkg/mapper/examples/flatmap/Makefile +++ b/pkg/mapper/examples/flatmap/Makefile @@ -4,7 +4,7 @@ build: .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/map-flatmap:v0.6.1" --target flatmap . + docker build -t "quay.io/numaio/numaflow-go/map-flatmap:stable" --target flatmap . clean: -rm -rf ./dist diff --git a/pkg/mapper/examples/flatmap/go.mod b/pkg/mapper/examples/flatmap/go.mod index d8716054..c16fc9dd 100644 --- a/pkg/mapper/examples/flatmap/go.mod +++ b/pkg/mapper/examples/flatmap/go.mod @@ -2,7 +2,9 @@ module flatmap go 1.20 -require github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069 +replace github.com/numaproj/numaflow-go => ../../../.. + +require github.com/numaproj/numaflow-go v0.6.1-0.20240221033908-7c1198bc89f1 require ( github.com/golang/protobuf v1.5.3 // indirect diff --git a/pkg/mapper/examples/flatmap/go.sum b/pkg/mapper/examples/flatmap/go.sum index dd3945cb..95c8479a 100644 --- a/pkg/mapper/examples/flatmap/go.sum +++ b/pkg/mapper/examples/flatmap/go.sum @@ -4,8 +4,6 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069 h1:LBMIrUytoxuZazEnwxo+WPAxjHL1rrVhphTyByLiDYY= -github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069/go.mod h1:WoMt31+h3up202zTRI8c/qe42B8UbvwLe2mJH0MAlhI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= diff --git a/pkg/mapper/examples/forward_message/Makefile b/pkg/mapper/examples/forward_message/Makefile index d9646043..67ee2531 100644 --- a/pkg/mapper/examples/forward_message/Makefile +++ b/pkg/mapper/examples/forward_message/Makefile @@ -4,7 +4,7 @@ build: .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/map-forward-message:v0.6.0" --target forward-message . + docker build -t "quay.io/numaio/numaflow-go/map-forward-message:stable" --target forward-message . clean: -rm -rf ./dist diff --git a/pkg/mapper/examples/forward_message/go.mod b/pkg/mapper/examples/forward_message/go.mod index 4380978e..1e27d242 100644 --- a/pkg/mapper/examples/forward_message/go.mod +++ b/pkg/mapper/examples/forward_message/go.mod @@ -2,7 +2,9 @@ module even_odd go 1.20 -require github.com/numaproj/numaflow-go v0.6.0 +replace github.com/numaproj/numaflow-go => ../../../.. + +require github.com/numaproj/numaflow-go v0.6.1-0.20240221033908-7c1198bc89f1 require ( github.com/golang/protobuf v1.5.3 // indirect diff --git a/pkg/mapper/examples/forward_message/go.sum b/pkg/mapper/examples/forward_message/go.sum index 8b1ed758..95c8479a 100644 --- a/pkg/mapper/examples/forward_message/go.sum +++ b/pkg/mapper/examples/forward_message/go.sum @@ -4,8 +4,6 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/numaproj/numaflow-go v0.6.0 h1:gqTX1u1pFJJhX/3l3zYM8aLqRSHEainYrgBIollL0js= -github.com/numaproj/numaflow-go v0.6.0/go.mod h1:5zwvvREIbqaCPCKsNE1MVjVToD0kvkCh2Z90Izlhw5U= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= diff --git a/pkg/mapper/examples/retry/Makefile b/pkg/mapper/examples/retry/Makefile index 96700aa7..bdd63e02 100644 --- a/pkg/mapper/examples/retry/Makefile +++ b/pkg/mapper/examples/retry/Makefile @@ -4,7 +4,7 @@ build: .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/map-retry:v0.6.1" --target retry . + docker build -t "quay.io/numaio/numaflow-go/map-retry:stable" --target retry . clean: -rm -rf ./dist diff --git a/pkg/mapper/examples/retry/go.mod b/pkg/mapper/examples/retry/go.mod index 2be14290..809603ac 100644 --- a/pkg/mapper/examples/retry/go.mod +++ b/pkg/mapper/examples/retry/go.mod @@ -2,7 +2,9 @@ module retry go 1.20 -require github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069 +replace github.com/numaproj/numaflow-go => ../../../.. + +require github.com/numaproj/numaflow-go v0.6.1-0.20240221033908-7c1198bc89f1 require ( github.com/golang/protobuf v1.5.3 // indirect diff --git a/pkg/mapper/examples/retry/go.sum b/pkg/mapper/examples/retry/go.sum index dd3945cb..95c8479a 100644 --- a/pkg/mapper/examples/retry/go.sum +++ b/pkg/mapper/examples/retry/go.sum @@ -4,8 +4,6 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069 h1:LBMIrUytoxuZazEnwxo+WPAxjHL1rrVhphTyByLiDYY= -github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069/go.mod h1:WoMt31+h3up202zTRI8c/qe42B8UbvwLe2mJH0MAlhI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= diff --git a/pkg/mapper/examples/tickgen/Makefile b/pkg/mapper/examples/tickgen/Makefile index dcaf1b85..34580b90 100644 --- a/pkg/mapper/examples/tickgen/Makefile +++ b/pkg/mapper/examples/tickgen/Makefile @@ -4,7 +4,7 @@ build: .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/map-tickgen:v0.6.0" --target tickgen . + docker build -t "quay.io/numaio/numaflow-go/map-tickgen:stable" --target tickgen . clean: -rm -rf ./dist diff --git a/pkg/mapper/examples/tickgen/go.mod b/pkg/mapper/examples/tickgen/go.mod index c9208575..8e9a570b 100644 --- a/pkg/mapper/examples/tickgen/go.mod +++ b/pkg/mapper/examples/tickgen/go.mod @@ -2,7 +2,9 @@ module tickgen go 1.20 -require github.com/numaproj/numaflow-go v0.6.0 +replace github.com/numaproj/numaflow-go => ../../../.. + +require github.com/numaproj/numaflow-go v0.6.1-0.20240221033908-7c1198bc89f1 require ( github.com/golang/protobuf v1.5.3 // indirect diff --git a/pkg/mapper/examples/tickgen/go.sum b/pkg/mapper/examples/tickgen/go.sum index 8b1ed758..95c8479a 100644 --- a/pkg/mapper/examples/tickgen/go.sum +++ b/pkg/mapper/examples/tickgen/go.sum @@ -4,8 +4,6 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/numaproj/numaflow-go v0.6.0 h1:gqTX1u1pFJJhX/3l3zYM8aLqRSHEainYrgBIollL0js= -github.com/numaproj/numaflow-go v0.6.0/go.mod h1:5zwvvREIbqaCPCKsNE1MVjVToD0kvkCh2Z90Izlhw5U= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= diff --git a/pkg/mapstreamer/examples/flatmap_stream/Makefile b/pkg/mapstreamer/examples/flatmap_stream/Makefile index 6e582a32..8f7b8966 100644 --- a/pkg/mapstreamer/examples/flatmap_stream/Makefile +++ b/pkg/mapstreamer/examples/flatmap_stream/Makefile @@ -4,7 +4,7 @@ build: .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/map-flatmap-stream:v0.6.1" --target flatmap_stream . + docker build -t "quay.io/numaio/numaflow-go/map-flatmap-stream:stable" --target flatmap_stream . clean: -rm -rf ./dist diff --git a/pkg/mapstreamer/examples/flatmap_stream/go.mod b/pkg/mapstreamer/examples/flatmap_stream/go.mod index 674fd116..05f60e9a 100644 --- a/pkg/mapstreamer/examples/flatmap_stream/go.mod +++ b/pkg/mapstreamer/examples/flatmap_stream/go.mod @@ -2,7 +2,9 @@ module flatmap_stream go 1.20 -require github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069 +replace github.com/numaproj/numaflow-go => ../../../.. + +require github.com/numaproj/numaflow-go v0.6.1-0.20240221033908-7c1198bc89f1 require ( github.com/golang/protobuf v1.5.3 // indirect diff --git a/pkg/mapstreamer/examples/flatmap_stream/go.sum b/pkg/mapstreamer/examples/flatmap_stream/go.sum index dd3945cb..95c8479a 100644 --- a/pkg/mapstreamer/examples/flatmap_stream/go.sum +++ b/pkg/mapstreamer/examples/flatmap_stream/go.sum @@ -4,8 +4,6 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069 h1:LBMIrUytoxuZazEnwxo+WPAxjHL1rrVhphTyByLiDYY= -github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069/go.mod h1:WoMt31+h3up202zTRI8c/qe42B8UbvwLe2mJH0MAlhI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= diff --git a/pkg/reducer/examples/counter/Makefile b/pkg/reducer/examples/counter/Makefile index a757ae4b..b04f0ace 100644 --- a/pkg/reducer/examples/counter/Makefile +++ b/pkg/reducer/examples/counter/Makefile @@ -4,7 +4,7 @@ build: .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/reduce-counter:v0.6.1" --target counter . + docker build -t "quay.io/numaio/numaflow-go/reduce-counter:stable" --target counter . clean: -rm -rf ./dist diff --git a/pkg/reducer/examples/counter/go.mod b/pkg/reducer/examples/counter/go.mod index a9a885a9..a185a623 100644 --- a/pkg/reducer/examples/counter/go.mod +++ b/pkg/reducer/examples/counter/go.mod @@ -2,7 +2,9 @@ module counter go 1.20 -require github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069 +replace github.com/numaproj/numaflow-go => ../../../.. + +require github.com/numaproj/numaflow-go v0.6.1-0.20240221033908-7c1198bc89f1 require ( github.com/golang/protobuf v1.5.3 // indirect diff --git a/pkg/reducer/examples/counter/go.sum b/pkg/reducer/examples/counter/go.sum index d8cad981..ab002170 100644 --- a/pkg/reducer/examples/counter/go.sum +++ b/pkg/reducer/examples/counter/go.sum @@ -4,8 +4,6 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069 h1:LBMIrUytoxuZazEnwxo+WPAxjHL1rrVhphTyByLiDYY= -github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069/go.mod h1:WoMt31+h3up202zTRI8c/qe42B8UbvwLe2mJH0MAlhI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= diff --git a/pkg/reducer/examples/sum/Makefile b/pkg/reducer/examples/sum/Makefile index 47437cb4..f3e9e8d1 100644 --- a/pkg/reducer/examples/sum/Makefile +++ b/pkg/reducer/examples/sum/Makefile @@ -4,7 +4,7 @@ build: .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/reduce-sum:v0.6.1" --target sum . + docker build -t "quay.io/numaio/numaflow-go/reduce-sum:stable" --target sum . clean: -rm -rf ./dist diff --git a/pkg/reducer/examples/sum/go.mod b/pkg/reducer/examples/sum/go.mod index 7dc7c35c..208c27bf 100644 --- a/pkg/reducer/examples/sum/go.mod +++ b/pkg/reducer/examples/sum/go.mod @@ -2,7 +2,9 @@ module sum go 1.20 -require github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069 +replace github.com/numaproj/numaflow-go => ../../../.. + +require github.com/numaproj/numaflow-go v0.6.1-0.20240221033908-7c1198bc89f1 require ( github.com/golang/protobuf v1.5.3 // indirect diff --git a/pkg/reducer/examples/sum/go.sum b/pkg/reducer/examples/sum/go.sum index d8cad981..ab002170 100644 --- a/pkg/reducer/examples/sum/go.sum +++ b/pkg/reducer/examples/sum/go.sum @@ -4,8 +4,6 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069 h1:LBMIrUytoxuZazEnwxo+WPAxjHL1rrVhphTyByLiDYY= -github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069/go.mod h1:WoMt31+h3up202zTRI8c/qe42B8UbvwLe2mJH0MAlhI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= diff --git a/pkg/reducestreamer/examples/counter/Makefile b/pkg/reducestreamer/examples/counter/Makefile index ffe3036c..bc6e4c4d 100644 --- a/pkg/reducestreamer/examples/counter/Makefile +++ b/pkg/reducestreamer/examples/counter/Makefile @@ -4,7 +4,7 @@ build: .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/reduce-stream-counter:v0.5.3" --target counter . + docker build -t "quay.io/numaio/numaflow-go/reduce-stream-counter:stable" --target counter . clean: -rm -rf ./dist diff --git a/pkg/reducestreamer/examples/counter/go.mod b/pkg/reducestreamer/examples/counter/go.mod index 21d79eb1..a185a623 100644 --- a/pkg/reducestreamer/examples/counter/go.mod +++ b/pkg/reducestreamer/examples/counter/go.mod @@ -2,7 +2,9 @@ module counter go 1.20 -require github.com/numaproj/numaflow-go v0.6.1-0.20231219080635-d096c415a42f +replace github.com/numaproj/numaflow-go => ../../../.. + +require github.com/numaproj/numaflow-go v0.6.1-0.20240221033908-7c1198bc89f1 require ( github.com/golang/protobuf v1.5.3 // indirect diff --git a/pkg/reducestreamer/examples/counter/go.sum b/pkg/reducestreamer/examples/counter/go.sum index 32cb64f7..ab002170 100644 --- a/pkg/reducestreamer/examples/counter/go.sum +++ b/pkg/reducestreamer/examples/counter/go.sum @@ -4,10 +4,6 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/numaproj/numaflow-go v0.5.3-0.20231211071430-1231c4c278e0 h1:aX6z3AIiJzA0XySqAZhP5ytZDZ3jcsQQnL81HP5mipU= -github.com/numaproj/numaflow-go v0.5.3-0.20231211071430-1231c4c278e0/go.mod h1:WoMt31+h3up202zTRI8c/qe42B8UbvwLe2mJH0MAlhI= -github.com/numaproj/numaflow-go v0.6.1-0.20231219080635-d096c415a42f h1:J43ekeRVzE6WGgkWl5oEQ+c4NT1i4VikMkygu4AeUYE= -github.com/numaproj/numaflow-go v0.6.1-0.20231219080635-d096c415a42f/go.mod h1:WoMt31+h3up202zTRI8c/qe42B8UbvwLe2mJH0MAlhI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= diff --git a/pkg/reducestreamer/examples/sum/Makefile b/pkg/reducestreamer/examples/sum/Makefile index d2bbf56e..9cf335b6 100644 --- a/pkg/reducestreamer/examples/sum/Makefile +++ b/pkg/reducestreamer/examples/sum/Makefile @@ -4,7 +4,7 @@ build: .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/reduce-stream-sum:v0.6.1" --target sum . + docker build -t "quay.io/numaio/numaflow-go/reduce-stream-sum:stable" --target sum . clean: -rm -rf ./dist diff --git a/pkg/reducestreamer/examples/sum/go.mod b/pkg/reducestreamer/examples/sum/go.mod index 7dc7c35c..208c27bf 100644 --- a/pkg/reducestreamer/examples/sum/go.mod +++ b/pkg/reducestreamer/examples/sum/go.mod @@ -2,7 +2,9 @@ module sum go 1.20 -require github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069 +replace github.com/numaproj/numaflow-go => ../../../.. + +require github.com/numaproj/numaflow-go v0.6.1-0.20240221033908-7c1198bc89f1 require ( github.com/golang/protobuf v1.5.3 // indirect diff --git a/pkg/reducestreamer/examples/sum/go.sum b/pkg/reducestreamer/examples/sum/go.sum index d8cad981..ab002170 100644 --- a/pkg/reducestreamer/examples/sum/go.sum +++ b/pkg/reducestreamer/examples/sum/go.sum @@ -4,8 +4,6 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069 h1:LBMIrUytoxuZazEnwxo+WPAxjHL1rrVhphTyByLiDYY= -github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069/go.mod h1:WoMt31+h3up202zTRI8c/qe42B8UbvwLe2mJH0MAlhI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= diff --git a/pkg/sessionreducer/examples/counter/Makefile b/pkg/sessionreducer/examples/counter/Makefile index eb4555da..19c37944 100644 --- a/pkg/sessionreducer/examples/counter/Makefile +++ b/pkg/sessionreducer/examples/counter/Makefile @@ -4,7 +4,7 @@ build: .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/session-counter:v0.6.1" --target counter . + docker build -t "quay.io/numaio/numaflow-go/session-counter:stable" --target counter . clean: -rm -rf ./dist diff --git a/pkg/sessionreducer/examples/counter/go.mod b/pkg/sessionreducer/examples/counter/go.mod index 52677083..cbce3830 100644 --- a/pkg/sessionreducer/examples/counter/go.mod +++ b/pkg/sessionreducer/examples/counter/go.mod @@ -2,8 +2,10 @@ module counter go 1.20 +replace github.com/numaproj/numaflow-go => ../../../.. + require ( - github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069 + github.com/numaproj/numaflow-go v0.6.1-0.20240221033908-7c1198bc89f1 go.uber.org/atomic v1.11.0 ) diff --git a/pkg/sessionreducer/examples/counter/go.sum b/pkg/sessionreducer/examples/counter/go.sum index 59ce47da..e5697aab 100644 --- a/pkg/sessionreducer/examples/counter/go.sum +++ b/pkg/sessionreducer/examples/counter/go.sum @@ -4,8 +4,6 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069 h1:LBMIrUytoxuZazEnwxo+WPAxjHL1rrVhphTyByLiDYY= -github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069/go.mod h1:WoMt31+h3up202zTRI8c/qe42B8UbvwLe2mJH0MAlhI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= diff --git a/pkg/sideinput/examples/simple-sideinput/Makefile b/pkg/sideinput/examples/simple-sideinput/Makefile index 97db7739..21426717 100644 --- a/pkg/sideinput/examples/simple-sideinput/Makefile +++ b/pkg/sideinput/examples/simple-sideinput/Makefile @@ -4,7 +4,7 @@ build: .PHONY: image image: build - docker buildx build -t "quay.io/numaio/numaflow-go/sideinput-example:v0.6.0" --platform linux/amd64,linux/arm64 --target sideinput . --push + docker buildx build -t "quay.io/numaio/numaflow-go/sideinput-example:stable" --platform linux/amd64,linux/arm64 --target sideinput . --push clean: -rm -rf ./dist diff --git a/pkg/sideinput/examples/simple-sideinput/go.mod b/pkg/sideinput/examples/simple-sideinput/go.mod index 64056201..b2c3daa2 100644 --- a/pkg/sideinput/examples/simple-sideinput/go.mod +++ b/pkg/sideinput/examples/simple-sideinput/go.mod @@ -2,7 +2,9 @@ module sideinput go 1.20 -require github.com/numaproj/numaflow-go v0.6.0 +replace github.com/numaproj/numaflow-go => ../../../.. + +require github.com/numaproj/numaflow-go v0.6.1-0.20240221033908-7c1198bc89f1 require ( github.com/golang/protobuf v1.5.3 // indirect diff --git a/pkg/sideinput/examples/simple-sideinput/go.sum b/pkg/sideinput/examples/simple-sideinput/go.sum index 8b1ed758..95c8479a 100644 --- a/pkg/sideinput/examples/simple-sideinput/go.sum +++ b/pkg/sideinput/examples/simple-sideinput/go.sum @@ -4,8 +4,6 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/numaproj/numaflow-go v0.6.0 h1:gqTX1u1pFJJhX/3l3zYM8aLqRSHEainYrgBIollL0js= -github.com/numaproj/numaflow-go v0.6.0/go.mod h1:5zwvvREIbqaCPCKsNE1MVjVToD0kvkCh2Z90Izlhw5U= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= diff --git a/pkg/sideinput/examples/simple-sideinput/udf/Makefile b/pkg/sideinput/examples/simple-sideinput/udf/Makefile index 688d5f51..eb1456c0 100644 --- a/pkg/sideinput/examples/simple-sideinput/udf/Makefile +++ b/pkg/sideinput/examples/simple-sideinput/udf/Makefile @@ -5,7 +5,7 @@ build: .PHONY: image #To build an image that supports multiple platforms(linux/amd64,linux/arm64) and push to quay.io, use the following command image: build - docker buildx build -t "quay.io/numaio/numaflow-go/udf-sideinput-example:v0.6.0" --platform linux/amd64,linux/arm64 --target udf-sideinput . --push + docker buildx build -t "quay.io/numaio/numaflow-go/udf-sideinput-example:stable" --platform linux/amd64,linux/arm64 --target udf-sideinput . --push diff --git a/pkg/sideinput/examples/simple-sideinput/udf/go.mod b/pkg/sideinput/examples/simple-sideinput/udf/go.mod index 261a985d..b2e9caea 100644 --- a/pkg/sideinput/examples/simple-sideinput/udf/go.mod +++ b/pkg/sideinput/examples/simple-sideinput/udf/go.mod @@ -2,9 +2,11 @@ module even_odd go 1.20 +replace github.com/numaproj/numaflow-go => ../../../../.. + require ( github.com/fsnotify/fsnotify v1.6.0 - github.com/numaproj/numaflow-go v0.6.0 + github.com/numaproj/numaflow-go v0.6.1-0.20240221033908-7c1198bc89f1 ) require ( diff --git a/pkg/sideinput/examples/simple-sideinput/udf/go.sum b/pkg/sideinput/examples/simple-sideinput/udf/go.sum index 66525120..bfde5735 100644 --- a/pkg/sideinput/examples/simple-sideinput/udf/go.sum +++ b/pkg/sideinput/examples/simple-sideinput/udf/go.sum @@ -6,8 +6,6 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/numaproj/numaflow-go v0.6.0 h1:gqTX1u1pFJJhX/3l3zYM8aLqRSHEainYrgBIollL0js= -github.com/numaproj/numaflow-go v0.6.0/go.mod h1:5zwvvREIbqaCPCKsNE1MVjVToD0kvkCh2Z90Izlhw5U= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= diff --git a/pkg/sinker/examples/log/Makefile b/pkg/sinker/examples/log/Makefile index 658ac873..37e42e94 100644 --- a/pkg/sinker/examples/log/Makefile +++ b/pkg/sinker/examples/log/Makefile @@ -4,7 +4,7 @@ build: .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/sink-log:v0.6.1" --target log . + docker build -t "quay.io/numaio/numaflow-go/sink-log:stable" --target log . clean: -rm -rf ./dist diff --git a/pkg/sinker/examples/log/go.mod b/pkg/sinker/examples/log/go.mod index 47d1938b..a22cf0f9 100644 --- a/pkg/sinker/examples/log/go.mod +++ b/pkg/sinker/examples/log/go.mod @@ -2,7 +2,9 @@ module log_sink go 1.20 -require github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069 +replace github.com/numaproj/numaflow-go => ../../../.. + +require github.com/numaproj/numaflow-go v0.6.1-0.20240221033908-7c1198bc89f1 require ( github.com/golang/protobuf v1.5.3 // indirect diff --git a/pkg/sinker/examples/log/go.sum b/pkg/sinker/examples/log/go.sum index dd3945cb..95c8479a 100644 --- a/pkg/sinker/examples/log/go.sum +++ b/pkg/sinker/examples/log/go.sum @@ -4,8 +4,6 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069 h1:LBMIrUytoxuZazEnwxo+WPAxjHL1rrVhphTyByLiDYY= -github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069/go.mod h1:WoMt31+h3up202zTRI8c/qe42B8UbvwLe2mJH0MAlhI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= diff --git a/pkg/sourcer/examples/simple_source/Makefile b/pkg/sourcer/examples/simple_source/Makefile index ec7ccab7..61c35287 100644 --- a/pkg/sourcer/examples/simple_source/Makefile +++ b/pkg/sourcer/examples/simple_source/Makefile @@ -4,7 +4,7 @@ build: .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/source-simple-source:v0.6.1" --target simple-source . + docker build -t "quay.io/numaio/numaflow-go/source-simple-source:stable" --target simple-source . clean: -rm -rf ./dist diff --git a/pkg/sourcer/examples/simple_source/go.mod b/pkg/sourcer/examples/simple_source/go.mod index eda575ea..5eb180a0 100644 --- a/pkg/sourcer/examples/simple_source/go.mod +++ b/pkg/sourcer/examples/simple_source/go.mod @@ -2,8 +2,10 @@ module simple_source go 1.20 +replace github.com/numaproj/numaflow-go => ../../../.. + require ( - github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069 + github.com/numaproj/numaflow-go v0.6.1-0.20240221033908-7c1198bc89f1 github.com/stretchr/testify v1.8.1 ) diff --git a/pkg/sourcer/examples/simple_source/go.sum b/pkg/sourcer/examples/simple_source/go.sum index edd3216e..0eb6ac02 100644 --- a/pkg/sourcer/examples/simple_source/go.sum +++ b/pkg/sourcer/examples/simple_source/go.sum @@ -10,8 +10,6 @@ github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069 h1:LBMIrUytoxuZazEnwxo+WPAxjHL1rrVhphTyByLiDYY= -github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069/go.mod h1:WoMt31+h3up202zTRI8c/qe42B8UbvwLe2mJH0MAlhI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= diff --git a/pkg/sourcetransformer/examples/assign_event_time/Makefile b/pkg/sourcetransformer/examples/assign_event_time/Makefile index 5b6c5a68..34a183ef 100644 --- a/pkg/sourcetransformer/examples/assign_event_time/Makefile +++ b/pkg/sourcetransformer/examples/assign_event_time/Makefile @@ -4,7 +4,7 @@ build: .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/mapt-assign-event-time:v0.6.0" --target assign-event-time . + docker build -t "quay.io/numaio/numaflow-go/mapt-assign-event-time:stable" --target assign-event-time . clean: -rm -rf ./dist diff --git a/pkg/sourcetransformer/examples/assign_event_time/go.mod b/pkg/sourcetransformer/examples/assign_event_time/go.mod index 21f42aa5..72254972 100644 --- a/pkg/sourcetransformer/examples/assign_event_time/go.mod +++ b/pkg/sourcetransformer/examples/assign_event_time/go.mod @@ -2,7 +2,9 @@ module assign_event_time go 1.20 -require github.com/numaproj/numaflow-go v0.6.0 +replace github.com/numaproj/numaflow-go => ../../../.. + +require github.com/numaproj/numaflow-go v0.6.1-0.20240221033908-7c1198bc89f1 require ( github.com/golang/protobuf v1.5.3 // indirect diff --git a/pkg/sourcetransformer/examples/assign_event_time/go.sum b/pkg/sourcetransformer/examples/assign_event_time/go.sum index 8b1ed758..95c8479a 100644 --- a/pkg/sourcetransformer/examples/assign_event_time/go.sum +++ b/pkg/sourcetransformer/examples/assign_event_time/go.sum @@ -4,8 +4,6 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/numaproj/numaflow-go v0.6.0 h1:gqTX1u1pFJJhX/3l3zYM8aLqRSHEainYrgBIollL0js= -github.com/numaproj/numaflow-go v0.6.0/go.mod h1:5zwvvREIbqaCPCKsNE1MVjVToD0kvkCh2Z90Izlhw5U= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= diff --git a/pkg/sourcetransformer/examples/event_time_filter/Makefile b/pkg/sourcetransformer/examples/event_time_filter/Makefile index 0dc50ba6..b94f3144 100644 --- a/pkg/sourcetransformer/examples/event_time_filter/Makefile +++ b/pkg/sourcetransformer/examples/event_time_filter/Makefile @@ -4,7 +4,7 @@ build: .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/mapt-event-time-filter:v0.6.1" --target event-time-filter . + docker build -t "quay.io/numaio/numaflow-go/mapt-event-time-filter:stable" --target event-time-filter . clean: -rm -rf ./dist diff --git a/pkg/sourcetransformer/examples/event_time_filter/go.mod b/pkg/sourcetransformer/examples/event_time_filter/go.mod index 9536879a..c2f33951 100644 --- a/pkg/sourcetransformer/examples/event_time_filter/go.mod +++ b/pkg/sourcetransformer/examples/event_time_filter/go.mod @@ -2,8 +2,10 @@ module event_time_filter go 1.20 +replace github.com/numaproj/numaflow-go => ../../../.. + require ( - github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069 + github.com/numaproj/numaflow-go v0.6.1-0.20240221033908-7c1198bc89f1 github.com/stretchr/testify v1.8.1 ) diff --git a/pkg/sourcetransformer/examples/event_time_filter/go.sum b/pkg/sourcetransformer/examples/event_time_filter/go.sum index e8805fbb..3db6e45f 100644 --- a/pkg/sourcetransformer/examples/event_time_filter/go.sum +++ b/pkg/sourcetransformer/examples/event_time_filter/go.sum @@ -10,8 +10,6 @@ github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069 h1:LBMIrUytoxuZazEnwxo+WPAxjHL1rrVhphTyByLiDYY= -github.com/numaproj/numaflow-go v0.6.1-0.20240212202512-715955f1e069/go.mod h1:WoMt31+h3up202zTRI8c/qe42B8UbvwLe2mJH0MAlhI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= diff --git a/update_examples.sh b/update_examples.sh new file mode 100755 index 00000000..09b9fdbe --- /dev/null +++ b/update_examples.sh @@ -0,0 +1,87 @@ +#!/bin/bash + +function show_help () { + echo "Usage: $0 [-h|--help] (-b|--build | -c|--commit-sha )" + echo " -h, --help Display help message and exit" + echo " -b, --build Build the docker images of all the examples" + echo " -c, --commit-sha Update all of the examples to depend on the numaflow-go version with the specified SHA or version" +} + +function traverse_examples () { + find pkg -name "go.mod" | while read -r line; + do + dir="$(dirname "${line}")" + cd "$dir" || exit + + for command in "$@" + do + if ! $command; then + echo "Error: failed $command in $dir" >&2 + exit 1 + fi + done + + cd ~- || exit + done +} + +if [ $# -eq 0 ]; then + echo "Error: provide at least one argument" >&2 + show_help + exit 1 +fi + +usingHelp=0 +usingBuild=0 +usingSHA=0 +commit_sha="" + +function handle_options () { + while [ $# -gt 0 ]; do + case "$1" in + -h | --help) + usingHelp=1 + ;; + -b | --build) + usingBuild=1 + ;; + -c | --commit-sha) + usingSHA=1 + if [ -z "$2" ]; then + echo "Commit SHA or version not specified." >&2 + show_help + exit 1 + fi + + commit_sha=$2 + shift + ;; + *) + echo "Invalid option: $1" >&2 + show_help + exit 1 + ;; + esac + shift + done +} + +handle_options "$@" + +if (( usingBuild + usingSHA + usingHelp > 1 )); then + echo "Only one of '-h', '-b', '-c' is allowed at a time" >&2 + show_help + exit 1 +fi + +if [ -n "$commit_sha" ]; then + echo "Will update to: $commit_sha" +fi + +if (( usingBuild )); then + traverse_examples "make image" +elif (( usingSHA )); then + traverse_examples "go get github.com/numaproj/numaflow-go@$commit_sha" "go mod tidy" +elif (( usingHelp )); then + show_help +fi