Skip to content

Commit b08f30f

Browse files
committed
fix: hbase operator tools / trino 476 / copy libs fix
1 parent 88e3955 commit b08f30f

File tree

14 files changed

+49
-31
lines changed

14 files changed

+49
-31
lines changed

druid/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ NEW_VERSION="${PRODUCT}-stackable${RELEASE}"
6565
mvn versions:set -DnewVersion=$NEW_VERSION
6666

6767
# Make Maven aware of custom Stackable libraries
68-
mv /stackable/patched-libs/maven /stackable/.m2/repository
68+
cp -r /stackable/patched-libs/maven/* /stackable/.m2/repository
6969

7070
# Create snapshot of the source code including custom patches
7171
tar -czf /stackable/druid-${NEW_VERSION}-src.tar.gz .

hbase/hbase-operator-tools/Dockerfile

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,37 +36,41 @@ RUN --mount=type=cache,id=maven-hbase-operator-tools-${PRODUCT},uid=${STACKABLE_
3636
cd "$(/stackable/patchable --images-repo-root=src checkout hbase/hbase-operator-tools ${HBASE_OPERATOR_TOOLS_VERSION})"
3737

3838
# Make Maven aware of custom Stackable libraries
39-
mv /stackable/patched-libs/maven /stackable/.m2/repository
39+
cp -r /stackable/patched-libs/maven/* /stackable/.m2/repository
4040

4141
ORIGINAL_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
4242
NEW_VERSION="${HBASE_OPERATOR_TOOLS_VERSION}-stackable${RELEASE}"
43+
FULL_HBASE_OPERATOR_TOOLS_VERSION="${PRODUCT}-stackable${RELEASE}" # This includes the HBase version and the Stackable release suffix
44+
PATCHED_HBASE_VERSION="${HBASE_HBASE}-stackable${RELEASE}"
4345

4446
mvn versions:set -DnewVersion=$NEW_VERSION
4547

4648
# Create snapshot of the source code including custom patches
47-
tar -czf /stackable/hbase-operator-tools-${NEW_VERSION}-src.tar.gz .
49+
tar -czf /stackable/hbase-operator-tools-${FULL_HBASE_OPERATOR_TOOLS_VERSION}-src.tar.gz .
4850

4951
mvn \
5052
--batch-mode \
5153
--no-transfer-progress \
52-
-Dhbase.version=${HBASE_HBASE}-stackable${RELEASE} \
54+
-Dhbase.version=${PATCHED_HBASE_VERSION} \
5355
-Dhbase-thirdparty.version=${HBASE_THIRDPARTY} \
5456
-DskipTests \
5557
-Dmaven.test.skip=true \
5658
package assembly:single
5759

5860
# We need the "*" here as the directory won't be the same as the final tar file for SNAPSHOTs which we currently have to use for 2.6
5961
# And we're stripping the top level directory while extracting because it may be called different than the folder name when it's a SNAPSHOT
60-
mkdir /stackable/hbase-operator-tools-${NEW_VERSION}
62+
mkdir /stackable/hbase-operator-tools-${FULL_HBASE_OPERATOR_TOOLS_VERSION}
6163
tar -xz \
6264
-f hbase-operator-tools-assembly/target/hbase-operator-tools-*-bin.tar.gz \
63-
-C /stackable/hbase-operator-tools-${NEW_VERSION}/ \
65+
-C /stackable/hbase-operator-tools-${FULL_HBASE_OPERATOR_TOOLS_VERSION}/ \
6466
--strip-components=1
6567
sed -i "s/${NEW_VERSION}/${ORIGINAL_VERSION}/g" hbase-operator-tools-assembly/target/bom.json
66-
mv hbase-operator-tools-assembly/target/bom.json /stackable/hbase-operator-tools-${NEW_VERSION}/hbase-operator-tools-${NEW_VERSION}.cdx.json
68+
mv hbase-operator-tools-assembly/target/bom.json /stackable/hbase-operator-tools-${FULL_HBASE_OPERATOR_TOOLS_VERSION}/hbase-operator-tools-${FULL_HBASE_OPERATOR_TOOLS_VERSION}.cdx.json
6769
(cd .. && rm -r ${HBASE_OPERATOR_TOOLS_VERSION})
6870

69-
envsubst '${HBASE_HBASE}:${HBASE_OPERATOR_TOOLS_VERSION}' < /stackable/bin/hbck2.env > /stackable/bin/hbck2
71+
PATCHED_HBASE_OPERATOR_TOOLS_VERSION=${NEW_VERSION}
72+
export PATCHED_HBASE_VERSION FULL_HBASE_OPERATOR_TOOLS_VERSION PATCHED_HBASE_OPERATOR_TOOLS_VERSION
73+
envsubst '${PATCHED_HBASE_VERSION}:${FULL_HBASE_OPERATOR_TOOLS_VERSION}:${PATCHED_HBASE_OPERATOR_TOOLS_VERSION}' < /stackable/bin/hbck2.env > /stackable/bin/hbck2
7074
chmod +x /stackable/bin/hbck2
7175
rm /stackable/bin/hbck2.env
7276

hbase/hbase/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ RUN --mount=type=cache,id=maven-hbase-${PRODUCT},uid=${STACKABLE_USER_UID},targe
3838
cd "$(/stackable/patchable --images-repo-root=src checkout hbase/hbase ${PRODUCT})"
3939

4040
# Make Maven aware of custom Stackable libraries
41-
mv /stackable/patched-libs/maven /stackable/.m2/repository
41+
cp -r /stackable/patched-libs/maven/* /stackable/.m2/repository
4242

4343
ORIGINAL_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
4444
NEW_VERSION="${PRODUCT}-stackable${RELEASE}"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
22

3-
exec /stackable/hbase-${PRODUCT}/bin/hbase hbck \
4-
-j /stackable/hbase-operator-tools-${HBASE_OPERATOR_TOOLS}/hbase-hbck2/hbase-hbck2-${HBASE_OPERATOR_TOOLS}.jar \
3+
exec /stackable/hbase-${PATCHED_HBASE_VERSION}/bin/hbase hbck \
4+
-j /stackable/hbase-operator-tools-${FULL_HBASE_OPERATOR_TOOLS_VERSION}/hbase-hbck2/hbase-hbck2-${PATCHED_HBASE_OPERATOR_TOOLS_VERSION}.jar \
55
"$@"

hbase/phoenix/Dockerfile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ WORKDIR /stackable
2828
RUN --mount=type=cache,id=maven-phoenix-${PRODUCT},uid=${STACKABLE_USER_UID},target=/stackable/.m2/repository <<EOF
2929

3030
# Make Maven aware of custom Stackable libraries
31-
mv /stackable/patched-libs/maven /stackable/.m2/repository
31+
cp -r /stackable/patched-libs/maven/* /stackable/.m2/repository
3232

3333
cd "$(/stackable/patchable --images-repo-root=src checkout phoenix ${PHOENIX_VERSION})"
3434

@@ -38,7 +38,7 @@ NEW_VERSION="${PHOENIX_VERSION}-stackable${RELEASE}"
3838
mvn versions:set -DnewVersion=$NEW_VERSION
3939

4040
# Create snapshot of the source code including custom patches
41-
tar -czf /stackable/phoenix-${NEW_VERSION}-src.tar.gz .
41+
tar -czf /stackable/phoenix-${PRODUCT}-stackable${RELEASE}-src.tar.gz .
4242

4343
# The Maven command can be found inside of the scripts in the create-release folder (release-util.sh as of Phoenix 5.2.0)
4444
# https://github.com/apache/phoenix/tree/5.2.0/dev/create-release
@@ -55,13 +55,14 @@ mvn \
5555

5656
# We need the "*" here as the directory won't be the same as the final tar file for SNAPSHOTs which we currently have to use for 2.6
5757
# And we're stripping the top level directory while extracting because it may be called different than the folder name when it's a SNAPSHOT
58-
mkdir /stackable/phoenix-${HBASE_PROFILE}-${NEW_VERSION}-bin
59-
tar -xz -f phoenix-assembly/target/phoenix-hbase-*-bin.tar.gz -C /stackable/phoenix-${HBASE_PROFILE}-${NEW_VERSION}-bin/ --strip-components=1
60-
mv phoenix-assembly/target/bom.json /stackable/phoenix-${HBASE_PROFILE}-${NEW_VERSION}-bin/phoenix-${HBASE_PROFILE}-${NEW_VERSION}.cdx.json
58+
mkdir /stackable/phoenix-${HBASE_PROFILE}-${PRODUCT}-stackable${RELEASE}-bin
59+
tar -xz -f phoenix-assembly/target/phoenix-hbase-*-bin.tar.gz -C /stackable/phoenix-${HBASE_PROFILE}-${PRODUCT}-stackable${RELEASE}-bin/ --strip-components=1
60+
sed -i "s/${NEW_VERSION}/${ORIGINAL_VERSION}/g" phoenix-assembly/target/bom.json
61+
mv phoenix-assembly/target/bom.json /stackable/phoenix-${HBASE_PROFILE}-${PRODUCT}-stackable${RELEASE}-bin/phoenix-${HBASE_PROFILE}-${PRODUCT}-stackable${RELEASE}.cdx.json
6162

6263
# Remove sources
6364
(cd .. && rm -r ${PHOENIX_VERSION})
64-
ln -s "/stackable/phoenix-${HBASE_PROFILE}-${NEW_VERSION}-bin" /stackable/phoenix
65+
ln -s "/stackable/phoenix-${HBASE_PROFILE}-${PRODUCT}-stackable${RELEASE}-bin" /stackable/phoenix
6566

6667
# We're removing these to make the intermediate layer smaller
6768
# This can be necessary even though it's only a builder image because the GitHub Action Runners only have very limited space available

hbase/versions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{
55
"product": "2.6.1",
66
"hbase/hbase": "2.6.1",
7-
"hbase/hbase-operator-tools": "1.3.0-fd5a5fb",
7+
"hbase/hbase-operator-tools": "1.3.0-fd5a5fb-hbase2.6.1",
88
"hbase/phoenix": "5.2.1-hbase2.6.1",
99
"hbase/hbase-opa-authorizer": "0.1.0", # only for HBase 2.6.1
1010
"hadoop": "3.3.6",
@@ -16,8 +16,8 @@
1616
{
1717
"product": "2.6.2",
1818
"hbase/hbase": "2.6.2",
19-
"hbase/hbase-operator-tools": "1.3.0-fd5a5fb",
20-
"hbase/phoenix": "5.2.1-hbase2.6.1",
19+
"hbase/hbase-operator-tools": "1.3.0-fd5a5fb-hbase2.6.2",
20+
"hbase/phoenix": "5.2.1-hbase2.6.2",
2121
"hbase/hbase-opa-authorizer": "0.1.0", # only for HBase 2.6.1
2222
"hadoop": "3.4.1",
2323
"java-base": "11",

hive/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ BUILD_SRC_DIR="$(/stackable/patchable --images-repo-root=src checkout hive ${PRO
4343
cd "$BUILD_SRC_DIR"
4444

4545
# Make Maven aware of custom Stackable libraries
46-
mv /stackable/patched-libs/maven /stackable/.m2/repository
46+
cp -r /stackable/patched-libs/maven/* /stackable/.m2/repository
4747

4848
ORIGINAL_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
4949
NEW_VERSION="${PRODUCT}-stackable${RELEASE}"

trino/storage-connector/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ USER ${STACKABLE_USER_UID}
1818

1919
# adding a hadolint ignore for SC2215, due to https://github.com/hadolint/hadolint/issues/980
2020
# hadolint ignore=SC2215
21-
RUN --mount=type=cache,id=maven-${PRODUCT},target=/stackable/.m2/repository <<EOF
21+
RUN --mount=type=cache,id=maven-${PRODUCT},target=/stackable/.m2/repository,uid=${STACKABLE_USER_UID} <<EOF
2222
cd "$(/stackable/patchable --images-repo-root=src checkout trino-storage-connector ${PRODUCT})"
2323

2424
# Make Maven aware of custom Stackable libraries
25-
cp -r /stackable/patched-libs/maven /stackable/.m2/repository
25+
cp -r /stackable/patched-libs/maven/* /stackable/.m2/repository
2626

2727
ORIGINAL_VERSION="${PRODUCT}"
2828
NEW_VERSION="${PRODUCT}-stackable${RELEASE}"

trino/storage-connector/versions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
},
1212
{
1313
"product": "476",
14+
"trino/trino": "476",
1415
"java-devel": "24",
1516
},
1617
]

trino/trino/Dockerfile

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# syntax=docker/dockerfile:1.16.0@sha256:e2dd261f92e4b763d789984f6eab84be66ab4f5f08052316d8eb8f173593acf7
22
# check=error=true
3-
43
FROM stackable/image/java-devel AS trino-builder
54

65
ARG PRODUCT
@@ -39,9 +38,22 @@ git config user.name "Fake commiter"
3938
git commit --allow-empty --message "Fake commit, so that we can create a tag"
4039
git tag ${NEW_VERSION}
4140

41+
SKIP_PROJECTS="!docs"
42+
if [ "$PRODUCT" = "470" ] || [ "$PRODUCT" = "451" ]; then
43+
SKIP_PROJECTS="$SKIP_PROJECTS,!core/trino-server-rpm"
44+
fi
45+
4246
# We need to use ./mvnw instead of mvn to get a recent maven version (which is required to build Trino)
43-
# We have to set dep.presto-jdbc-under-test explicitly, otherwise trino-test-jdbc-compatibility-old-driver depends on the original Trino dependencies
44-
./mvnw --batch-mode --no-transfer-progress install -DskipTests -Ddep.presto-jdbc-under-test=${NEW_VERSION} --projects="!docs,!core/trino-server-rpm"
47+
./mvnw \
48+
--batch-mode \
49+
--no-transfer-progress \
50+
install \
51+
`# -Dmaven.test.skip # Unable to skip test compilation without an unused dependency error for software.amazon.awssdk:identity-spi` \
52+
-DskipTests `# Skip test execution` \
53+
-Dcheckstyle.skip `# Skip checkstyle checks. We dont care if the code is properly formatted, it just wastes time` \
54+
-Dmaven.javadoc.skip=true `# Dont generate javadoc` \
55+
-Ddep.presto-jdbc-under-test=${NEW_VERSION} \
56+
--projects="$SKIP_PROJECTS"
4557

4658
mkdir -p /stackable/patched-libs/maven/io
4759
cp -r /root/.m2/repository/io/trino /stackable/patched-libs/maven/io

0 commit comments

Comments
 (0)