Commit c874ad7
Notify GChat on CI workflow failure
Summary:
Adds a separate `notify` job to the OSS CI workflow that POSTs a Google
Chat message (URL stored in `GCHAT_WEBHOOK_URL` repo secret) when the
`build-and-test` matrix has any failing leg. The message includes repo,
branch, workflow name, and a direct link to the failed run.
Why a workflow-level `notify` job (not per-step or per-leg):
- The `build-and-test` matrix has 6 legs (2 OS x 3 Python). A per-step
`if: failure()` notification would send up to 6 GChat messages on a
single broken commit. Aggregating into a downstream `notify` job
collapses that to a single notification per workflow run.
- `needs: build-and-test` makes the notify job run after every leg
finishes; `if: failure()` at job scope evaluates the rolled-up status
of needed jobs, so it fires exactly once when any leg failed (and
not at all on success or cancellation).
- Keeps the `build-and-test` job focused on actual build/test work; the
notify side-effect is composed in via the workflow DAG.
Reviewed By: pdepetro
Differential Revision: D104847779
fbshipit-source-id: 6cdafde56c85ffdb88f3a7ce54b65100c8fa61471 parent 1cc1b5a commit c874ad7
1 file changed
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
0 commit comments