kriti-sc commented on code in PR #3658:
URL: https://github.com/apache/iggy/pull/3658#discussion_r3747841271


##########
core/connectors/runtime/Dockerfile:
##########
@@ -82,28 +92,40 @@ RUN 
--mount=type=cache,target=/usr/local/cargo/registry,id=cargo-registry-${TARG
     "linux/arm64:glibc") RUST_TARGET="aarch64-unknown-linux-gnu" ;; \
     *) echo "Unsupported platform/libc combination: $TARGETPLATFORM/$LIBC" && 
exit 1 ;; \
     esac && \
-    if [ "$PROFILE" = "debug" ]; then \
-    cargo zigbuild --locked --target ${RUST_TARGET} --bin iggy-connectors && \
-    cp /app/target/${RUST_TARGET}/debug/iggy-connectors /app/iggy-connectors; \
-    else \
-    cargo zigbuild --locked --target ${RUST_TARGET} --bin iggy-connectors 
--release && \
-    cp /app/target/${RUST_TARGET}/release/iggy-connectors 
/app/iggy-connectors; \
-    fi
+    PLUGIN_FLAGS="$(sed 's/^/-p /' connector-plugins.txt | tr '\n' ' ')" && \
+    if [ "$PROFILE" = "debug" ]; then PROFILE_DIR=debug; PROFILE_FLAG=""; else 
PROFILE_DIR=release; PROFILE_FLAG="--release"; fi && \
+    cargo zigbuild --locked --target ${RUST_TARGET} -p iggy-connectors 
$PLUGIN_FLAGS $PROFILE_FLAG && \
+    cp /app/target/${RUST_TARGET}/${PROFILE_DIR}/iggy-connectors 
/app/iggy-connectors && \
+    mkdir -p /app/plugins && \
+    while IFS= read -r name; do \
+      [ -z "$name" ] && continue; \
+      so_file="/app/target/${RUST_TARGET}/${PROFILE_DIR}/lib${name}.so"; \
+      if [ ! -f "$so_file" ]; then echo "expected plugin artifact missing: 
$so_file" >&2 && exit 1; fi; \
+      cp "$so_file" /app/plugins/; \
+    done < connector-plugins.txt

Review Comment:
   fixed, but not in the suggested way as then every fat build would recompile 
the whole plugin set from scratch. instead, split the fat and slim flavours 
into sibling builders. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to