mirror of
https://github.com/dragonflydb/dragonfly
synced 2024-11-21 15:11:20 +00:00
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:
parent
e45c1e92a2
commit
d207789610
39
.github/actions/regression-tests/action.yml
vendored
39
.github/actions/regression-tests/action.yml
vendored
@ -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
|
||||||
|
|
||||||
|
1
.github/workflows/regression-tests.yml
vendored
1
.github/workflows/regression-tests.yml
vendored
@ -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.
|
||||||
|
1
.github/workflows/release.yml
vendored
1
.github/workflows/release.yml
vendored
@ -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: |
|
||||||
|
@ -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."""
|
||||||
|
Loading…
Reference in New Issue
Block a user