diff --git a/.config/nextest.toml b/.config/nextest.toml index a50b15d3a7..93d2113a3c 100644 --- a/.config/nextest.toml +++ b/.config/nextest.toml @@ -1,6 +1,6 @@ [profile.ci] # Retry tests before failing them. -retries = { backoff = "exponential", count = 3, delay = "2s" } +retries = { backoff = "exponential", count = 2, delay = "2s" } # Do not cancel the test run on the first failure. fail-fast = false # Print out output for failing tests as soon as they fail, and also at the end diff --git a/.github/ISSUE_TEMPLATE/flaky_test.md b/.github/ISSUE_TEMPLATE/flaky_test.md index 8e759bc83c..7c361e9aad 100644 --- a/.github/ISSUE_TEMPLATE/flaky_test.md +++ b/.github/ISSUE_TEMPLATE/flaky_test.md @@ -12,7 +12,9 @@ title: Flaky test `{{ env.TEST_NAME }}` ### Context -[Flaky failure run](https://github.com/{{ env.REPOSITORY }}/actions/runs/{{ env.RUN_ID }}) +Date: {{ date | date('DD.MM.YYYY HH:mm') }} + +[Flaky failure run](https://github.com/{{ env.REPOSITORY }}/actions/runs/{{ env.RUN_ID }}/job/{{ env.JOB_ID }}) [Commit](https://github.com/{{ env.REPOSITORY }}/tree/{{ env.SHA }}) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index ca479cae61..da7bab2c56 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -39,7 +39,8 @@ jobs: path: target/nextest/ci/junit.xml # After tests are run, this hacky script will process the JUnit output of nextest - # and will create a GH Issue if there is a test marked as flaky + # and will create a GH Issue if there is a test marked as flaky, + # Failure of updating an issue is ignored because it fails for external contributors. process-results: runs-on: ubuntu-latest needs: test @@ -71,13 +72,14 @@ jobs: echo "$(jq '[.flakyFailure] | flatten | .[0]["system-err"]' flaky_tests.json -r)" >> $GITHUB_OUTPUT echo $delimiter >> $GITHUB_OUTPUT - name: pull issue template + if: ${{ steps.process-test-report.outputs.has_flaky_tests == 'true' }} uses: actions/checkout@v4 with: sparse-checkout: | .github/ISSUE_TEMPLATE/flaky_test.md sparse-checkout-cone-mode: false - if: ${{ steps.process-test-report.outputs.has_flaky_tests == 'true' }} - name: Create issue for flaky tests + continue-on-error: true id: create-issue if: ${{ steps.process-test-report.outputs.has_flaky_tests == 'true' }} uses: JasonEtco/create-an-issue@v2 @@ -87,6 +89,7 @@ jobs: SYSTEM_ERROR: ${{ steps.get-flaky-tests.outputs.content }} REPOSITORY: ${{ github.repository }} RUN_ID: ${{ github.run_id }} + JOB_ID: ${{ github.job }} SHA: ${{ github.sha }} WORKFLOW: ${{ github.workflow }} JOB: ${{ github.job }}