diff --git a/.github/scripts/hypo/s3_op.py b/.github/scripts/hypo/s3_op.py index 864396ae5bec..464d2a2d3346 100644 --- a/.github/scripts/hypo/s3_op.py +++ b/.github/scripts/hypo/s3_op.py @@ -1,6 +1,7 @@ import hashlib import json import os +import re import subprocess try: __import__('xattr') @@ -66,7 +67,9 @@ def handleException(self, e, action, **kwargs): message = output.get('error', {}).get('message', 'error message not found') return Exception(f'returncode:{e.returncode} {message}') except ValueError as ve: - return Exception(f'returncode:{e.returncode} output:{e.output.decode()}') + output = e.output.decode() + output = re.sub(r'\b\d+\.\d+\b|\b\d+\b', '***', output) + return Exception(f'returncode:{e.returncode} output:{output}') else: self.logger.info(f'{action} {kwargs} failed: {e}') return e diff --git a/.github/workflows/command2.yml b/.github/workflows/command2.yml index f628e57403ba..618851e44d0d 100644 --- a/.github/workflows/command2.yml +++ b/.github/workflows/command2.yml @@ -103,7 +103,7 @@ jobs: - name: Run All timeout-minutes: 70 run: | - timeout 3600 sudo -E LOG_LEVEL=WARNING META1=redis META2=${{matrix.meta}} .github/scripts/command/random.sh test_run_all || code=$?; if [[ $code -ne 124 && $code -ne 0 ]]; then echo test failed; exit $code; fi + sudo -E LOG_LEVEL=WARNING META1=redis META2=${{matrix.meta}} timeout 3600 .github/scripts/command/random.sh test_run_all || code=$?; if [[ $code -eq 124 ]]; then echo test timeout with $code && exit 0; else echo failed with $code && exit $code; fi - name: Upload example database uses: actions/upload-artifact@v3 diff --git a/.github/workflows/gateway2.yml b/.github/workflows/gateway2.yml index 946fee7dffce..81fac3cbc5d5 100644 --- a/.github/workflows/gateway2.yml +++ b/.github/workflows/gateway2.yml @@ -114,8 +114,8 @@ jobs: - name: Test randomly timeout-minutes: 65 run: | - timeout 3600 sudo -E LOG_LEVEL=WARNING python3 .github/scripts/hypo/s3.py 2>&1 | tee result.log || code=$?; if [[ $code -ne 124 && $code -ne 0 ]]; then echo test failed; exit $code; fi - + sudo -E LOG_LEVEL=WARNING timeout 3600 python3 .github/scripts/hypo/s3.py || code=$?; if [[ $code -eq 124 ]]; then echo test timeout with $code && exit 0; else echo test failed with $code && exit $code; fi + - name: Upload example database uses: actions/upload-artifact@v3 if: always() diff --git a/.github/workflows/version_compatible_hypo.yml b/.github/workflows/version_compatible_hypo.yml index 4e0125edb290..d2d2550f0d78 100644 --- a/.github/workflows/version_compatible_hypo.yml +++ b/.github/workflows/version_compatible_hypo.yml @@ -117,7 +117,7 @@ jobs: echo old_version is $old_version mv ${{matrix.old_juicefs_version}}/juicefs juicefs-$old_version export OLD_JFS_BIN="juicefs-$old_version" - timeout 3600 python3 .github/scripts/testVersionCompatible.py 2>&1 | tee result.log || code=$?; if [[ $code -ne 124 && $code -ne 0 ]]; then echo test failed; exit $code; fi + timeout 3600 python3 .github/scripts/testVersionCompatible.py 2>&1 | tee result.log || code=$?; if [[ $code -eq 124 ]]; then echo test timeout with $code; exit 0; else exit $code; fi - name: Display result log if: always()