Skip to content

fix(ci-test-notify): skip slack alert for cancelled and skipped runs#151

Merged
Piotr1215 merged 1 commit into
mainfrom
devops-960/skip-cancelled-notify
Jun 3, 2026
Merged

fix(ci-test-notify): skip slack alert for cancelled and skipped runs#151
Piotr1215 merged 1 commit into
mainfrom
devops-960/skip-cancelled-notify

Conversation

@Piotr1215
Copy link
Copy Markdown
Contributor

Summary

Cancelled GitHub Actions runs were posting Slack alerts to the CI alerts channel as if they had failed (repro: vcluster-pro run 26773558866). Callers feed the run conclusion straight into the shared ci-test-notify action via needs.<job>.result / job.status, which can be success, failure, cancelled, or skipped. The action sent a message for all of them, so a human cancelling a run, or a superseded/skipped job, produced noise indistinguishable from a real failure.

Fix is gated in the shared action so every caller (nightly E2E, vcluster-pro conformance, future) is protected without each repeating an if: guard. Only success and failure notify now.

Key Changes

  • should-notify.sh (new): resolves cancelled/skipped to a no-op and folds in the existing empty-webhook check (fork PRs). Writes notify=true|false to $GITHUB_OUTPUT.
  • action.yml: a Decide whether to notify gate step runs the script; the build-payload and send steps are gated on steps.gate.outputs.notify == 'true'. Replaces the standalone empty-webhook warning step.
  • test/should-notify.bats (new): 10 cases covering notify/silent statuses, empty-webhook precedence, and error handling. Full suite: 31 tests pass.
  • Makefile: test-ci-test-notify now runs the whole test/ dir so new bats files are picked up locally (CI already ran the dir).
  • README.md: documents the gating behavior; status input description regenerated via auto-doc.

Dependencies

None. The fix lives entirely in loft-sh/github-actions; no caller-repo change is required (confirmed by assignee that the fix belongs here).

TODO

  • Review and merge
  • After merge, move the ci-test-notify/v1 tag to the new commit so callers pick up the fix

Closes DEVOPS-960

Cancelled GitHub Actions runs were posting Slack alerts as if they had
failed. Callers wire the run conclusion straight into this shared action
via needs.<job>.result or job.status, which yields success, failure,
cancelled, or skipped. The action sent a message for any of them, so a
human cancelling a run (or a superseded/skipped job) produced noise in
the CI alerts channel indistinguishable from a real failure.

Gate the send in the shared action rather than in every caller: a new
should-notify.sh resolves cancelled and skipped to a no-op (only success
and failure notify) and folds in the existing empty-webhook check for
fork PRs. Fixing it here protects all callers (nightly E2E, vcluster-pro
conformance) without each repeating an if: guard.

Covered by should-notify.bats (10 cases); make test-ci-test-notify now
runs the whole test dir so new bats files are picked up locally too.

Closes DEVOPS-960
@Piotr1215 Piotr1215 requested a review from sydorovdmytro June 3, 2026 09:49
@Piotr1215 Piotr1215 merged commit b5a50da into main Jun 3, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants