Skip to content

Commit 591452d

Browse files
authored
Slow build fix (#250)
* docker and pom reverted Docker back to openjdk:11-jre-slim Helidon-mp to 2.4.0 jdbc to 21.3.0.0 * Reorganized non-java-builds * Update non-java-builds.sh * testing * Update non-java-builds.sh * Update non-java-builds.sh * Update non-java-builds.sh * testing * Update polyglot-test.sh
1 parent 6df4dbc commit 591452d

File tree

9 files changed

+28
-14
lines changed

9 files changed

+28
-14
lines changed

grabdish/inventory-helidon-se/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ghcr.io/graalvm/graalvm-ce:21.3.0
1+
FROM openjdk:11-jre-slim
22

33
ENTRYPOINT ["java", "-jar", "/usr/share/myservice/myservice.jar"]
44

grabdish/inventory-helidon/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ghcr.io/graalvm/graalvm-ce:21.3.0
1+
FROM openjdk:11-jre-slim
22

33
ENTRYPOINT ["java", "-jar", "/usr/share/myservice/myservice.jar"]
44

grabdish/inventory-helidon/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<parent>
2424
<groupId>io.helidon.applications</groupId>
2525
<artifactId>helidon-mp</artifactId>
26-
<version>2.4.0</version>
26+
<version>2.3.1</version>
2727
<relativePath/>
2828
</parent>
2929

grabdish/inventory-python/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ RUN yum -y install oracle-release-el7 && \
1111
WORKDIR /app
1212
COPY inventory/requirements.txt .
1313
RUN yum install -y tar && \
14-
yum install -y python36 \
15-
yum install -y python36-oci-sdk && \
14+
yum install -y python36 && \
1615
rm -rf /var/cache/yum && \
1716
python3.6 -m pip install -U pip setuptools && \
1817
python3.6 -m pip install -r requirements.txt
@@ -21,4 +20,4 @@ ADD inventory .
2120
ADD common .
2221
RUN echo 'done!'
2322

24-
CMD ["gunicorn", "app:app", "--config=config.py"]
23+
CMD ["gunicorn", "app:app", "--config=config.py"]

grabdish/order-helidon/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ghcr.io/graalvm/graalvm-ce:21.3.0
1+
FROM openjdk:11-jre-slim
22

33
ENTRYPOINT ["java", "-Doracle.jdbc.Trace=true", "-jar", "/usr/share/myservice/myservice.jar"]
44

grabdish/order-helidon/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<parent>
2424
<groupId>io.helidon.applications</groupId>
2525
<artifactId>helidon-mp</artifactId>
26-
<version>2.4.0</version>
26+
<version>2.3.1</version>
2727
<relativePath/>
2828
</parent>
2929

grabdish/utils/java-builds.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ done
4545
while ! state_done JAVA_BUILDS; do
4646
for b in $BUILDS; do
4747
cd $GRABDISH_HOME/$b
48+
echo "### building $b"
4849
time ./build.sh &>> $GRABDISH_LOG/build-$b.log
4950
done
5051
state_set_done JAVA_BUILDS

grabdish/utils/non-java-builds.sh

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@
55
# Fail on error
66
set -e
77

8-
BUILDS="inventory-python inventory-nodejs inventory-dotnet inventory-go inventory-helidon-se order-mongodb-kafka inventory-postgres-kafka inventory-springboot inventory-micronaut inventory-quarkus foodwinepairing-python"
8+
NON_JAVA_POLYGLOT_BUILDS="foodwinepairing-python inventory-python inventory-nodejs inventory-dotnet inventory-go"
9+
# Run serially (Java)
10+
JAVA_POLYGLOT_BUILDS="inventory-helidon-se order-mongodb-kafka inventory-postgres-kafka inventory-springboot inventory-micronaut inventory-quarkus"
11+
912
# we provision a repos for db-log-exporter but it's in nested observability/db-log-exporter dir so not reusing BUILDS list to build (see DB_LOG_EXPORTER_BUILD below)
10-
REPOS="inventory-python inventory-nodejs inventory-dotnet inventory-go inventory-helidon-se order-mongodb-kafka inventory-postgres-kafka inventory-springboot inventory-micronaut inventory-micronaut-native-image inventory-quarkus db-log-exporter foodwinepairing-python"
13+
REPOS="$NON_JAVA_POLYGLOT_BUILDS $JAVA_POLYGLOT_BUILDS db-log-exporter"
1114

1215
# Provision Repos
1316
while ! state_done NON_JAVA_REPOS; do
@@ -32,19 +35,30 @@ while ! state_done JAVA_BUILDS; do
3235
done
3336

3437

35-
# Build the images
36-
while ! state_done NON_JAVA_BUILDS; do
37-
for b in $BUILDS; do
38+
# Build POLYGLOT_BUILDS images
39+
while ! state_done POLYGLOT_BUILDS; do
40+
for b in $NON_JAVA_POLYGLOT_BUILDS; do
3841
cd $GRABDISH_HOME/$b
42+
echo "### building $b"
3943
time ./build.sh &>> $GRABDISH_LOG/build-$b.log &
4044
done
45+
46+
# Run serially because maven is unstable in parallel
47+
for b in $JAVA_POLYGLOT_BUILDS; do
48+
cd $GRABDISH_HOME/$b
49+
echo "### building $b"
50+
time ./build.sh &>> $GRABDISH_LOG/build-$b.log
51+
done
4152
wait
53+
state_set_done POLYGLOT_BUILDS
4254
state_set_done NON_JAVA_BUILDS
4355
done
4456

57+
4558
# Build the db-log-exporter image
4659
while ! state_done DB_LOG_EXPORTER_BUILD; do
4760
cd $GRABDISH_HOME/observability/db-log-exporter
61+
echo "### building db-log-exporter"
4862
time ./build.sh &>> $GRABDISH_LOG/build-db-log-exporter.log &
4963
state_set_done DB_LOG_EXPORTER_BUILD
5064
done

grabdish/utils/polyglot-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ set -e
77

88
# Deploy each inventory service and perform functional test
99
#SERVICES="inventory-python inventory-nodejs inventory-dotnet inventory-go inventory-helidon-se"
10-
SERVICES="inventory-dotnet inventory-go inventory-python inventory-nodejs inventory-helidon-se inventory-plsql"
10+
SERVICES="inventory-dotnet inventory-go inventory-python inventory-nodejs inventory-helidon-se inventory-plsql order-mongodb-kafka inventory-postgres-kafka inventory-springboot inventory-micronaut inventory-quarkus"
1111
ORDER_ID=66
1212

1313
cd $GRABDISH_HOME/inventory-helidon

0 commit comments

Comments
 (0)