diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8a8ce80a9..34d0d7623 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -72,6 +72,8 @@ jobs: run: tests/scripts/validate_modified_files.sh gen-rbac - name: consider debugging + if: failure() + timeout-minutes: 60 uses: ./.github/workflows/tmate_debug with: use-tmate: ${{ secrets.USE_TMATE }} @@ -105,6 +107,7 @@ jobs: - name: consider debugging if: failure() + timeout-minutes: 60 uses: ./.github/workflows/tmate_debug with: use-tmate: ${{ secrets.USE_TMATE }} diff --git a/.github/workflows/canary-integration-test.yml b/.github/workflows/canary-integration-test.yml index 31c5b9141..0a9cad8ba 100644 --- a/.github/workflows/canary-integration-test.yml +++ b/.github/workflows/canary-integration-test.yml @@ -204,6 +204,7 @@ jobs: - name: consider debugging if: failure() && github.event_name == 'pull_request' + timeout-minutes: 60 uses: ./.github/workflows/tmate_debug with: use-tmate: ${{ secrets.USE_TMATE }} @@ -257,6 +258,7 @@ jobs: - name: consider debugging if: failure() && github.event_name == 'pull_request' + timeout-minutes: 60 uses: ./.github/workflows/tmate_debug with: use-tmate: ${{ secrets.USE_TMATE }} @@ -304,6 +306,7 @@ jobs: - name: consider debugging if: failure() && github.event_name == 'pull_request' + timeout-minutes: 60 uses: ./.github/workflows/tmate_debug with: use-tmate: ${{ secrets.USE_TMATE }} @@ -357,6 +360,7 @@ jobs: - name: consider debugging if: failure() && github.event_name == 'pull_request' + timeout-minutes: 60 uses: ./.github/workflows/tmate_debug with: use-tmate: ${{ secrets.USE_TMATE }} @@ -455,6 +459,7 @@ jobs: - name: consider debugging if: failure() && github.event_name == 'pull_request' + timeout-minutes: 60 uses: ./.github/workflows/tmate_debug with: use-tmate: ${{ secrets.USE_TMATE }} @@ -528,6 +533,7 @@ jobs: - name: consider debugging if: failure() && github.event_name == 'pull_request' + timeout-minutes: 60 uses: ./.github/workflows/tmate_debug with: use-tmate: ${{ secrets.USE_TMATE }} @@ -577,6 +583,7 @@ jobs: - name: consider debugging if: failure() && github.event_name == 'pull_request' + timeout-minutes: 60 uses: ./.github/workflows/tmate_debug with: use-tmate: ${{ secrets.USE_TMATE }} @@ -629,6 +636,7 @@ jobs: - name: consider debugging if: failure() && github.event_name == 'pull_request' + timeout-minutes: 60 uses: ./.github/workflows/tmate_debug with: use-tmate: ${{ secrets.USE_TMATE }} @@ -698,6 +706,7 @@ jobs: - name: consider debugging if: failure() && github.event_name == 'pull_request' + timeout-minutes: 60 uses: ./.github/workflows/tmate_debug with: use-tmate: ${{ secrets.USE_TMATE }} @@ -749,6 +758,7 @@ jobs: - name: consider debugging if: failure() && github.event_name == 'pull_request' + timeout-minutes: 60 uses: ./.github/workflows/tmate_debug with: use-tmate: ${{ secrets.USE_TMATE }} @@ -801,6 +811,7 @@ jobs: - name: consider debugging if: failure() && github.event_name == 'pull_request' + timeout-minutes: 60 uses: ./.github/workflows/tmate_debug with: use-tmate: ${{ secrets.USE_TMATE }} @@ -881,6 +892,7 @@ jobs: - name: consider debugging if: failure() && github.event_name == 'pull_request' + timeout-minutes: 60 uses: ./.github/workflows/tmate_debug with: use-tmate: ${{ secrets.USE_TMATE }} @@ -943,6 +955,7 @@ jobs: - name: consider debugging if: failure() && github.event_name == 'pull_request' + timeout-minutes: 60 uses: ./.github/workflows/tmate_debug with: use-tmate: ${{ secrets.USE_TMATE }} @@ -997,6 +1010,7 @@ jobs: - name: consider debugging if: failure() && github.event_name == 'pull_request' + timeout-minutes: 60 uses: ./.github/workflows/tmate_debug with: use-tmate: ${{ secrets.USE_TMATE }} @@ -1247,6 +1261,7 @@ jobs: - name: consider debugging if: failure() && github.event_name == 'pull_request' + timeout-minutes: 60 uses: ./.github/workflows/tmate_debug with: use-tmate: ${{ secrets.USE_TMATE }} @@ -1275,6 +1290,7 @@ jobs: - name: consider debugging if: failure() && github.event_name == 'pull_request' + timeout-minutes: 60 uses: ./.github/workflows/tmate_debug with: use-tmate: ${{ secrets.USE_TMATE }} @@ -1306,6 +1322,7 @@ jobs: - name: consider debugging if: failure() && github.event_name == 'pull_request' + timeout-minutes: 60 uses: ./.github/workflows/tmate_debug with: use-tmate: ${{ secrets.USE_TMATE }} @@ -1387,6 +1404,7 @@ jobs: - name: consider debugging if: failure() && github.event_name == 'pull_request' + timeout-minutes: 60 uses: ./.github/workflows/tmate_debug with: use-tmate: ${{ secrets.USE_TMATE }} @@ -1439,6 +1457,7 @@ jobs: - name: consider debugging if: failure() && github.event_name == 'pull_request' + timeout-minutes: 60 uses: ./.github/workflows/tmate_debug with: use-tmate: ${{ secrets.USE_TMATE }} diff --git a/.github/workflows/integration-test-helm-suite.yaml b/.github/workflows/integration-test-helm-suite.yaml index 2b0a01712..79be133e3 100644 --- a/.github/workflows/integration-test-helm-suite.yaml +++ b/.github/workflows/integration-test-helm-suite.yaml @@ -63,6 +63,7 @@ jobs: - name: consider debugging if: failure() && github.event_name == 'pull_request' + timeout-minutes: 60 uses: ./.github/workflows/tmate_debug with: use-tmate: ${{ secrets.USE_TMATE }} diff --git a/.github/workflows/integration-test-mgr-suite.yaml b/.github/workflows/integration-test-mgr-suite.yaml index 5ce0d1082..4ebbe0547 100644 --- a/.github/workflows/integration-test-mgr-suite.yaml +++ b/.github/workflows/integration-test-mgr-suite.yaml @@ -57,6 +57,7 @@ jobs: - name: consider debugging if: failure() && github.event_name == 'pull_request' + timeout-minutes: 60 uses: ./.github/workflows/tmate_debug with: use-tmate: ${{ secrets.USE_TMATE }} diff --git a/.github/workflows/integration-test-multi-cluster-suite.yaml b/.github/workflows/integration-test-multi-cluster-suite.yaml index 7cc1b6e3f..fd52c2f50 100644 --- a/.github/workflows/integration-test-multi-cluster-suite.yaml +++ b/.github/workflows/integration-test-multi-cluster-suite.yaml @@ -59,6 +59,7 @@ jobs: - name: consider debugging if: failure() && github.event_name == 'pull_request' + timeout-minutes: 60 uses: ./.github/workflows/tmate_debug with: use-tmate: ${{ secrets.USE_TMATE }} diff --git a/.github/workflows/integration-test-object-suite.yaml b/.github/workflows/integration-test-object-suite.yaml index c9122868a..474a87457 100644 --- a/.github/workflows/integration-test-object-suite.yaml +++ b/.github/workflows/integration-test-object-suite.yaml @@ -58,6 +58,7 @@ jobs: - name: consider debugging if: failure() && github.event_name == 'pull_request' + timeout-minutes: 60 uses: ./.github/workflows/tmate_debug with: use-tmate: ${{ secrets.USE_TMATE }} diff --git a/.github/workflows/integration-test-smoke-suite.yaml b/.github/workflows/integration-test-smoke-suite.yaml index 7607b3bc2..0570bfc32 100644 --- a/.github/workflows/integration-test-smoke-suite.yaml +++ b/.github/workflows/integration-test-smoke-suite.yaml @@ -58,6 +58,7 @@ jobs: - name: consider debugging if: failure() && github.event_name == 'pull_request' + timeout-minutes: 60 uses: ./.github/workflows/tmate_debug with: use-tmate: ${{ secrets.USE_TMATE }} diff --git a/.github/workflows/integration-test-upgrade-suite.yaml b/.github/workflows/integration-test-upgrade-suite.yaml index 49906b260..275cb266a 100644 --- a/.github/workflows/integration-test-upgrade-suite.yaml +++ b/.github/workflows/integration-test-upgrade-suite.yaml @@ -106,6 +106,7 @@ jobs: - name: consider debugging if: failure() && github.event_name == 'pull_request' + timeout-minutes: 60 uses: ./.github/workflows/tmate_debug with: use-tmate: ${{ secrets.USE_TMATE }} diff --git a/.github/workflows/push-build.yaml b/.github/workflows/push-build.yaml index 223f92dd4..9d0388977 100644 --- a/.github/workflows/push-build.yaml +++ b/.github/workflows/push-build.yaml @@ -78,6 +78,7 @@ jobs: - name: consider debugging if: failure() + timeout-minutes: 60 uses: ./.github/workflows/tmate_debug with: use-tmate: ${{ secrets.USE_TMATE }} diff --git a/.github/workflows/tmate_debug/action.yml b/.github/workflows/tmate_debug/action.yml index 9a83b788b..47fef44ea 100644 --- a/.github/workflows/tmate_debug/action.yml +++ b/.github/workflows/tmate_debug/action.yml @@ -3,26 +3,18 @@ description: "Setup tmate session if the test fails" inputs: use-tmate: description: "boolean for enabling TMATE" - required: false - timeout-minutes: - description: "timeout tmate debug session" - required: false - default: '60' -# ...name, description and inputs as above + required: true runs: using: "composite" steps: - name: consider debugging shell: bash --noprofile --norc -eo pipefail -x {0} - if: failure() && github.event_name == 'pull_request' run: | # Enable tmate only in the Rook fork, where the USE_TMATE secret is set in the repo, or if the action is re-run if [ "$GITHUB_REPOSITORY_OWNER" = "rook" ] || [ -n "${{ inputs.use-tmate }}" ] || [ "$GITHUB_RUN_ATTEMPT" -gt 1 ]; then echo USE_TMATE=1 >> $GITHUB_ENV fi - echo "${{ inputs.timeout-minutes }}" - name: set up tmate session for debugging - if: failure() && env.USE_TMATE + if: env.USE_TMATE uses: mxschmitt/action-tmate@v3 - timeout-minutes: "${{ inputs.timeout-minutes }}"