fix(ci-test-notify): skip slack alert for cancelled and skipped runs#151
Merged
Conversation
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
sydorovdmytro
approved these changes
Jun 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-notifyaction vianeeds.<job>.result/job.status, which can besuccess,failure,cancelled, orskipped. 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. Onlysuccessandfailurenotify now.Key Changes
should-notify.sh(new): resolvescancelled/skippedto a no-op and folds in the existing empty-webhook check (fork PRs). Writesnotify=true|falseto$GITHUB_OUTPUT.action.yml: aDecide whether to notifygate step runs the script; the build-payload and send steps are gated onsteps.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-notifynow runs the wholetest/dir so new bats files are picked up locally (CI already ran the dir).README.md: documents the gating behavior;statusinput 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
ci-test-notify/v1tag to the new commit so callers pick up the fixCloses DEVOPS-960