Skip to content

Commit 146e3bc

Browse files
committed
Fix bundled plugins not loading correctly
1 parent 1dbd552 commit 146e3bc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

trino/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,12 @@ RUN --mount=type=cache,target=/root/.m2/repository cd "trino-server-${PRODUCT}-s
5757
RUN tar -xzf /stackable/trino-server-${PRODUCT}-src/core/trino-server/target/trino-server-${PRODUCT}.tar.gz -C /stackable && \
5858
chown --recursive stackable /stackable/trino-server-${PRODUCT}
5959

60-
COPY --from=storage-connector-builder /stackable/trino-storage-${STORAGE_CONNECTOR}-src/target/trino-storage-${STORAGE_CONNECTOR} /stackable/trino-server-${PRODUCT}/plugin
60+
COPY --from=storage-connector-builder /stackable/trino-storage-${STORAGE_CONNECTOR}-src/target/trino-storage-${STORAGE_CONNECTOR} /stackable/trino-server-${PRODUCT}/plugin/trino-storage-${STORAGE_CONNECTOR}
6161
# # TODO: remove the following COPY statement once Trino versions 414 and 428 are removed
62-
COPY --from=opa-authorizer-builder /stackable/trino-opa-authorizer-${PRODUCT}-${OPA_AUTHORIZER}-src/target/out /stackable/trino-server/plugin/trino-opa-authorizer-${PRODUCT}-${OPA_AUTHORIZER}
62+
COPY --from=opa-authorizer-builder /stackable/trino-opa-authorizer-${PRODUCT}-${OPA_AUTHORIZER}-src/target/out /stackable/trino-server-${PRODUCT}/plugin/trino-opa-authorizer-${PRODUCT}-${OPA_AUTHORIZER}
63+
# We have no way to copy a folder conditionally, so delete the opa authorizer folder if no version is selected
64+
# Otherwise Trino will crash since empty plugin folders are not allowed
65+
RUN [ -n "${OPA_AUTHORIZER}" ] || rmdir /stackable/trino-server-${PRODUCT}/plugin/trino-opa-authorizer-${PRODUCT}-${OPA_AUTHORIZER}
6366

6467
# For earlier versions this script removes the .class file that contains the
6568
# vulnerable code.

0 commit comments

Comments
 (0)