From 3656fd31ff133fe834777a957992772c7be4c747 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.0.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 | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c4a2277a979..917ecf17a6f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -103,8 +103,12 @@ jobs: python -m pip --version 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 9066c5c592e..b69c7a4560c 100644 --- a/.github/workflows/structured-logging-schema-check.yml +++ b/.github/workflows/structured-logging-schema-check.yml @@ -1,6 +1,6 @@ # This Action checks makes a dbt run to sample json structured logs # and checks that they conform to the currently documented schema. -# +# # If this action fails it either means we have unintentionally deviated # from our documented structured logging schema, or we need to bump the # version of our structured logging and add new documentation to @@ -61,7 +61,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 py38-postgres -- -nauto + uses: nick-fields/retry@v3 + with: + timeout_minutes: 30 + max_attempts: 3 + command: tox -e py38-postgres -- -nauto # apply our schema tests to every log event from the previous step # skips any output that isn't valid json From 2fa432c6b1deddb4801137789e7db5aec2f953e2 Mon Sep 17 00:00:00 2001 From: Kshitij Aranke Date: Mon, 20 May 2024 17:14:36 +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 917ecf17a6f..636442d5d76 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -68,8 +68,12 @@ jobs: python -m pip --version tox --version - - name: Run tox - run: tox + - name: Run integration tests + uses: nick-fields/retry@v3 + with: + timeout_minutes: 30 + max_attempts: 3 + command: tox unit: name: unit test / python ${{ matrix.python-version }}