diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 6685e4e3da4c..7bfc0c76f9a6 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -5,11 +5,9 @@ inputs: description: 'build target: juicefs, juicefs.fdb etc' required: true default: 'juicefs' - useBeta: - description: 'use beta version of juicefs to skip build' - required: true - type: boolean - default: false + beta: + description: 'beta version for the following test' + required: false runs: using: "composite" steps: @@ -43,29 +41,15 @@ runs: - name: Build linux target shell: bash run: | - if ${{ inputs.useBeta }}; then - echo "try use beta version of juicefs" - if wget -q https://juicefs-pub.oss-cn-hangzhou.aliyuncs.com/${{inputs.target}}; then - [ "${{inputs.target}}" != "juicefs" ] && mv ${{inputs.target}} juicefs - sudo chmod +x juicefs - version=$(./juicefs version) - date1=$( echo $version | grep -oP '\d{4}-\d{2}-\d{2}') - date2=$(date +%Y-%m-%d) - if [ "$date1" == "$date2" ]; then - echo beta version is up to date, $version, use it to skip build - exit 0 - else - echo beta version is out of date, $version, remove it and build - rm -f juicefs - fi - fi - fi - echo "start to build ${{inputs.target}}" - make ${{inputs.target}}.cover - if ${{ inputs.useBeta }}; then - echo "upload beta version" - curl --upload-file ${{inputs.target}} https://juicefs-pub.oss-cn-hangzhou.aliyuncs.com/ - echo "upload beta version succeed" - fi - [ "${{inputs.target}}" != "juicefs" ] && mv ${{inputs.target}} juicefs - echo "build ${{inputs.target}} succeed" \ No newline at end of file + if [[ -n "${{ inputs.beta }}" ]]; then + echo "use beta version of juicefs: ${{inputs.beta}}" + wget -q https://juicefs-com-static.oss-cn-shanghai.aliyuncs.com/juicefs_beta/${{inputs.beta}} -O juicefs + chmod +x juicefs + ./juicefs version + else + echo "start to build ${{inputs.target}}" + make ${{inputs.target}}.cover + [ "${{inputs.target}}" != "juicefs" ] && mv ${{inputs.target}} juicefs + ./juicefs version + echo "build ${{inputs.target}} succeed" + fi \ No newline at end of file diff --git a/.github/scripts/sync/sync_cluster.sh b/.github/scripts/sync/sync_cluster.sh index 8a16f796a00f..bcbfa6429167 100755 --- a/.github/scripts/sync/sync_cluster.sh +++ b/.github/scripts/sync/sync_cluster.sh @@ -81,15 +81,19 @@ test_sync_without_mount_point2(){ ./mc cp -r data myminio/data # (./mc rb myminio/data1 > /dev/null 2>&1 --force || true) && ./mc mb myminio/data1 + set -o pipefail sudo -u juicedata meta_url=$META_URL ./juicefs sync -v minio://minioadmin:minioadmin@172.20.0.1:9000/data/ jfs://meta_url/ \ --manager-addr 172.20.0.1:8081 --worker juicedata@172.20.0.2,juicedata@172.20.0.3 \ --list-threads 10 --list-depth 5\ 2>&1 | tee sync.log + set +o pipefail check_sync_log $file_count + set -o pipefail sudo -u juicedata meta_url=$META_URL ./juicefs sync -v minio://minioadmin:minioadmin@172.20.0.1:9000/data/ jfs://meta_url/ \ --manager-addr 172.20.0.1:8081 --worker juicedata@172.20.0.2,juicedata@172.20.0.3 \ --list-threads 10 --list-depth 5 --check-all \ 2>&1 | tee sync.log + set +o pipefail ./juicefs mount -d $META_URL /jfs diff data/ /jfs/data/ ./mc rm -r --force myminio/data @@ -120,7 +124,7 @@ skip_test_sync_between_oss(){ } check_sync_log(){ - grep "" sync.log && exit 1 || true + grep "panic:\|" sync.log && echo "panic or fatal in sync.log" && exit 1 || true file_count=$1 if tail -1 sync.log | grep -q "close session"; then file_copied=$(tail -n 3 sync.log | head -n 1 | sed 's/.*copied: \([0-9]*\).*/\1/' )