Skip to content

Commit

Permalink
[Backport 1.8.latest] Fix #9907: Add retry to tox to reduce flaky tes…
Browse files Browse the repository at this point in the history
…ts due to network failures (#10142)

(cherry picked from commit 751139d)

Co-authored-by: Kshitij Aranke <kshitij.aranke@dbtlabs.com>
  • Loading branch information
github-actions[bot] and aranke committed May 21, 2024
1 parent f3b6c62 commit 3887949
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,12 @@ jobs:
python -m pip install tox
tox --version
- name: Run tox
run: tox
- name: Run unit tests
uses: nick-fields/retry@v3
with:
timeout_minutes: 10
max_attempts: 3
command: tox -e unit

- name: Get current date
if: always()
Expand Down Expand Up @@ -201,8 +205,12 @@ jobs:
python -m pip install tox
tox --version
- name: Run tests
run: tox -- --ddtrace
- name: Run integration tests
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: tox -- --ddtrace
env:
PYTEST_ADDOPTS: ${{ format('--splits {0} --group {1}', env.PYTHON_INTEGRATION_TEST_WORKERS, matrix.split-group) }}

Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/structured-logging-schema-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ jobs:
# integration tests generate a ton of logs in different files. the next step will find them all.
# we actually care if these pass, because the normal test run doesn't usually include many json log outputs
- name: Run integration tests
run: tox -e integration -- -nauto
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: tox -e integration -- -nauto
env:
PYTEST_ADDOPTS: ${{ format('--splits {0} --group {1}', env.PYTHON_INTEGRATION_TEST_WORKERS, matrix.split-group) }}

Expand Down

0 comments on commit 3887949

Please sign in to comment.