From 1a5e7e9c754a53605d68c178d5ee46b94bf40e74 Mon Sep 17 00:00:00 2001 From: Kshitij Aranke Date: Tue, 14 May 2024 12:57:18 +0100 Subject: [PATCH 1/2] [Backport 1.1.latest] Fix #9907: Add retry to tox to reduce flaky tests due to network failures --- .github/workflows/main.yml | 8 ++++++-- .github/workflows/structured-logging-schema-check.yml | 6 +++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 97433f886bd..b643fe80eb4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -93,8 +93,12 @@ jobs: 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() diff --git a/.github/workflows/structured-logging-schema-check.yml b/.github/workflows/structured-logging-schema-check.yml index 340e5831f88..ff981226e05 100644 --- a/.github/workflows/structured-logging-schema-check.yml +++ b/.github/workflows/structured-logging-schema-check.yml @@ -63,7 +63,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 # apply our schema tests to every log event from the previous step # skips any output that isn't valid json From ddead6f5a0997c0a28f5b0a5627516234db6f46c Mon Sep 17 00:00:00 2001 From: Kshitij Aranke Date: Mon, 20 May 2024 17:16:28 +0100 Subject: [PATCH 2/2] Update main.yml --- .github/workflows/main.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b643fe80eb4..a15dbbe1e3d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -162,8 +162,12 @@ jobs: pip install tox tox --version - - name: Run tests - run: tox + - name: Run integration tests + uses: nick-fields/retry@v3 + with: + timeout_minutes: 30 + max_attempts: 3 + command: tox - name: Get current date if: always()