Skip to content

Commit d932f8b

Browse files
authored
Fix Dockerfile COPY to handle multi-hyphen operator names (#179)
## Purpose <!-- Describe the intention of the changes being proposed. What problem does it solve or functionality does it add? --> * This change is to fix the Rust operator Dockerfile template to correctly convert all hyphens to underscores when copying the compiled WASM artifact if operator name contains hyphens. ## Does this introduce a breaking change? <!-- Mark one with an "x". --> ``` [ ] Yes [x] No ``` ## Pull Request Type What kind of change does this Pull Request introduce? Verified with operator names containing multiple hyphens. <!-- Please check the one that applies to this PR using "x". --> ``` [x] Bugfix [ ] Feature [ ] Code style update (formatting, local variables) [ ] Refactoring (no functional changes, no api changes) [ ] Documentation content changes [ ] Other... Please describe: ``` ## How to Test * Create Rust operators manually by copying Dockerfile but without using vscode extension command, the operator's name may contain hyphens. * Build and debug the operators. ## What to Check Verify that the following are valid * The lldb debugger should stop the breakpoint set in the wasm operator. ## Other Information <!-- Add any other helpful information that may be needed here. -->
1 parent b7f4133 commit d932f8b

14 files changed

Lines changed: 15 additions & 15 deletions

File tree

samples/wasm/operators/collection/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ RUN if [ "${BUILD_MODE}" = "release" ]; then \
2121
FROM scratch
2222
ARG BUILD_MODE
2323
ARG APP_NAME
24-
COPY --from=operator-build "/src/${APP_NAME}/target/wasm32-wasip2/${BUILD_MODE}/${APP_NAME/-/_}.wasm" "${APP_NAME//_/-}.wasm"
24+
COPY --from=operator-build "/src/${APP_NAME}/target/wasm32-wasip2/${BUILD_MODE}/${APP_NAME//-/_}.wasm" "${APP_NAME}.wasm"
2525
ENTRYPOINT [ "${APP_NAME}.wasm" ]

samples/wasm/operators/enrichment/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ RUN if [ "${BUILD_MODE}" = "release" ]; then \
2121
FROM scratch
2222
ARG BUILD_MODE
2323
ARG APP_NAME
24-
COPY --from=operator-build "/src/${APP_NAME}/target/wasm32-wasip2/${BUILD_MODE}/${APP_NAME/-/_}.wasm" "${APP_NAME//_/-}.wasm"
24+
COPY --from=operator-build "/src/${APP_NAME}/target/wasm32-wasip2/${BUILD_MODE}/${APP_NAME//-/_}.wasm" "${APP_NAME}.wasm"
2525
ENTRYPOINT [ "${APP_NAME}.wasm" ]

samples/wasm/operators/format/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ RUN if [ "${BUILD_MODE}" = "release" ]; then \
2121
FROM scratch
2222
ARG BUILD_MODE
2323
ARG APP_NAME
24-
COPY --from=operator-build "/src/${APP_NAME}/target/wasm32-wasip2/${BUILD_MODE}/${APP_NAME/-/_}.wasm" "${APP_NAME//_/-}.wasm"
24+
COPY --from=operator-build "/src/${APP_NAME}/target/wasm32-wasip2/${BUILD_MODE}/${APP_NAME//-/_}.wasm" "${APP_NAME}.wasm"
2525
ENTRYPOINT [ "${APP_NAME}.wasm" ]

samples/wasm/operators/humidity/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ RUN if [ "${BUILD_MODE}" = "release" ]; then \
2121
FROM scratch
2222
ARG BUILD_MODE
2323
ARG APP_NAME
24-
COPY --from=operator-build "/src/${APP_NAME}/target/wasm32-wasip2/${BUILD_MODE}/${APP_NAME/-/_}.wasm" "${APP_NAME//_/-}.wasm"
24+
COPY --from=operator-build "/src/${APP_NAME}/target/wasm32-wasip2/${BUILD_MODE}/${APP_NAME//-/_}.wasm" "${APP_NAME}.wasm"
2525
ENTRYPOINT [ "${APP_NAME}.wasm" ]

samples/wasm/operators/opc-ua/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ RUN if [ "${BUILD_MODE}" = "release" ]; then \
2121
FROM scratch
2222
ARG BUILD_MODE
2323
ARG APP_NAME
24-
COPY --from=operator-build "/src/${APP_NAME}/target/wasm32-wasip2/${BUILD_MODE}/${APP_NAME/-/_}.wasm" "${APP_NAME//_/-}.wasm"
24+
COPY --from=operator-build "/src/${APP_NAME}/target/wasm32-wasip2/${BUILD_MODE}/${APP_NAME//-/_}.wasm" "${APP_NAME}.wasm"
2525
ENTRYPOINT [ "${APP_NAME}.wasm" ]

samples/wasm/operators/otel-enrich/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ RUN if [ "${BUILD_MODE}" = "release" ]; then \
2121
FROM scratch
2222
ARG BUILD_MODE
2323
ARG APP_NAME
24-
COPY --from=operator-build "/src/${APP_NAME}/target/wasm32-wasip2/${BUILD_MODE}/${APP_NAME/-/_}.wasm" "${APP_NAME//_/-}.wasm"
24+
COPY --from=operator-build "/src/${APP_NAME}/target/wasm32-wasip2/${BUILD_MODE}/${APP_NAME//-/_}.wasm" "${APP_NAME}.wasm"
2525
ENTRYPOINT [ "${APP_NAME}.wasm" ]

samples/wasm/operators/otel-transform/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ RUN if [ "${BUILD_MODE}" = "release" ]; then \
2121
FROM scratch
2222
ARG BUILD_MODE
2323
ARG APP_NAME
24-
COPY --from=operator-build "/src/${APP_NAME}/target/wasm32-wasip2/${BUILD_MODE}/${APP_NAME/-/_}.wasm" "${APP_NAME//_/-}.wasm"
24+
COPY --from=operator-build "/src/${APP_NAME}/target/wasm32-wasip2/${BUILD_MODE}/${APP_NAME//-/_}.wasm" "${APP_NAME}.wasm"
2525
ENTRYPOINT [ "${APP_NAME}.wasm" ]

samples/wasm/operators/snapshot/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ RUN if [ "${BUILD_MODE}" = "release" ]; then \
2222
FROM scratch
2323
ARG BUILD_MODE
2424
ARG APP_NAME
25-
COPY --from=operator-build "/src/${APP_NAME}/target/wasm32-wasip2/${BUILD_MODE}/${APP_NAME/-/_}.wasm" "${APP_NAME//_/-}.wasm"
25+
COPY --from=operator-build "/src/${APP_NAME}/target/wasm32-wasip2/${BUILD_MODE}/${APP_NAME//-/_}.wasm" "${APP_NAME}.wasm"
2626
ENTRYPOINT [ "${APP_NAME}.wasm" ]

samples/wasm/operators/temperature/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ RUN if [ "${BUILD_MODE}" = "release" ]; then \
2121
FROM scratch
2222
ARG BUILD_MODE
2323
ARG APP_NAME
24-
COPY --from=operator-build "/src/${APP_NAME}/target/wasm32-wasip2/${BUILD_MODE}/${APP_NAME/-/_}.wasm" "${APP_NAME//_/-}.wasm"
24+
COPY --from=operator-build "/src/${APP_NAME}/target/wasm32-wasip2/${BUILD_MODE}/${APP_NAME//-/_}.wasm" "${APP_NAME}.wasm"
2525
ENTRYPOINT [ "${APP_NAME}.wasm" ]

samples/wasm/operators/viconverter/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ RUN if [ "${BUILD_MODE}" = "release" ]; then \
2121
FROM scratch
2222
ARG BUILD_MODE
2323
ARG APP_NAME
24-
COPY --from=operator-build "/src/${APP_NAME}/target/wasm32-wasip2/${BUILD_MODE}/${APP_NAME/-/_}.wasm" "${APP_NAME//_/-}.wasm"
24+
COPY --from=operator-build "/src/${APP_NAME}/target/wasm32-wasip2/${BUILD_MODE}/${APP_NAME//-/_}.wasm" "${APP_NAME}.wasm"
2525
ENTRYPOINT [ "${APP_NAME}.wasm" ]

0 commit comments

Comments
 (0)