From 476511bf836cece6a3ffa528e052ae07db8d8c41 Mon Sep 17 00:00:00 2001 From: jiangxin Date: Thu, 7 Nov 2024 10:17:22 +0800 Subject: [PATCH 1/4] add other test --- .github/workflows/utils.yaml | 417 ++++++++++++++++++++++++++++++++++- 1 file changed, 412 insertions(+), 5 deletions(-) diff --git a/.github/workflows/utils.yaml b/.github/workflows/utils.yaml index b893053..00a2de7 100644 --- a/.github/workflows/utils.yaml +++ b/.github/workflows/utils.yaml @@ -75,6 +75,53 @@ jobs: # if you change runner, must modify L117 runs-on: amd64-mo-guangzhou-2xlarge16 steps: + - name: Analyze test list + id: s1 + run: | + echo "---------------------------------" + TEST_LIST='ut,bvt,tpcc,sysbench,ssb,tpch' + for test in $(echo ${TEST_LIST} | sed "s/,/ /g"); do + echo "Current test: ${test}" + case "${test}" in + "ut") + run_ut="true" + ;; + "bvt") + run_bvt="true" + ;; + "tpcc") + run_tpcc="true" + ;; + "sysbench") + run_sysbench="true" + ;; + "ssb") + run_ssb="true" + ;; + "tpch") + run_tpch="true" + ;; + *) + echo "Invalid test option: ${test}, skipping" + ;; + esac + done + + echo "run_ut=${run_ut}" + echo "run_bvt=${run_bvt}" + echo "run_tpcc=${run_tpcc}" + echo "run_sysbench=${run_sysbench}" + echo "run_ssb=${run_ssb}" + echo "run_tpch=${run_tpch}" + + echo "run_ut=${run_ut}" >> $GITHUB_OUTPUT + echo "run_bvt=${run_bvt}" >> $GITHUB_OUTPUT + echo "run_tpcc=${run_tpcc}" >> $GITHUB_OUTPUT + echo "run_sysbench=${run_sysbench}" >> $GITHUB_OUTPUT + echo "run_ssb=${run_ssb}" >> $GITHUB_OUTPUT + echo "run_tpch=${run_tpch}" >> $GITHUB_OUTPUT + + - uses: actions/checkout@v4 with: fetch-depth: "1" @@ -145,7 +192,6 @@ jobs: CGO_CFLAGS="-I${GITHUB_WORKSPACE}/matrixone/cgo" CGO_LDFLAGS="-L${GITHUB_WORKSPACE}/matrixone/cgo -lmo" go test -short -v -tags matrixone_test -p 6 -covermode=set -coverprofile=${{ env.raw_ut_coverage }} -coverpkg=./... ${test_scope} | tee ${{ env.ut_report }} echo "ut finished" - name: Start BVT Test Service - if: ${{ always() && !cancelled() }} timeout-minutes: 10 run: | cd $GITHUB_WORKSPACE/matrixone @@ -161,7 +207,6 @@ jobs: sed -i "s/socketTimeout:.*/socketTimeout: 300000/g" mo.yml - name: Start BVT Test timeout-minutes: 30 - if: ${{ always() && !cancelled() }} id: bvt_on_pr_version run: | export LC_ALL="C.UTF-8" @@ -185,9 +230,9 @@ jobs: go tool cover -o ${{ env.ut_html_coverage }} -html=${{ env.ut_coverage }} echo "ut_html_coverage finished" rm -rf ${{ env.raw_ut_coverage }} - ps -aux | grep 'mo-service' | grep -v 'grep' | awk '{print $2}' | xargs kill -s SIGINT - i=1 && while [ -n "$(ps -aux|grep 'mo-service' | grep -v 'grep' | awk '{print $2}')" ] && [ $i -le 300 ]; do echo "mo-service kill not finished......$i/300"; i=$(($i+1)); sleep 1s; done - if [ $i -gt 300 ]; then echo 'stop mo-service failed...'; exit 1; else echo 'stop mo-service successed...'; fi + #ps -aux | grep 'mo-service' | grep -v 'grep' | awk '{print $2}' | xargs kill -s SIGINT + #i=1 && while [ -n "$(ps -aux|grep 'mo-service' | grep -v 'grep' | awk '{print $2}')" ] && [ $i -le 300 ]; do echo "mo-service kill not finished......$i/300"; i=$(($i+1)); sleep 1s; done + #if [ $i -gt 300 ]; then echo 'stop mo-service failed...'; exit 1; else echo 'stop mo-service successed...'; fi go tool covdata textfmt -i="$GITHUB_WORKSPACE/matrixone" -o ${{ env.raw_bvt_coverage }} cat ${{ env.raw_bvt_coverage }} | grep -v ${{ env.bvt_excluded_pkg }} > ${{ env.bvt_coverage }} echo "bvt_coverage finished" @@ -265,6 +310,368 @@ jobs: ${{ github.workspace }}/coverage_downloads/final_result_files.zip retention-days: 7 + - name: Clone Other Test Need Repo + if: ${{ !cancelled() && !failure() && (steps.s1.outputs.run_tpcc == 'true' || steps.s1.outputs.run_sysbench == 'true' || steps.s1.outputs.run_ssb == 'true' || steps.s1.outputs.run_tpch == 'true' ) }} + run: | + echo "tpcc need mo-load-data,mo-tpcc repo" + echo "sysbench need mo-load repo" + echo "ssb need mo-load-data,mo-ssb repo" + echo "tpch need mo-load-data,mo-tpch repo" + echo "=========================================" + echo "tpcc=${{steps.s1.outputs.run_tpcc}}" + echo "sysbench=${{steps.s1.outputs.run_sysbench}}" + echo "ssb=${{steps.s1.outputs.run_ssb}}" + echo "tpch=${{steps.s1.outputs.run_tpch}}" + + - name: Clone mo-load-data Repo + if: ${{ !cancelled() && !failure() && ( steps.s1.outputs.run_tpcc == 'true' || steps.s1.outputs.run_ssb == 'true' || steps.s1.outputs.run_tpch == 'true' ) }} + uses: actions/checkout@v4 + with: + repository: matrixorigin/mo-load-data + token: ${{secrets.TOKEN_ACTION}} + path: ./mo-load-data + ref: main + + - name: Clone mo-load Repo + if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_sysbench == 'true' }} + uses: actions/checkout@v4 + with: + repository: matrixorigin/mo-load + token: ${{secrets.TOKEN_ACTION}} + path: ./mo-load + ref: main + + - name: Clone mo-tpcc Repo + if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_tpcc == 'true' }} + uses: actions/checkout@v4 + with: + repository: matrixorigin/mo-tpcc + token: ${{secrets.TOKEN_ACTION}} + path: ./mo-tpcc + ref: main + + - name: Clone mo-ssb Repo + if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_ssb == 'true' }} + uses: actions/checkout@v4 + with: + repository: matrixorigin/mo-ssb + token: ${{secrets.TOKEN_ACTION}} + path: ./mo-ssb + ref: main + + - name: Clone mo-tpch Repo + if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_tpch == 'true' }} + uses: actions/checkout@v4 + with: + repository: matrixorigin/mo-tpch + token: ${{secrets.TOKEN_ACTION}} + path: ./mo-tpch + ref: main + + - name: Start TPCC Test + if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_tpcc == 'true' }} + run: echo "Start TPCC Test" + + - name: Create Account for Test + if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_tpcc == 'true' }} + timeout-minutes: 2 + id: account_for_tpcc + run: | + mysql -h 127.0.0.1 -P 6001 -udump -p111 -e "create account tpcc_test admin_name = 'admin' identified by '111' comment 'for tpcc test';" + echo "tpcc_account=tpcc_test:admin" >> $GITHUB_OUTPUT + echo "tpcc_password=111" >> $GITHUB_OUTPUT + + - name: Modify Tool's Setting And Set PATH + if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_tpcc == 'true' }} + run: | + cd $GITHUB_WORKSPACE/mo-load-data + sed -i '/.*ENDPOINT: ""*/c\ENDPOINT: "cos.ap-guangzhou.myqcloud.com"' access.yml + sed -i '/.*ACCESS_KEY_ID: ""*/c\ACCESS_KEY_ID: "${{secrets.TENCENT_AK}}"' access.yml + sed -i '/.*SECRET_ACCESS_KEY: ""*/c\SECRET_ACCESS_KEY: "${{secrets.TENCENT_SK}}"' access.yml + + echo "$JAVA_HOME/bin" >> $GITHUB_PATH + + # start tpcc test + - name: Load TPCC 1 Warehouse Data + if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_tpcc == 'true' }} + timeout-minutes: 20 + id: load_tpcc_data + run: | + set -uo pipefail + export LC_ALL="C.UTF-8" + locale + sleep 60s + cd $GITHUB_WORKSPACE/mo-load-data + mkdir -p report + ./load.sh -u ${{ steps.account_for_tpcc.outputs.tpcc_account }} -p ${{ steps.account_for_tpcc.outputs.tpcc_password }} -h 127.0.0.1 -c cases/02_from_cos/tpcc_1 -r -m | tee report/mo-load-data-tpcc.log + + - name: Start TPCC 1 Warehouses 1 terminals Test + if: ${{ !cancelled() && !failure() && steps.load_tpcc_data.conclusion == 'success' }} + timeout-minutes: 25 + run: | + set -uo pipefail + export LC_ALL="C.UTF-8" + locale + + cd $GITHUB_WORKSPACE/mo-tpcc + mkdir -p report + cp props.mo props_1.mo + sed -i '/.*terminals=*/c\terminals=1' props_1.mo + sed -i '/.*warehouses=*/c\warehouses=1' props_1.mo + sed -i 's/tpcc/tpcc_1/g' props_1.mo + #sed -i 's/127.0.0.1/${{ needs.setup_mo_test_env.outputs.mo_svc_ip }}/g' props_1.mo + sed -i '/runMins=*/c\runMins=15' props_1.mo + sed -i '/.*expectedErrorCodes=*/c\expectedErrorCodes=20619,1062' props_1.mo + sed -i 's/user=.*/user=${{ steps.account_for_tpcc.outputs.tpcc_account }}/g' props_1.mo + sed -i 's/password=.*/password=${{ steps.account_for_tpcc.outputs.tpcc_password }}/g' props_1.mo + ./runBenchmark.sh props_1.mo | tee report/tpcc-benchmark-1-1.log + ./runVerify.sh props_1.mo | tee report/tpcc-verify-1-1.log + + - name: Result Summary + if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_tpcc == 'true' }} + run: | + cd $GITHUB_WORKSPACE/mo-tpcc + files=("report/tpcc-benchmark-1-1.log") + for filename in "${files[@]}" + do + if [ ! -f $filename ]; then + continue + fi + echo -e "\n[$filename]" + grep "Running" $filename > tmp + N=$(wc -l < tmp) + head -n 3 tmp + echo "..." + middle_start=$((N / 2 - 1)) + middle_end=$((N / 2 + 1)) + head -n $middle_end tmp | tail -n +$middle_start + echo "..." + tail -n 3 tmp + done + + - name: Collect Upload files + if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_tpcc == 'true' }} + run: | + mkdir -p $GITHUB_WORKSPACE/reports/mo-load-data + mkdir -p $GITHUB_WORKSPACE/reports/mo-tpcc + mkdir -p $GITHUB_WORKSPACE/mo-load-data/report && cp -r $GITHUB_WORKSPACE/mo-load-data/report $GITHUB_WORKSPACE/reports/mo-load-data + mkdir -p $GITHUB_WORKSPACE/mo-tpcc/report && cp -r $GITHUB_WORKSPACE/mo-tpcc/report $GITHUB_WORKSPACE/reports/mo-tpcc + + - uses: actions/upload-artifact@v4 + if: ${{ (steps.s1.outputs.run_tpcc == 'true') && (failure() || cancelled()) }} + continue-on-error: true + with: + name: mo-pr-coverage-${{ github.event.pull_request.number }}-tpcc + path: | + ${{ github.workspace }}/reports + retention-days: 7 + + - name: TPCC TEST END + if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_tpcc == 'true' }} + run: echo "TPCC TEST END" + + - name: Start Sysbench TEST + if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_sysbench == 'true' }} + run: echo "Start sysbench TEST" + + - name: Create Account for Test And Set PATH + if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_sysbench == 'true' }} + timeout-minutes: 2 + id: account_for_sysbench + run: | + echo "sysbench_account=dump" >> $GITHUB_OUTPUT + echo "sysbench_password=111" >> $GITHUB_OUTPUT + echo "$JAVA_HOME/bin" >> $GITHUB_PATH + + # start sysbench test + - name: Prepare Sysbench Database and Tables + if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_sysbench == 'true' }} + timeout-minutes: 5 + run: | + set -uo pipefail + export LC_ALL="C.UTF-8" + locale + + cd $GITHUB_WORKSPACE/mo-load + mkdir -p report + #sed -i 's/127.0.0.1/${{ needs.setup_mo_test_env.outputs.mo_svc_ip }}/g' mo.yml + sed -i 's/name:.*$/name: "${{ steps.account_for_sysbench.outputs.sysbench_account }}"/g' mo.yml + sed -i 's/password:.*$/password: "${{ steps.account_for_sysbench.outputs.sysbench_password }}"/g' mo.yml + + echo 'Start Prepare Data of 10-tables-100000-per-table' + ./start.sh -m SYSBENCH -n 10 -s 100000 -t 1 | tee report/load-oltp-mix.log + sleep 10 + + # start sysbench test + - name: Start OLTP Mixed Test With 10 Threads + if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_sysbench == 'true' }} + timeout-minutes: 40 + run: | + set -uo pipefail + export LC_ALL="C.UTF-8" + locale + + cd $GITHUB_WORKSPACE/mo-load + mkdir -p report + echo 'Start OLTP Insert Test With 10 threads' + ./start.sh -c cases/sysbench/mixed_10_100000 -t 10 -d 20 -g -b sbtest | tee report/oltp-mix.log + + - name: Result Summary + if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_sysbench == 'true' }} + run: | + cd $GITHUB_WORKSPACE/mo-load + + files=("report/oltp-mix.log") + for filename in "${files[@]}" + do + if [ ! -f $filename ]; then + continue + fi + echo -e "\n[$filename]" + grep "tps=" $filename > tmp + N=$(wc -l < tmp) + head -n 3 tmp + echo "..." + middle_start=$((N / 2 - 1)) + middle_end=$((N / 2 + 1)) + head -n $middle_end tmp | tail -n +$middle_start + echo "..." + tail -n 3 tmp + done + + - name: Collect Upload files + if: ${{ (steps.s1.outputs.run_sysbench == 'true') && (always() || cancelled()) }} + run: | + mkdir -p $GITHUB_WORKSPACE/reports/mo-load + mkdir -p $GITHUB_WORKSPACE/mo-load/report && cp -r $GITHUB_WORKSPACE/mo-load/report $GITHUB_WORKSPACE/reports/mo-load + + - uses: actions/upload-artifact@v3 + if: ${{ (steps.s1.outputs.run_sysbench == 'true') && (failure() || cancelled()) }} + continue-on-error: true + with: + name: mo-pr-coverage-${{ github.event.pull_request.number }}-sysbench + path: | + ${{ github.workspace }}/reports + retention-days: 7 + + - name: Sysbench TEST END + if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_sysbench == 'true' }} + run: echo "sysbench TEST END" + + - name: Start TPCH OR SSB TEST + if: ${{ !cancelled() && !failure() && (steps.s1.outputs.run_tpch == 'true' || steps.s1.outputs.run_ssb == 'true') }} + run: echo "Start TPCH OR SSB TEST" + + - name: Create Account for Test + if: ${{ !cancelled() && !failure() && (steps.s1.outputs.run_tpch == 'true' || steps.s1.outputs.run_ssb == 'true') }} + timeout-minutes: 2 + id: account_for_ssb_and_tpch + run: | + #mysql -h 127.0.0.1 -P 6001 -udump -p111 -e "create account ssb_tpch_test admin_name = 'admin' identified by '111' comment 'for ssb_tpch test';" + echo "ssb_tpch_account=dump" >> $GITHUB_OUTPUT + echo "ssb_tpch_password=111" >> $GITHUB_OUTPUT + + - name: Modify Tool's Setting And Set PATH + if: ${{ !cancelled() && !failure() && (steps.s1.outputs.run_tpch == 'true' || steps.s1.outputs.run_ssb == 'true') }} + run: | + cd $GITHUB_WORKSPACE/mo-load-data + sed -i '/.*ENDPOINT: ""*/c\ENDPOINT: "cos.ap-guangzhou.myqcloud.com"' access.yml + sed -i '/.*ACCESS_KEY_ID: ""*/c\ACCESS_KEY_ID: "${{secrets.TENCENT_AK}}"' access.yml + sed -i '/.*SECRET_ACCESS_KEY: ""*/c\SECRET_ACCESS_KEY: "${{secrets.TENCENT_SK}}"' access.yml + echo "$JAVA_HOME/bin" >> $GITHUB_PATH + + - name: Start Load SSB 1G Data And Test + if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_ssb == 'true' }} + id: step_ssb_test + timeout-minutes: 20 + run: | + set -uo pipefail + export LC_ALL="C.UTF-8" + locale + sleep 60s + cd $GITHUB_WORKSPACE/mo-load-data + mkdir -p report + ./load.sh -u ${{ steps.account_for_ssb_and_tpch.outputs.ssb_tpch_account }} -p ${{ steps.account_for_ssb_and_tpch.outputs.ssb_tpch_password }} -h 127.0.0.1 -c cases/02_from_cos/ssb_1 -r -m | tee report/mo-load-data-ssb.log + # start test + cd $GITHUB_WORKSPACE/mo-ssb + mkdir -p report + ./run.sh -u ${{ steps.account_for_ssb_and_tpch.outputs.ssb_tpch_account }} -p ${{ steps.account_for_ssb_and_tpch.outputs.ssb_tpch_password }} -h 127.0.0.1 -q all -s 1 -t 5 | tee report/mo-ssb.log + + - name: SSB TEST END + if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_ssb == 'true' }} + run: echo "SSB TEST END" + + + # start tpch test + - name: Start TPCH Test + if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_tpch == 'true' }} + run: echo "Start TPCH Test" + + - name: Load TPCH 1G Test Data + if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_tpch == 'true' }} + timeout-minutes: 20 + id: load_tpch_data + run: | + set -uo pipefail + export LC_ALL="C.UTF-8" + locale + sleep 60s + cd $GITHUB_WORKSPACE/mo-load-data + mkdir -p report + ./load.sh -u ${{ steps.account_for_ssb_and_tpch.outputs.ssb_tpch_account }} -p ${{ steps.account_for_ssb_and_tpch.outputs.ssb_tpch_password }} -h 127.0.0.1 -c cases/02_from_cos/tpch_1 -r -m | tee report/mo-load-data-tpch.log + + + - name: Start TPCH 1G Test + if: ${{ !cancelled() && !failure() && steps.load_tpch_data.conclusion == 'success' && steps.s1.outputs.run_tpch == 'true' }} + id: step_tpch_test + timeout-minutes: 20 + run: | + set -uo pipefail + export LC_ALL="C.UTF-8" + locale + sleep 60s + cd $GITHUB_WORKSPACE/mo-tpch + mkdir -p report + ./run.sh -u ${{ steps.account_for_ssb_and_tpch.outputs.ssb_tpch_account }} -p ${{ steps.account_for_ssb_and_tpch.outputs.ssb_tpch_password }} -h 127.0.0.1 -q all -s 1 -t 5 | tee report/tpch.log + + - name: Collect SSB AND TPCH Upload files + if: ${{ (failure() || cancelled()) && (steps.s1.outputs.run_tpch == 'true' || steps.s1.outputs.run_ssb == 'true') }} + run: | + mkdir -p $GITHUB_WORKSPACE/reports + mkdir -p $GITHUB_WORKSPACE/reports/mo-ssb + mkdir -p $GITHUB_WORKSPACE/reports/mo-load-data + mkdir -p $GITHUB_WORKSPACE/reports/mo-tpch + mkdir -p $GITHUB_WORKSPACE/mo-ssb/report && cp -r $GITHUB_WORKSPACE/mo-ssb/report $GITHUB_WORKSPACE/reports/mo-ssb + mkdir -p $GITHUB_WORKSPACE/mo-load-data/report && cp -r $GITHUB_WORKSPACE/mo-load-data/report $GITHUB_WORKSPACE/reports/mo-load-data + mkdir -p $GITHUB_WORKSPACE/mo-tpch/report && cp -r $GITHUB_WORKSPACE/mo-tpch/report $GITHUB_WORKSPACE/reports/mo-tpch + + - uses: actions/upload-artifact@v3 + if: ${{ ( failure() || cancelled() ) && ( steps.s1.outputs.run_tpch == 'true' || steps.s1.outputs.run_ssb == 'true' ) }} + continue-on-error: true + with: + name: mo-pr-coverage-${{ github.event.pull_request.number }}-ssb-tpch + path: | + ${{ github.workspace }}/reports + retention-days: 7 + + - name: TPCH TEST END + if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_tpch == 'true' }} + run: echo "TPCH TEST END" + + - name: Clean mo-service + if: ${{ always() }} + run: | + ps -aux | grep 'mo-service' | grep -v 'grep' | awk '{print $2}' | xargs kill -s SIGINT + i=1 && while [ -n "$(ps -aux|grep 'mo-service' | grep -v 'grep' | awk '{print $2}')" ] && [ $i -le 300 ]; do echo "mo-service kill not finished......$i/300"; i=$(($i+1)); sleep 1s; done + if [ $i -gt 300 ]; then echo 'stop mo-service failed...'; exit 1; else echo 'stop mo-service successed...'; fi + + - name: Download mo-log + if: ${{ always() }} + uses: actions/upload-artifact@v3 + with: + name: mo-log + path: ${{ github.workspace }}/matrixone/mo-service.log + pr-size-label: environment: ci runs-on: ubuntu-22.04 From f5c5c1be6c06ccc2f2b5174023e9cd0cf4013a0f Mon Sep 17 00:00:00 2001 From: jiangxin Date: Tue, 19 Nov 2024 11:43:31 +0800 Subject: [PATCH 2/4] update tpcc 10w10t and sysbench -d20 --- .github/workflows/utils.yaml | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/.github/workflows/utils.yaml b/.github/workflows/utils.yaml index 00a2de7..6433acd 100644 --- a/.github/workflows/utils.yaml +++ b/.github/workflows/utils.yaml @@ -69,7 +69,7 @@ jobs: pr_coverage: if: ${{ needs.check_organization_user.outputs.safe_label == '1' || needs.check_organization_user.outputs.in_org == '1' }} - name: PR Unit and BVT Test Coverage + name: Coverage needs: [check_organization_user] environment: ci # if you change runner, must modify L117 @@ -392,7 +392,7 @@ jobs: echo "$JAVA_HOME/bin" >> $GITHUB_PATH # start tpcc test - - name: Load TPCC 1 Warehouse Data + - name: Load TPCC 10 Warehouse Data if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_tpcc == 'true' }} timeout-minutes: 20 id: load_tpcc_data @@ -403,9 +403,8 @@ jobs: sleep 60s cd $GITHUB_WORKSPACE/mo-load-data mkdir -p report - ./load.sh -u ${{ steps.account_for_tpcc.outputs.tpcc_account }} -p ${{ steps.account_for_tpcc.outputs.tpcc_password }} -h 127.0.0.1 -c cases/02_from_cos/tpcc_1 -r -m | tee report/mo-load-data-tpcc.log - - - name: Start TPCC 1 Warehouses 1 terminals Test + ./load.sh -u ${{ steps.account_for_tpcc.outputs.tpcc_account }} -p ${{ steps.account_for_tpcc.outputs.tpcc_password }} -h 127.0.0.1 -c cases/02_from_cos/tpcc_10 -r -m | tee report/mo-load-data-tpcc.log + - name: Start TPCC 10 Warehouses 10 terminals Test if: ${{ !cancelled() && !failure() && steps.load_tpcc_data.conclusion == 'success' }} timeout-minutes: 25 run: | @@ -415,23 +414,22 @@ jobs: cd $GITHUB_WORKSPACE/mo-tpcc mkdir -p report - cp props.mo props_1.mo - sed -i '/.*terminals=*/c\terminals=1' props_1.mo - sed -i '/.*warehouses=*/c\warehouses=1' props_1.mo - sed -i 's/tpcc/tpcc_1/g' props_1.mo - #sed -i 's/127.0.0.1/${{ needs.setup_mo_test_env.outputs.mo_svc_ip }}/g' props_1.mo - sed -i '/runMins=*/c\runMins=15' props_1.mo - sed -i '/.*expectedErrorCodes=*/c\expectedErrorCodes=20619,1062' props_1.mo - sed -i 's/user=.*/user=${{ steps.account_for_tpcc.outputs.tpcc_account }}/g' props_1.mo - sed -i 's/password=.*/password=${{ steps.account_for_tpcc.outputs.tpcc_password }}/g' props_1.mo - ./runBenchmark.sh props_1.mo | tee report/tpcc-benchmark-1-1.log - ./runVerify.sh props_1.mo | tee report/tpcc-verify-1-1.log - + cp props.mo props_10.mo + sed -i '/.*terminals=*/c\terminals=10' props_10.mo + sed -i '/.*warehouses=*/c\warehouses=10' props_10.mo + sed -i 's/tpcc/tpcc_10/g' props_10.mo + #sed -i 's/127.0.0.1/${{ needs.setup_mo_test_env.outputs.mo_svc_ip }}/g' props_10.mo + sed -i '/runMins=*/c\runMins=5' props_10.mo + sed -i '/.*expectedErrorCodes=*/c\expectedErrorCodes=20619,1062' props_10.mo + sed -i 's/user=.*/user=${{ steps.account_for_tpcc.outputs.tpcc_account }}/g' props_10.mo + sed -i 's/password=.*/password=${{ steps.account_for_tpcc.outputs.tpcc_password }}/g' props_10.mo + ./runBenchmark.sh props_10.mo | tee report/tpcc-benchmark-10-10.log + ./runVerify.sh props_10.mo | tee report/tpcc-verify-10-10.log - name: Result Summary if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_tpcc == 'true' }} run: | cd $GITHUB_WORKSPACE/mo-tpcc - files=("report/tpcc-benchmark-1-1.log") + files=("report/tpcc-benchmark-10-10.log") for filename in "${files[@]}" do if [ ! -f $filename ]; then @@ -514,7 +512,7 @@ jobs: cd $GITHUB_WORKSPACE/mo-load mkdir -p report echo 'Start OLTP Insert Test With 10 threads' - ./start.sh -c cases/sysbench/mixed_10_100000 -t 10 -d 20 -g -b sbtest | tee report/oltp-mix.log + ./start.sh -c cases/sysbench/mixed_10_100000 -t 10 -d 5 -g -b sbtest | tee report/oltp-mix.log - name: Result Summary if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_sysbench == 'true' }} From 57fd6c84ad4320a824fd4edc248ed71ed1eb69c4 Mon Sep 17 00:00:00 2001 From: jiangxin Date: Tue, 19 Nov 2024 15:03:57 +0800 Subject: [PATCH 3/4] update step name --- .github/workflows/utils.yaml | 113 ++++++++++------------------------- 1 file changed, 30 insertions(+), 83 deletions(-) diff --git a/.github/workflows/utils.yaml b/.github/workflows/utils.yaml index 6433acd..e2052da 100644 --- a/.github/workflows/utils.yaml +++ b/.github/workflows/utils.yaml @@ -310,8 +310,8 @@ jobs: ${{ github.workspace }}/coverage_downloads/final_result_files.zip retention-days: 7 - - name: Clone Other Test Need Repo - if: ${{ !cancelled() && !failure() && (steps.s1.outputs.run_tpcc == 'true' || steps.s1.outputs.run_sysbench == 'true' || steps.s1.outputs.run_ssb == 'true' || steps.s1.outputs.run_tpch == 'true' ) }} + - name: Other Test Need Repo + if: ${{ !cancelled() && !failure() }} run: | echo "tpcc need mo-load-data,mo-tpcc repo" echo "sysbench need mo-load repo" @@ -368,11 +368,7 @@ jobs: path: ./mo-tpch ref: main - - name: Start TPCC Test - if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_tpcc == 'true' }} - run: echo "Start TPCC Test" - - - name: Create Account for Test + - name: TPCC/Create Account for Test if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_tpcc == 'true' }} timeout-minutes: 2 id: account_for_tpcc @@ -381,7 +377,7 @@ jobs: echo "tpcc_account=tpcc_test:admin" >> $GITHUB_OUTPUT echo "tpcc_password=111" >> $GITHUB_OUTPUT - - name: Modify Tool's Setting And Set PATH + - name: TPCC/Modify Tool's Setting And Set PATH if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_tpcc == 'true' }} run: | cd $GITHUB_WORKSPACE/mo-load-data @@ -392,7 +388,7 @@ jobs: echo "$JAVA_HOME/bin" >> $GITHUB_PATH # start tpcc test - - name: Load TPCC 10 Warehouse Data + - name: TPCC/Load TPCC 10 Warehouse Data if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_tpcc == 'true' }} timeout-minutes: 20 id: load_tpcc_data @@ -404,7 +400,7 @@ jobs: cd $GITHUB_WORKSPACE/mo-load-data mkdir -p report ./load.sh -u ${{ steps.account_for_tpcc.outputs.tpcc_account }} -p ${{ steps.account_for_tpcc.outputs.tpcc_password }} -h 127.0.0.1 -c cases/02_from_cos/tpcc_10 -r -m | tee report/mo-load-data-tpcc.log - - name: Start TPCC 10 Warehouses 10 terminals Test + - name: TPCC/Start TPCC 10 Warehouses 10 terminals Test if: ${{ !cancelled() && !failure() && steps.load_tpcc_data.conclusion == 'success' }} timeout-minutes: 25 run: | @@ -425,7 +421,7 @@ jobs: sed -i 's/password=.*/password=${{ steps.account_for_tpcc.outputs.tpcc_password }}/g' props_10.mo ./runBenchmark.sh props_10.mo | tee report/tpcc-benchmark-10-10.log ./runVerify.sh props_10.mo | tee report/tpcc-verify-10-10.log - - name: Result Summary + - name: TPCC/Result Summary if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_tpcc == 'true' }} run: | cd $GITHUB_WORKSPACE/mo-tpcc @@ -447,7 +443,7 @@ jobs: tail -n 3 tmp done - - name: Collect Upload files + - name: TPCC/Collect Upload files if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_tpcc == 'true' }} run: | mkdir -p $GITHUB_WORKSPACE/reports/mo-load-data @@ -455,24 +451,7 @@ jobs: mkdir -p $GITHUB_WORKSPACE/mo-load-data/report && cp -r $GITHUB_WORKSPACE/mo-load-data/report $GITHUB_WORKSPACE/reports/mo-load-data mkdir -p $GITHUB_WORKSPACE/mo-tpcc/report && cp -r $GITHUB_WORKSPACE/mo-tpcc/report $GITHUB_WORKSPACE/reports/mo-tpcc - - uses: actions/upload-artifact@v4 - if: ${{ (steps.s1.outputs.run_tpcc == 'true') && (failure() || cancelled()) }} - continue-on-error: true - with: - name: mo-pr-coverage-${{ github.event.pull_request.number }}-tpcc - path: | - ${{ github.workspace }}/reports - retention-days: 7 - - - name: TPCC TEST END - if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_tpcc == 'true' }} - run: echo "TPCC TEST END" - - - name: Start Sysbench TEST - if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_sysbench == 'true' }} - run: echo "Start sysbench TEST" - - - name: Create Account for Test And Set PATH + - name: Sysbench/Create Account for Test And Set PATH if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_sysbench == 'true' }} timeout-minutes: 2 id: account_for_sysbench @@ -482,7 +461,7 @@ jobs: echo "$JAVA_HOME/bin" >> $GITHUB_PATH # start sysbench test - - name: Prepare Sysbench Database and Tables + - name: Sysbench/Prepare Sysbench Database and Tables if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_sysbench == 'true' }} timeout-minutes: 5 run: | @@ -501,7 +480,7 @@ jobs: sleep 10 # start sysbench test - - name: Start OLTP Mixed Test With 10 Threads + - name: Sysbench/Start OLTP Mixed Test With 10 Threads if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_sysbench == 'true' }} timeout-minutes: 40 run: | @@ -514,7 +493,7 @@ jobs: echo 'Start OLTP Insert Test With 10 threads' ./start.sh -c cases/sysbench/mixed_10_100000 -t 10 -d 5 -g -b sbtest | tee report/oltp-mix.log - - name: Result Summary + - name: Sysbench/Result Summary if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_sysbench == 'true' }} run: | cd $GITHUB_WORKSPACE/mo-load @@ -537,30 +516,13 @@ jobs: tail -n 3 tmp done - - name: Collect Upload files + - name: Sysbench/Collect Upload files if: ${{ (steps.s1.outputs.run_sysbench == 'true') && (always() || cancelled()) }} run: | mkdir -p $GITHUB_WORKSPACE/reports/mo-load mkdir -p $GITHUB_WORKSPACE/mo-load/report && cp -r $GITHUB_WORKSPACE/mo-load/report $GITHUB_WORKSPACE/reports/mo-load - - uses: actions/upload-artifact@v3 - if: ${{ (steps.s1.outputs.run_sysbench == 'true') && (failure() || cancelled()) }} - continue-on-error: true - with: - name: mo-pr-coverage-${{ github.event.pull_request.number }}-sysbench - path: | - ${{ github.workspace }}/reports - retention-days: 7 - - - name: Sysbench TEST END - if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_sysbench == 'true' }} - run: echo "sysbench TEST END" - - - name: Start TPCH OR SSB TEST - if: ${{ !cancelled() && !failure() && (steps.s1.outputs.run_tpch == 'true' || steps.s1.outputs.run_ssb == 'true') }} - run: echo "Start TPCH OR SSB TEST" - - - name: Create Account for Test + - name: TPCH/SSB/Create Account for Test if: ${{ !cancelled() && !failure() && (steps.s1.outputs.run_tpch == 'true' || steps.s1.outputs.run_ssb == 'true') }} timeout-minutes: 2 id: account_for_ssb_and_tpch @@ -569,7 +531,7 @@ jobs: echo "ssb_tpch_account=dump" >> $GITHUB_OUTPUT echo "ssb_tpch_password=111" >> $GITHUB_OUTPUT - - name: Modify Tool's Setting And Set PATH + - name: TPCH/SSB/Modify Tool's Setting And Set PATH if: ${{ !cancelled() && !failure() && (steps.s1.outputs.run_tpch == 'true' || steps.s1.outputs.run_ssb == 'true') }} run: | cd $GITHUB_WORKSPACE/mo-load-data @@ -578,7 +540,7 @@ jobs: sed -i '/.*SECRET_ACCESS_KEY: ""*/c\SECRET_ACCESS_KEY: "${{secrets.TENCENT_SK}}"' access.yml echo "$JAVA_HOME/bin" >> $GITHUB_PATH - - name: Start Load SSB 1G Data And Test + - name: SSB/Start Load SSB 1G Data And Test if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_ssb == 'true' }} id: step_ssb_test timeout-minutes: 20 @@ -595,17 +557,7 @@ jobs: mkdir -p report ./run.sh -u ${{ steps.account_for_ssb_and_tpch.outputs.ssb_tpch_account }} -p ${{ steps.account_for_ssb_and_tpch.outputs.ssb_tpch_password }} -h 127.0.0.1 -q all -s 1 -t 5 | tee report/mo-ssb.log - - name: SSB TEST END - if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_ssb == 'true' }} - run: echo "SSB TEST END" - - - # start tpch test - - name: Start TPCH Test - if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_tpch == 'true' }} - run: echo "Start TPCH Test" - - - name: Load TPCH 1G Test Data + - name: TPCH/Load TPCH 1G Test Data if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_tpch == 'true' }} timeout-minutes: 20 id: load_tpch_data @@ -619,7 +571,7 @@ jobs: ./load.sh -u ${{ steps.account_for_ssb_and_tpch.outputs.ssb_tpch_account }} -p ${{ steps.account_for_ssb_and_tpch.outputs.ssb_tpch_password }} -h 127.0.0.1 -c cases/02_from_cos/tpch_1 -r -m | tee report/mo-load-data-tpch.log - - name: Start TPCH 1G Test + - name: TPCH/Start TPCH 1G Test if: ${{ !cancelled() && !failure() && steps.load_tpch_data.conclusion == 'success' && steps.s1.outputs.run_tpch == 'true' }} id: step_tpch_test timeout-minutes: 20 @@ -632,7 +584,7 @@ jobs: mkdir -p report ./run.sh -u ${{ steps.account_for_ssb_and_tpch.outputs.ssb_tpch_account }} -p ${{ steps.account_for_ssb_and_tpch.outputs.ssb_tpch_password }} -h 127.0.0.1 -q all -s 1 -t 5 | tee report/tpch.log - - name: Collect SSB AND TPCH Upload files + - name: TPCH/SSB/Collect SSB AND TPCH Upload files if: ${{ (failure() || cancelled()) && (steps.s1.outputs.run_tpch == 'true' || steps.s1.outputs.run_ssb == 'true') }} run: | mkdir -p $GITHUB_WORKSPACE/reports @@ -643,19 +595,6 @@ jobs: mkdir -p $GITHUB_WORKSPACE/mo-load-data/report && cp -r $GITHUB_WORKSPACE/mo-load-data/report $GITHUB_WORKSPACE/reports/mo-load-data mkdir -p $GITHUB_WORKSPACE/mo-tpch/report && cp -r $GITHUB_WORKSPACE/mo-tpch/report $GITHUB_WORKSPACE/reports/mo-tpch - - uses: actions/upload-artifact@v3 - if: ${{ ( failure() || cancelled() ) && ( steps.s1.outputs.run_tpch == 'true' || steps.s1.outputs.run_ssb == 'true' ) }} - continue-on-error: true - with: - name: mo-pr-coverage-${{ github.event.pull_request.number }}-ssb-tpch - path: | - ${{ github.workspace }}/reports - retention-days: 7 - - - name: TPCH TEST END - if: ${{ !cancelled() && !failure() && steps.s1.outputs.run_tpch == 'true' }} - run: echo "TPCH TEST END" - - name: Clean mo-service if: ${{ always() }} run: | @@ -665,10 +604,18 @@ jobs: - name: Download mo-log if: ${{ always() }} - uses: actions/upload-artifact@v3 + run: | + cp $GITHUB_WORKSPACE/matrixone/mo-service.log $GITHUB_WORKSPACE/reports/mo-service.log + + - uses: actions/upload-artifact@v4 + if: ${{ always() }} + continue-on-error: true with: - name: mo-log - path: ${{ github.workspace }}/matrixone/mo-service.log + name: reports + path: | + ${{ github.workspace }}/reports + retention-days: 7 + pr-size-label: environment: ci From 340fc651ad8705c8b366a88a7c276dd7a5c684c3 Mon Sep 17 00:00:00 2001 From: jiangxin Date: Fri, 22 Nov 2024 11:46:49 +0800 Subject: [PATCH 4/4] update secrets --- .github/workflows/utils.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/utils.yaml b/.github/workflows/utils.yaml index e2052da..a0035c3 100644 --- a/.github/workflows/utils.yaml +++ b/.github/workflows/utils.yaml @@ -18,6 +18,12 @@ on: required: true OPENAI_API_KEY: description: "OPENAI_API_KEY For get PR Suggestion" + required: false + TENCENT_AK: + description: "TENCENT_AK For UT Test" + required: true + TENCENT_SK: + description: "TENCENT_SK For UT Test" required: true jobs: