|
| 1 | +# PROBE ONLY — round 2. The download / retry / announce steps below are |
| 2 | +# byte-for-byte PR 12128's; the surrounding steps only break and restore the |
| 3 | +# runner's route to the artifact service, so the REAL action meets a REAL |
| 4 | +# network failure on its first attempt and the real one on its retry. |
| 5 | +name: 'PR 12128 download-retry probe R2' |
| 6 | + |
| 7 | +on: |
| 8 | + push: |
| 9 | + branches: |
| 10 | + - 'probe/pr12128-r2**' |
| 11 | + workflow_dispatch: {} |
| 12 | + |
| 13 | +jobs: |
| 14 | + seed: |
| 15 | + name: 'Seed the e2e-build artifact' |
| 16 | + runs-on: 'ubuntu-latest' |
| 17 | + steps: |
| 18 | + - name: 'Make a stand-in payload at the real archive path' |
| 19 | + run: |- |
| 20 | + mkdir -p "${RUNNER_TEMP}/seed" |
| 21 | + head -c 4194304 /dev/urandom >"${RUNNER_TEMP}/seed/e2e-build.tar.gz" |
| 22 | +
|
| 23 | + - name: 'Upload build artifact' |
| 24 | + uses: 'actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a' # v7.0.1 |
| 25 | + with: |
| 26 | + name: 'e2e-build' |
| 27 | + path: '${{ runner.temp }}/seed/e2e-build.tar.gz' |
| 28 | + if-no-files-found: 'error' |
| 29 | + compression-level: 0 |
| 30 | + retention-days: 1 |
| 31 | + |
| 32 | + leg_a2_transient_absorbed: |
| 33 | + name: 'A2 · real network failure on attempt 1, retry recovers' |
| 34 | + runs-on: 'ubuntu-latest' |
| 35 | + timeout-minutes: 20 |
| 36 | + needs: |
| 37 | + - 'seed' |
| 38 | + steps: |
| 39 | + - name: 'Cut the runner off from the artifact service (connection refused)' |
| 40 | + run: |- |
| 41 | + set -euo pipefail |
| 42 | + host="$(printf '%s' "${ACTIONS_RESULTS_URL}" | sed -E 's#^https?://##; s#[:/].*$##')" |
| 43 | + echo "artifact service host: ${host}" |
| 44 | + sudo cp /etc/hosts /tmp/hosts.orig |
| 45 | + echo "127.0.0.1 ${host}" | sudo tee -a /etc/hosts |
| 46 | + getent ahosts "${host}" | head -5 |
| 47 | +
|
| 48 | + - name: 'Download build artifact' |
| 49 | + id: 'download-build' |
| 50 | + uses: 'actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c' # v8.0.1 |
| 51 | + continue-on-error: true |
| 52 | + timeout-minutes: 10 |
| 53 | + with: |
| 54 | + name: 'e2e-build' |
| 55 | + path: '${{ runner.temp }}/e2e-build' |
| 56 | + |
| 57 | + - name: 'Restore the route before the retry' |
| 58 | + if: "${{ always() }}" |
| 59 | + run: |- |
| 60 | + set -uo pipefail |
| 61 | + sudo cp /tmp/hosts.orig /etc/hosts |
| 62 | + host="$(printf '%s' "${ACTIONS_RESULTS_URL}" | sed -E 's#^https?://##; s#[:/].*$##')" |
| 63 | + getent ahosts "${host}" | head -5 |
| 64 | +
|
| 65 | + - name: 'Download build artifact (retry)' |
| 66 | + if: "${{ steps.download-build.outcome == 'failure' }}" |
| 67 | + uses: 'actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c' # v8.0.1 |
| 68 | + with: |
| 69 | + name: 'e2e-build' |
| 70 | + path: '${{ runner.temp }}/e2e-build' |
| 71 | + |
| 72 | + # An absorbed download stall leaves the leg green, so the main-CI |
| 73 | + # failure tracker never records it — the warning annotation keeps the |
| 74 | + # recurrence countable, mirroring the build job's upload announce. |
| 75 | + - name: 'Announce absorbed download failure' |
| 76 | + if: "${{ steps.download-build.outcome == 'failure' }}" |
| 77 | + run: |- |
| 78 | + echo "::warning::Download build artifact failed its first attempt and the retry absorbed it — count this toward the #12125 download-stall recurrence watch." |
| 79 | +
|
| 80 | + - name: 'Observe the runner-side truth' |
| 81 | + if: "${{ always() }}" |
| 82 | + run: |- |
| 83 | + echo "outcome=${{ steps.download-build.outcome }}" |
| 84 | + echo "conclusion=${{ steps.download-build.conclusion }}" |
| 85 | + test -f "${RUNNER_TEMP}/e2e-build/e2e-build.tar.gz" \ |
| 86 | + && echo "PAYLOAD-PRESENT $(wc -c <"${RUNNER_TEMP}/e2e-build/e2e-build.tar.gz") bytes" \ |
| 87 | + || echo "PAYLOAD-ABSENT" |
| 88 | +
|
| 89 | + leg_b2_hang_timeboxed: |
| 90 | + name: 'B2 · attempt 1 hangs, the time-box makes it retryable' |
| 91 | + runs-on: 'ubuntu-latest' |
| 92 | + timeout-minutes: 20 |
| 93 | + needs: |
| 94 | + - 'seed' |
| 95 | + steps: |
| 96 | + - name: 'Cut the runner off from the artifact service (blackholed)' |
| 97 | + run: |- |
| 98 | + set -euo pipefail |
| 99 | + host="$(printf '%s' "${ACTIONS_RESULTS_URL}" | sed -E 's#^https?://##; s#[:/].*$##')" |
| 100 | + echo "artifact service host: ${host}" |
| 101 | + sudo cp /etc/hosts /tmp/hosts.orig |
| 102 | + echo "192.0.2.1 ${host}" | sudo tee -a /etc/hosts |
| 103 | + getent ahosts "${host}" | head -5 |
| 104 | +
|
| 105 | + - name: 'Download build artifact' |
| 106 | + id: 'download-build' |
| 107 | + uses: 'actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c' # v8.0.1 |
| 108 | + continue-on-error: true |
| 109 | + timeout-minutes: 2 |
| 110 | + with: |
| 111 | + name: 'e2e-build' |
| 112 | + path: '${{ runner.temp }}/e2e-build' |
| 113 | + |
| 114 | + - name: 'Restore the route before the retry' |
| 115 | + if: "${{ always() }}" |
| 116 | + run: |- |
| 117 | + set -uo pipefail |
| 118 | + sudo cp /tmp/hosts.orig /etc/hosts |
| 119 | + host="$(printf '%s' "${ACTIONS_RESULTS_URL}" | sed -E 's#^https?://##; s#[:/].*$##')" |
| 120 | + getent ahosts "${host}" | head -5 |
| 121 | +
|
| 122 | + - name: 'Download build artifact (retry)' |
| 123 | + if: "${{ steps.download-build.outcome == 'failure' }}" |
| 124 | + uses: 'actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c' # v8.0.1 |
| 125 | + with: |
| 126 | + name: 'e2e-build' |
| 127 | + path: '${{ runner.temp }}/e2e-build' |
| 128 | + |
| 129 | + # An absorbed download stall leaves the leg green, so the main-CI |
| 130 | + # failure tracker never records it — the warning annotation keeps the |
| 131 | + # recurrence countable, mirroring the build job's upload announce. |
| 132 | + - name: 'Announce absorbed download failure' |
| 133 | + if: "${{ steps.download-build.outcome == 'failure' }}" |
| 134 | + run: |- |
| 135 | + echo "::warning::Download build artifact failed its first attempt and the retry absorbed it — count this toward the #12125 download-stall recurrence watch." |
| 136 | +
|
| 137 | + - name: 'Observe the runner-side truth' |
| 138 | + if: "${{ always() }}" |
| 139 | + run: |- |
| 140 | + echo "outcome=${{ steps.download-build.outcome }}" |
| 141 | + echo "conclusion=${{ steps.download-build.conclusion }}" |
| 142 | + test -f "${RUNNER_TEMP}/e2e-build/e2e-build.tar.gz" \ |
| 143 | + && echo "PAYLOAD-PRESENT $(wc -c <"${RUNNER_TEMP}/e2e-build/e2e-build.tar.gz") bytes" \ |
| 144 | + || echo "PAYLOAD-ABSENT" |
| 145 | +
|
| 146 | + verdict: |
| 147 | + name: 'Verdict' |
| 148 | + runs-on: 'ubuntu-latest' |
| 149 | + if: "${{ always() }}" |
| 150 | + needs: |
| 151 | + - 'leg_a2_transient_absorbed' |
| 152 | + - 'leg_b2_hang_timeboxed' |
| 153 | + steps: |
| 154 | + - name: 'Print the result matrix' |
| 155 | + run: |- |
| 156 | + echo "leg_a2=${{ needs.leg_a2_transient_absorbed.result }} (expected success)" |
| 157 | + echo "leg_b2=${{ needs.leg_b2_hang_timeboxed.result }} (expected success)" |
0 commit comments