From 93f286441c0ad636f73c5b6d44bf796b1014bd49 Mon Sep 17 00:00:00 2001 From: Sreekanth Date: Wed, 13 Nov 2024 20:31:42 +0530 Subject: [PATCH 1/5] chore: fix sideinput-udf image build (#103) --- Cargo.toml | 2 +- examples/sideinput/Dockerfile | 2 +- examples/sideinput/udf/Cargo.toml | 8 ++------ examples/sideinput/udf/Dockerfile | 6 +++--- examples/sideinput/udf/Makefile | 4 ---- 5 files changed, 7 insertions(+), 15 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7e2e63b..8f2a864 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace] -members = ["numaflow", "examples/*"] +members = ["numaflow", "examples/*", "examples/sideinput/udf"] # Only check / build main crate by default (check all with `--workspace`) default-members = ["numaflow"] resolver = "2" diff --git a/examples/sideinput/Dockerfile b/examples/sideinput/Dockerfile index 898bc32..b43de22 100644 --- a/examples/sideinput/Dockerfile +++ b/examples/sideinput/Dockerfile @@ -11,7 +11,7 @@ WORKDIR /numaflow-rs/examples/sideinput RUN cargo build --release # our final base -FROM rust AS sideinput +FROM debian:bullseye AS sideinput # copy the build artifact from the build stage COPY --from=build /numaflow-rs/target/release/sideinput . diff --git a/examples/sideinput/udf/Cargo.toml b/examples/sideinput/udf/Cargo.toml index cabeb5c..c5ef08e 100644 --- a/examples/sideinput/udf/Cargo.toml +++ b/examples/sideinput/udf/Cargo.toml @@ -5,13 +5,9 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[[bin]] -name = "server" -path = "src/main.rs" - [dependencies] tonic = "0.10.2" tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] } -numaflow = { path = "../../../" } +numaflow = { path = "../../../numaflow" } chrono = "0.4.30" -notify = "6.1.1" \ No newline at end of file +notify = "6.1.1" diff --git a/examples/sideinput/udf/Dockerfile b/examples/sideinput/udf/Dockerfile index 1cc93ab..e247eb6 100644 --- a/examples/sideinput/udf/Dockerfile +++ b/examples/sideinput/udf/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.80-bookworm AS build +FROM rust:1.82-bullseye AS build RUN apt-get update RUN apt-get install protobuf-compiler -y @@ -14,9 +14,9 @@ RUN cargo build --release FROM debian:bookworm AS sideinput-udf # copy the build artifact from the build stage -COPY --from=build /numaflow-rs/examples/sideinput/udf/target/release/server . +COPY --from=build /numaflow-rs/target/release/sideinput-udf . RUN mkdir -p /var/numaflow/sideinputs # set the startup command to run your binary -CMD ["./server"] \ No newline at end of file +CMD ["./sideinput-udf"] diff --git a/examples/sideinput/udf/Makefile b/examples/sideinput/udf/Makefile index d6932c9..cc6a29b 100644 --- a/examples/sideinput/udf/Makefile +++ b/examples/sideinput/udf/Makefile @@ -14,7 +14,3 @@ image: update -f ${DOCKER_FILE_PATH} \ -t ${IMAGE_REGISTRY} . @if [ "$(PUSH)" = "true" ]; then docker push ${IMAGE_REGISTRY}; fi - -.PHONY: clean -clean: - -rm -rf target From 5e899bc985c495778271733e9daed00e06e131e9 Mon Sep 17 00:00:00 2001 From: Sreekanth Date: Fri, 15 Nov 2024 08:55:05 +0530 Subject: [PATCH 2/5] chore: fix image build issues Signed-off-by: Sreekanth --- examples/batchmap-flatmap/Cargo.toml | 5 ----- examples/mapt-event-time-filter/Dockerfile | 4 ++-- examples/sink-log/Cargo.toml | 4 ---- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/examples/batchmap-flatmap/Cargo.toml b/examples/batchmap-flatmap/Cargo.toml index 753d20f..440eaad 100644 --- a/examples/batchmap-flatmap/Cargo.toml +++ b/examples/batchmap-flatmap/Cargo.toml @@ -3,11 +3,6 @@ name = "batchmap-flatmap" version = "0.1.0" edition = "2021" - -[[bin]] -name = "server" -path = "src/main.rs" - [dependencies] tonic = "0.12.0" tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] } diff --git a/examples/mapt-event-time-filter/Dockerfile b/examples/mapt-event-time-filter/Dockerfile index a5f513c..2b0ce06 100644 --- a/examples/mapt-event-time-filter/Dockerfile +++ b/examples/mapt-event-time-filter/Dockerfile @@ -14,7 +14,7 @@ RUN cargo build --release FROM debian:bullseye AS mapt-event-time-filter # copy the build artifact from the build stage -COPY --from=build /numaflow-rs/target/release/mapt-event-time-filter . +COPY --from=build /numaflow-rs/target/release/source-transformer-event-time-filter . # set the startup command to run your binary -CMD ["./mapt-event-time-filter"] +CMD ["./source-transformer-event-time-filter"] diff --git a/examples/sink-log/Cargo.toml b/examples/sink-log/Cargo.toml index 6c2e002..2ac2005 100644 --- a/examples/sink-log/Cargo.toml +++ b/examples/sink-log/Cargo.toml @@ -3,10 +3,6 @@ name = "sink-log" version = "0.1.0" edition = "2021" -[[bin]] -name = "server" -path = "src/main.rs" - [dependencies] tonic = "0.12.0" tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] } From 10b34eeedf02da5cfe5d26e54e081a8858ea3d74 Mon Sep 17 00:00:00 2001 From: Sreekanth Date: Fri, 15 Nov 2024 09:05:56 +0530 Subject: [PATCH 3/5] temporily enable building all images Signed-off-by: Sreekanth --- .github/workflows/build-push.yml | 2 +- hack/update_examples.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml index b92afb7..ba48df7 100644 --- a/.github/workflows/build-push.yml +++ b/.github/workflows/build-push.yml @@ -2,7 +2,7 @@ name: Docker Publish on: push: - branches: [ main ] + branches: [ main, fix-image-builds ] tags: - '*' diff --git a/hack/update_examples.sh b/hack/update_examples.sh index 63016de..8e5ff89 100755 --- a/hack/update_examples.sh +++ b/hack/update_examples.sh @@ -78,7 +78,7 @@ fi if (( usingBuildPushExample )); then cd "./$directoryPath" || exit - if ! make image TAG="$tag" PUSH=true; then + if ! make image TAG="$tag"; then echo "Error: failed to run make image in $directoryPath" >&2 exit 1 fi From 578f504009d655d805fc3187b77f5300460bef08 Mon Sep 17 00:00:00 2001 From: Sreekanth Date: Fri, 15 Nov 2024 09:16:20 +0530 Subject: [PATCH 4/5] Revert "temporily enable building all images" This reverts commit 10b34eeedf02da5cfe5d26e54e081a8858ea3d74. --- .github/workflows/build-push.yml | 2 +- hack/update_examples.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml index ba48df7..b92afb7 100644 --- a/.github/workflows/build-push.yml +++ b/.github/workflows/build-push.yml @@ -2,7 +2,7 @@ name: Docker Publish on: push: - branches: [ main, fix-image-builds ] + branches: [ main ] tags: - '*' diff --git a/hack/update_examples.sh b/hack/update_examples.sh index 8e5ff89..63016de 100755 --- a/hack/update_examples.sh +++ b/hack/update_examples.sh @@ -78,7 +78,7 @@ fi if (( usingBuildPushExample )); then cd "./$directoryPath" || exit - if ! make image TAG="$tag"; then + if ! make image TAG="$tag" PUSH=true; then echo "Error: failed to run make image in $directoryPath" >&2 exit 1 fi From 58b8439342931fc7cbb262e5ba780b602368f42f Mon Sep 17 00:00:00 2001 From: Sreekanth Date: Fri, 15 Nov 2024 09:16:20 +0530 Subject: [PATCH 5/5] Revert "temporily enable building all images" This reverts commit 10b34eeedf02da5cfe5d26e54e081a8858ea3d74. Signed-off-by: Sreekanth --- .github/workflows/build-push.yml | 2 +- hack/update_examples.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml index ba48df7..b92afb7 100644 --- a/.github/workflows/build-push.yml +++ b/.github/workflows/build-push.yml @@ -2,7 +2,7 @@ name: Docker Publish on: push: - branches: [ main, fix-image-builds ] + branches: [ main ] tags: - '*' diff --git a/hack/update_examples.sh b/hack/update_examples.sh index 8e5ff89..63016de 100755 --- a/hack/update_examples.sh +++ b/hack/update_examples.sh @@ -78,7 +78,7 @@ fi if (( usingBuildPushExample )); then cd "./$directoryPath" || exit - if ! make image TAG="$tag"; then + if ! make image TAG="$tag" PUSH=true; then echo "Error: failed to run make image in $directoryPath" >&2 exit 1 fi