Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: fix test timeout #4872

Merged
merged 5 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/scripts/hypo/s3_op.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import hashlib
import json
import os
import re
import subprocess
try:
__import__('xattr')
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/command2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gateway2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/version_compatible_hypo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Loading