From b8eadbc7a7e4807f6648cda57636981bbe680f7d Mon Sep 17 00:00:00 2001 From: Zhou Cheng Date: Fri, 27 Dec 2024 14:47:00 +0800 Subject: [PATCH] CI: fix ci failures. (#5453) --- .github/actions/upload-total-coverage/action.yml | 2 +- .github/scripts/common/common.sh | 2 +- .github/workflows/fio_benchmark.yml | 7 ++++--- .github/workflows/load.yml | 6 +++--- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/actions/upload-total-coverage/action.yml b/.github/actions/upload-total-coverage/action.yml index 858f87dd4ccd..1110a29e7347 100644 --- a/.github/actions/upload-total-coverage/action.yml +++ b/.github/actions/upload-total-coverage/action.yml @@ -13,7 +13,7 @@ runs: shell: bash run: | echo "current dir is $(pwd)" - if [[ "${{github.event}}" == "schedule" ]]; then + if [[ "${{github.event_name}}" == "schedule" ]]; then coverdirs="cover," else for dir in $(find cover -mindepth 1 -maxdepth 1 -type d -exec basename {} \;); do diff --git a/.github/scripts/common/common.sh b/.github/scripts/common/common.sh index f90f02872a03..d03565cedbb8 100644 --- a/.github/scripts/common/common.sh +++ b/.github/scripts/common/common.sh @@ -18,7 +18,7 @@ umount_jfs() [[ ! -f $mp/.config ]] && return ls -l $mp/.config pids=$(./juicefs status --log-level error $meta_url 2>/dev/null |tee status.log| jq --arg mp "$mp" '.Sessions[] | select(.MountPoint == $mp) | .ProcessID') - [[ -z "$pids" ]] && echo "pid is empty" && return + [[ -z "$pids" ]] && cat status.log && echo "pid is empty" && return echo "umount is $mp, pids is $pids" for pid in $pids; do umount -l $mp diff --git a/.github/workflows/fio_benchmark.yml b/.github/workflows/fio_benchmark.yml index e86cfa94e75a..2f7cbf79ca93 100644 --- a/.github/workflows/fio_benchmark.yml +++ b/.github/workflows/fio_benchmark.yml @@ -30,7 +30,7 @@ jobs: timeout-minutes: 30 runs-on: [ubuntu-20.04] strategy: - fail-fast: false + fail-fast: true matrix: meta: ['redis'] fio_job : ['big-file-sequential-read', 'big-file-sequential-write', 'big-file-multi-read-4', @@ -68,8 +68,9 @@ jobs: - name: Fio Benchmark env: - AWS_ACCESS_KEY_ID: ${{secrets.CI_AWS_ACCESS_KEY_ID}} - AWS_SECRET_ACCESS_KEY: ${{secrets.CI_AWS_ACCESS_KEY_SECRET}} + AWS_ACCESS_KEY_ID: ${{secrets.CI_COVERAGE_AWS_AK}} + AWS_SECRET_ACCESS_KEY: ${{secrets.CI_COVERAGE_AWS_SK}} + AWS_ACCESS_TOKEN: ${{secrets.CI_COVERAGE_AWS_TOKEN}} run: | source .github/scripts/start_meta_engine.sh meta_url=$(get_meta_url ${{matrix.meta}}) diff --git a/.github/workflows/load.yml b/.github/workflows/load.yml index 0e25d4e73798..784a9bd58371 100644 --- a/.github/workflows/load.yml +++ b/.github/workflows/load.yml @@ -105,7 +105,7 @@ jobs: AWS_ACCESS_TOKEN: ${{secrets.CI_COVERAGE_AWS_TOKEN}} META: ${{matrix.meta}} run: | - sudo GOCOVERDIR=$(pwd)/cover START_META=true .github/scripts/command/load_dump_bench.sh test_load_dump_with_small_dir + sudo -E GOCOVERDIR=$(pwd)/cover START_META=true .github/scripts/command/load_dump_bench.sh test_load_dump_with_small_dir - name: Load and dump with big directory timeout-minutes: 30 @@ -116,8 +116,8 @@ jobs: META: ${{matrix.meta}} START_META: false run: | - sudo -E GOCOVERDIR=$(pwd)/cover .github/scripts/command/load_dump_bench.sh test_load_dump_with_big_dir - + sudo -E GOCOVERDIR=$(pwd)/cover .github/scripts/command/load_dump_bench.sh test_load_dump_with_big_dir + - name: Load and dump subdir with big directory if: false timeout-minutes: 30