[cd] Send Slack notification if publish fails - #96304
Merged
eps1lon merged 1 commit intoJul 28, 2026
Merged
Conversation
Contributor
Tests PassedCommit: e5249e5 |
Contributor
Stats from current PR🔴 2 regressions
📊 All Metrics📖 Metrics GlossaryDev Server Metrics:
Build Metrics:
Change Thresholds:
⚡ Dev Server
📦 Dev Server (Webpack) (Legacy)📦 Dev Server (Webpack)
⚡ Production Builds
📦 Production Builds (Webpack) (Legacy)📦 Production Builds (Webpack)
📦 Bundle SizesBundle Sizes⚡ TurbopackClient Main Bundles
Server Middleware
Build DetailsBuild Manifests
📦 WebpackClient Main Bundles
Polyfills
Pages
Server Edge SSR
Middleware
Build DetailsBuild Manifests
Build Cache
🔄 Shared (bundler-independent)Runtimes
📎 Tarball URLCommit: e5249e5 |
eps1lon
force-pushed
the
sebbie/notify-slack-publish-failure
branch
from
July 28, 2026 17:36
e90c695 to
e238ea4
Compare
eps1lon
marked this pull request as ready for review
July 28, 2026 17:46
ztanner
reviewed
Jul 28, 2026
The build-and-deploy workflow publishes releases through the
publishRelease job, which only runs when deploy-target resolves the run
to 'production' (a v* tag push). Existing failure reporting is delegated
to retry_test.yml, but it keys off the buildPassed ("thank you, build")
gate whose needs exclude publishRelease, so a failed or blocked publish
produced no alert.
This change adds a reportPublishFailure job that fires only for
production runs where publishRelease did not succeed. Because
publishRelease's own condition is already 'production', within such a
run it is only 'skipped' when a build dependency failed and 'failure'
when it ran and failed, so checking its result is not 'success' captures
both cases. The job uses always() so a skipped or failed publishRelease
does not skip the alert, mirroring the existing buildPassed pattern, and
posts through the same slackapi/slack-github-action webhook step used by
the retry workflows, targeting the new BROKEN_PUBLISH_SLACK_WEBHOOK_URL
secret.
eps1lon
force-pushed
the
sebbie/notify-slack-publish-failure
branch
from
July 28, 2026 18:47
e238ea4 to
e5249e5
Compare
ztanner
approved these changes
Jul 28, 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.
Failing to publish (especially a partial publish) leaves Next.js in a corrupted state that needs to be addressed immediately. However, we only created alerts when deploy tests failed which requires a successful publish.
Now we send special message to the same channel as broken canary and deploy tests go.
This won't catch a failing deploy-target job. We'll see if deploy-target also frequently fails/flakes.