|  | 
| 23 | 23 | 
 | 
| 24 | 24 |   e2e-kind: | 
| 25 | 25 |     runs-on: ubuntu-latest | 
|  | 26 | +    outputs: | 
|  | 27 | +      alerts-found: ${{ steps.alert_output.outputs.alerts-found }} | 
| 26 | 28 |     steps: | 
| 27 | 29 |       - uses: actions/checkout@v5 | 
| 28 | 30 |         with: | 
|  | 
| 34 | 36 | 
 | 
| 35 | 37 |       - name: Run e2e tests | 
| 36 | 38 |         run: ARTIFACT_PATH=/tmp/artifacts E2E_SUMMARY_OUTPUT=$GITHUB_STEP_SUMMARY make test-e2e | 
| 37 |  | - | 
|  | 39 | +      - name: Mark for alerts | 
|  | 40 | +        id: alert_output | 
|  | 41 | +        if: | | 
|  | 42 | +          contains(github.step_summary, 'Firing Alerts') | 
|  | 43 | +        run: echo "alerts-found=true" >> "$GITHUB_OUTPUT" | 
| 38 | 44 |       - uses: actions/upload-artifact@v4 | 
| 39 | 45 |         if: failure() | 
| 40 | 46 |         with: | 
|  | 
| 50 | 56 | 
 | 
| 51 | 57 |   experimental-e2e: | 
| 52 | 58 |     runs-on: ubuntu-latest | 
|  | 59 | +    outputs: | 
|  | 60 | +      alerts-found: ${{ steps.alert_output.outputs.alerts-found }} | 
| 53 | 61 |     steps: | 
| 54 | 62 |       - uses: actions/checkout@v5 | 
| 55 | 63 |         with: | 
|  | 
| 61 | 69 | 
 | 
| 62 | 70 |       - name: Run e2e tests | 
| 63 | 71 |         run: ARTIFACT_PATH=/tmp/artifacts E2E_SUMMARY_OUTPUT=$GITHUB_STEP_SUMMARY make test-experimental-e2e | 
| 64 |  | - | 
|  | 72 | +      - name: Mark for alerts | 
|  | 73 | +        id: alert_output | 
|  | 74 | +        if: | | 
|  | 75 | +          contains(github.step_summary, 'Firing Alerts') | 
|  | 76 | +        run: echo "alerts-found=true" >> "$GITHUB_OUTPUT" | 
| 65 | 77 |       - uses: actions/upload-artifact@v4 | 
| 66 | 78 |         if: failure() | 
| 67 | 79 |         with: | 
| @@ -111,3 +123,41 @@ jobs: | 
| 111 | 123 |         name: upgrade-experimental-e2e-artifacts | 
| 112 | 124 |         path: /tmp/artifacts/ | 
| 113 | 125 | 
 | 
|  | 126 | +  report-performance: | 
|  | 127 | +    runs-on: ubuntu-latest | 
|  | 128 | +    needs: [ experimental-e2e, e2e-kind ] | 
|  | 129 | +    steps: | 
|  | 130 | +      - name: Find Previous Alert Comment | 
|  | 131 | +        id: find_comment | 
|  | 132 | +        uses: peter-evans/find-comment@v3 | 
|  | 133 | +        with: | 
|  | 134 | +          issue-number: ${{ github.event.pull_request.number }} | 
|  | 135 | +          comment-author: 'github-actions[bot]' | 
|  | 136 | +          body-includes: '**Alerts Found**' | 
|  | 137 | + | 
|  | 138 | +      - name: Delete comment | 
|  | 139 | +        uses: detomarco/delete-comments@1.1.0 | 
|  | 140 | +        if: | | 
|  | 141 | +          needs.e2e-kind.outputs.alerts-found == false && | 
|  | 142 | +          needs.experimental-e2e.outputs.alerts-found == false | 
|  | 143 | +        with: | 
|  | 144 | +          comment-id: ${{ steps.find_comment.outputs.comment-id }} | 
|  | 145 | + | 
|  | 146 | +      - name: Post Failure Comment | 
|  | 147 | +        uses: peter-evans/create-or-update-comment@v4 | 
|  | 148 | +        if: | | 
|  | 149 | +          needs.e2e-kind.outputs.alerts-found == true || | 
|  | 150 | +          needs.experimental-e2e.outputs.alerts-found == true | 
|  | 151 | +        with: | 
|  | 152 | +          issue-number: ${{ github.event.pull_request.number }} | 
|  | 153 | +          comment-id: ${{ steps.find_comment.outputs.comment-id }} | 
|  | 154 | +          edit-mode: replace | 
|  | 155 | +          body: | | 
|  | 156 | +            **Alerts Found** | 
|  | 157 | +
 | 
|  | 158 | +            /hold | 
|  | 159 | +             | 
|  | 160 | +            A hold has been placed on this PR due to performance alerts during the CI's e2e run. | 
|  | 161 | +            View the summary [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for detaills. | 
|  | 162 | +
 | 
|  | 163 | +            To acknowledge this warning and continue anyway, leave an `/unhold` comment. | 
0 commit comments