chore(ci): run replication tests on arm (#3168)

* combine replication tests and reg tests in one flow
* allow replication tests to run on arm
This commit is contained in:
Kostas Kyrimis 2024-06-18 16:48:35 +03:00 committed by GitHub
parent e45c1e92a2
commit d207789610
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 4 additions and 38 deletions

View File

@ -26,7 +26,7 @@ runs:
# timeout-minutes: 20 # timeout-minutes: 20
steps: steps:
- name: Run PyTests - name: Run PyTests
id: first id: main
shell: bash shell: bash
run: | run: |
ls -l ${GITHUB_WORKSPACE}/ ls -l ${GITHUB_WORKSPACE}/
@ -37,7 +37,7 @@ runs:
export DRAGONFLY_PATH="${GITHUB_WORKSPACE}/${{inputs.build-folder-name}}/${{inputs.dfly-executable}}" export DRAGONFLY_PATH="${GITHUB_WORKSPACE}/${{inputs.build-folder-name}}/${{inputs.dfly-executable}}"
export UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1 # to crash on errors export UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1 # to crash on errors
timeout 20m pytest -m "${{inputs.filter}}" --durations=10 --color=yes --json-report --json-report-file=report.json dragonfly --ignore=dragonfly/replication_test.py --log-cli-level=INFO || code=$? timeout 40m pytest -m "${{inputs.filter}}" --durations=10 --color=yes --json-report --json-report-file=report.json dragonfly --log-cli-level=INFO || code=$?
# timeout returns 124 if we exceeded the timeout duration # timeout returns 124 if we exceeded the timeout duration
if [[ $code -eq 124 ]]; then if [[ $code -eq 124 ]]; then
@ -50,32 +50,6 @@ runs:
exit 1 exit 1
fi fi
- name: Run PyTests replication test
id: second
if: ${{ inputs.run-only-on-ubuntu-latest == 'true' || (inputs.run-only-on-ubuntu-latest == 'false' && matrix.runner == 'ubuntu-latest') }}
shell: bash
run: |
echo "Running PyTests replication test"
cd ${GITHUB_WORKSPACE}/tests
# used by PyTests
export DRAGONFLY_PATH="${GITHUB_WORKSPACE}/${{inputs.build-folder-name}}/${{inputs.dfly-executable}}"
timeout 20m pytest -m "${{inputs.filter}}" --durations=10 --color=yes --json-report \
--json-report-file=rep1_report.json dragonfly/replication_test.py --log-cli-level=INFO \
--df alsologtostderr $1 $2 || code=$?
# timeout returns 124 if we exceeded the timeout duration
if [[ $code -eq 124 ]]; then
echo "TIMEDOUT=1">> "$GITHUB_OUTPUT"
exit 1
fi
# when a test fails in pytest it returns 1 but there are other return codes as well so we just check if the code is non zero
if [[ $code -ne 0 ]]; then
exit 1
fi
- name: Print last log on timeout - name: Print last log on timeout
if: failure() if: failure()
shell: bash shell: bash
@ -106,14 +80,7 @@ runs:
} }
cd ${GITHUB_WORKSPACE}/tests cd ${GITHUB_WORKSPACE}/tests
failed_tests="" failed_tests=""
# The order in of if is important, and expected to be the oposite order of the pytest run. if [ -f report.json ]; then
# As github runner will not run the next step if the pytest failed, we start from the last
# report file and if exist we get the failed test from the pytest run, if there are any.
if [ -f rep2_report.json ]; then
failed_tests=$(get_failed_tests rep2_report.json)
elif [ -f rep1_report.json ]; then
failed_tests=$(get_failed_tests rep1_report.json)
elif [ -f report.json ]; then
failed_tests=$(get_failed_tests report.json) failed_tests=$(get_failed_tests report.json)
fi fi

View File

@ -41,7 +41,6 @@ jobs:
with: with:
dfly-executable: dragonfly dfly-executable: dragonfly
gspace-secret: ${{ secrets.GSPACES_BOT_DF_BUILD }} gspace-secret: ${{ secrets.GSPACES_BOT_DF_BUILD }}
run-only-on-ubuntu-latest: false
build-folder-name: build build-folder-name: build
# This expression serves as a ternary operator, i.e. if the condition holds it returns # This expression serves as a ternary operator, i.e. if the condition holds it returns
# 'not NON_EXISTING_MARK' otherwise not opt_only. # 'not NON_EXISTING_MARK' otherwise not opt_only.

View File

@ -131,7 +131,6 @@ jobs:
with: with:
dfly-executable: dragonfly-x86_64 dfly-executable: dragonfly-x86_64
gspace-secret: ${{ secrets.GSPACES_BOT_DF_BUILD }} gspace-secret: ${{ secrets.GSPACES_BOT_DF_BUILD }}
run-only-on-ubuntu-latest: true
build-folder-name: ${{ env.RELEASE_DIR }} build-folder-name: ${{ env.RELEASE_DIR }}
- name: Save artifacts - name: Save artifacts
run: | run: |

View File

@ -1329,6 +1329,7 @@ async def test_cluster_config_reapply(df_local_factory: DflyInstanceFactory):
await close_clients(*[node.client for node in nodes], *[node.admin_client for node in nodes]) await close_clients(*[node.client for node in nodes], *[node.admin_client for node in nodes])
@pytest.mark.skip("flaky")
@dfly_args({"proactor_threads": 4, "cluster_mode": "yes"}) @dfly_args({"proactor_threads": 4, "cluster_mode": "yes"})
async def test_cluster_migration_cancel(df_local_factory: DflyInstanceFactory): async def test_cluster_migration_cancel(df_local_factory: DflyInstanceFactory):
"""Check data migration from one node to another.""" """Check data migration from one node to another."""