Restore Mattermost alerts on nightly build failures - #155
Open
loganlipscomb wants to merge 2 commits into
Open
loganlipscomb wants to merge 2 commits into
loganlipscomb wants to merge 2 commits into
Conversation
The drift alert step was disabled months ago, blamed on a crash in the Mattermost action. That crash only ever affected push-triggered runs, and the schedule guard that already fixed it was dropped when the step was commented out, so re-enabling it as written would have brought the crash back. Re-enable the step with the guard restored, and key the generic alert on whether the drift alert was actually sent rather than on whether the failure was drift-related, so a broken alert step no longer leaves a nightly failure silent. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Documentation preview
None of the 1 changed files matched a documentation path. |
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
Keeps the drift alert re-enablement as the only change under review. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This branch has not been deployed
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.
What's broken
Nightly build failures produce no Mattermost alert at all.
When a build fails because a page was removed without a redirect, the drift check flags the failure as drift-related. The generic failure alert deliberately excludes drift-related failures, on the assumption that a dedicated drift alert covers them. That dedicated alert was commented out months ago, blamed on a crash in the third-party Mattermost action. With one path excluded and the other disabled, nothing is sent.
The blame was misplaced. That crash only ever affected push-triggered runs, and a guard restricting the step to scheduled runs had already eliminated it. When the step was commented out, the guard was dropped from the commented text — so re-enabling it as written would have reproduced the original crash.
What's changed
The drift alert step is re-enabled with the schedule guard restored, on the existing action pin. This is the only change;
has_driftis untouched.Upgrading to the newer upstream version of that action was evaluated and rejected for this step: the newer code discards the custom drift message — the list of paths missing redirects — in favor of a generic failure line. Staying on the current pin is deliberate.
Verified
A local simulation chains the repo's own drift script and the real pinned action to render actual message text with the network stubbed out. Every failure mode on a scheduled run produces exactly one alert, and a successful build produces none.
Known gap, not addressed here
Alerts fire on scheduled runs only. A publish failure from a push to
mainor a manual dispatch still notifies nobody, and neither message names the workflow or the failed job. Worth handling as a separate change.What still needs testing
The workflow conditions were re-implemented in the simulation rather than evaluated by GitHub's own expression engine. Delivery over Ziti to Mattermost is unproven locally, and requires either waiting for a real nightly failure or deliberately forcing a single test message.
🤖 Generated with Claude Code