From 5a5e3a652087d389766875b09eb1ffe70eb03823 Mon Sep 17 00:00:00 2001 From: cdmikechen Date: Sat, 29 Jul 2023 20:40:40 +0800 Subject: [PATCH] SUBMARINE-1396. Split experiment-prehandler test into separate action ### What is this PR for? The image build of `experiment-prehandler` resulted in a `no space left on device` exception. Now split `experiment-prehandler` build to a standalone script. Currently, the e2e test already contains `experiment-prehandler` experiment related codes (a new issue has been created to handle unit test https://issues.apache.org/jira/browse/SUBMARINE-1397), so for now remove pyhton test. ### What type of PR is it? Hot Fix ### Todos * [x] - Strip experiment-prehandler from python tests ### What is the Jira issue? https://issues.apache.org/jira/browse/SUBMARINE-1396 ### How should this be tested? CI test ### Screenshots (if appropriate) NA ### Questions: * Do the license files need updating? No * Are there breaking changes for older versions? No * Does this need new documentation? No Author: cdmikechen Author: cdmikechen Signed-off-by: cdmikechen Closes #1093 from cdmikechen/SUBMARINE-1396 and squashes the following commits: 31f058df [cdmikechen] use sh 9ef4ad09 [cdmikechen] remove space bc96ee1a [cdmikechen] add new scripts 5f99e471 [cdmikechen] Remove experiment-prehandler in build image scripts --- .../build-image-experiment-prehandler.sh | 24 +++++++++++++++++++ .github/scripts/build-image-locally-v3.sh | 3 +-- .github/scripts/build-image-locally.sh | 3 +-- .github/workflows/master.yml | 8 +++++-- 4 files changed, 32 insertions(+), 6 deletions(-) create mode 100644 .github/scripts/build-image-experiment-prehandler.sh diff --git a/.github/scripts/build-image-experiment-prehandler.sh b/.github/scripts/build-image-experiment-prehandler.sh new file mode 100644 index 0000000000..a3b37e35c9 --- /dev/null +++ b/.github/scripts/build-image-experiment-prehandler.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +SUBMARINE_VERSION="0.8.0-SNAPSHOT" +echo "Build Image apache/submarine:experiment-prehandler-${SUBMARINE_VERSION}" +echo "Execute ./dev-support/docker-images/experiment-prehandler/build.sh" +./dev-support/docker-images/experiment-prehandler/build.sh +kind load docker-image apache/submarine:experiment-prehandler-${SUBMARINE_VERSION} +docker rmi apache/submarine:experiment-prehandler-${SUBMARINE_VERSION} \ No newline at end of file diff --git a/.github/scripts/build-image-locally-v3.sh b/.github/scripts/build-image-locally-v3.sh index e852546922..13f2c1deb4 100755 --- a/.github/scripts/build-image-locally-v3.sh +++ b/.github/scripts/build-image-locally-v3.sh @@ -17,14 +17,13 @@ # SUBMARINE_VERSION="0.8.0-SNAPSHOT" -FOLDER_LIST=("database" "mlflow" "submarine" "operator-v3" "agent" "experiment-prehandler") +FOLDER_LIST=("database" "mlflow" "submarine" "operator-v3" "agent") IMAGE_LIST=( "apache/submarine:database-${SUBMARINE_VERSION}" "apache/submarine:mlflow-${SUBMARINE_VERSION}" "apache/submarine:server-${SUBMARINE_VERSION}" "apache/submarine:operator-${SUBMARINE_VERSION}" "apache/submarine:agent-${SUBMARINE_VERSION}" - "apache/submarine:experiment-prehandler-${SUBMARINE_VERSION}" ) for i in "${!IMAGE_LIST[@]}" diff --git a/.github/scripts/build-image-locally.sh b/.github/scripts/build-image-locally.sh index 4d35d69016..4619ee204b 100755 --- a/.github/scripts/build-image-locally.sh +++ b/.github/scripts/build-image-locally.sh @@ -17,14 +17,13 @@ # SUBMARINE_VERSION="0.8.0-SNAPSHOT" -FOLDER_LIST=("database" "mlflow" "submarine" "operator" "agent" "experiment-prehandler") +FOLDER_LIST=("database" "mlflow" "submarine" "operator" "agent") IMAGE_LIST=( "apache/submarine:database-${SUBMARINE_VERSION}" "apache/submarine:mlflow-${SUBMARINE_VERSION}" "apache/submarine:server-${SUBMARINE_VERSION}" "apache/submarine:operator-${SUBMARINE_VERSION}" "apache/submarine:agent-${SUBMARINE_VERSION}" - "apache/submarine:experiment-prehandler-${SUBMARINE_VERSION}" ) for i in "${!IMAGE_LIST[@]}" diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 2f6ff79fe2..9a34327dc0 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -114,7 +114,9 @@ jobs: echo "current-context:" $(kubectl config current-context) echo "environment-kubeconfig:" ${KUBECONFIG} - name: Build Image locally - run: .github/scripts/build-image-locally-v3.sh + run: | + .github/scripts/build-image-locally-v3.sh + sh .github/scripts/build-image-experiment-prehandler.sh - name: Install Golang Dependencies working-directory: submarine-cloud-v3 run: go mod vendor @@ -260,7 +262,9 @@ jobs: echo ">>> mvn ${BUILD_FLAG} -B" mvn ${BUILD_FLAG} -B - name: Build Image locally - run: .github/scripts/build-image-locally-v3.sh + run: | + .github/scripts/build-image-locally-v3.sh + sh .github/scripts/build-image-experiment-prehandler.sh - name: Start submarine run: bash ./.github/scripts/start-submarine.sh - name: Test