Skip to content

ci(repo): add Slack failure notifications to release workflow#8023

Merged
jacekradko merged 5 commits intomainfrom
jacek/release-slack-notifications
Mar 12, 2026
Merged

ci(repo): add Slack failure notifications to release workflow#8023
jacekradko merged 5 commits intomainfrom
jacek/release-slack-notifications

Conversation

@jacekradko
Copy link
Member

@jacekradko jacekradko commented Mar 10, 2026

Summary

  • Adds Slack failure notifications to the release workflow for both stable and canary release jobs
  • Sends a message to the SDK_SLACKER_WEBHOOK_URL channel when either release pipeline fails
  • Includes repo, workflow name, commit SHA, who triggered it, and a link to the logs
  • Existing success notification to SLACK_CHANGELOG_WEBHOOK_URL is unchanged
  • Snapshot release job is excluded (feedback is provided via PR comments)

Prerequisites

  • The SDK_SLACKER_WEBHOOK_URL secret must be configured in the repo settings

Test plan

  • Verify SDK_SLACKER_WEBHOOK_URL secret is set
  • Confirm no notification on successful stable release
  • Confirm no notification on successful canary release
  • Simulate a failure and confirm Slack notification is received with correct details

Summary by CodeRabbit

  • Chores
    • Added failure notifications to the release workflow for stable and canary releases so failed runs post contextual details to Slack to aid triage.
    • Added a changeset marker file to record this update and track the release change.

@changeset-bot
Copy link

changeset-bot bot commented Mar 10, 2026

🦋 Changeset detected

Latest commit: e530903

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Mar 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Mar 12, 2026 8:02pm

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 10, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

The pull request adds three Slack failure notification steps to .github/workflows/release.yml: one for stable release failures and two for canary release failures (dispatch and post-dispatch). Each step uses slackapi/slack-github-action@v1.24.0 with SLACK_WEBHOOK_TYPE set to INCOMING_WEBHOOK and SLACK_WEBHOOK_URL sourced from the SDK_SLACKER_WEBHOOK_URL secret. Notifications are triggered on workflow failure and include repository, workflow, commit, actor, and run log information.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change—adding Slack failure notifications to the release workflow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/release.yml:
- Around line 227-245: The Slack notification step ("Notify Slack on failure")
currently fires on any workflow failure and can mislabel dispatch failures as
"Canary release failed"; fix by either moving the "Notify Slack on failure" step
to immediately after the "Canary release" step (so it runs only in that context)
or change its condition to target the canary publish step outcome (for example
use if: steps.publish.outcome == 'failure' where "publish" is the id of the
"Canary release" step) so the message is only sent when the actual canary
release fails.
- Around line 128-146: The Slack "Notify Slack on failure" step currently uses a
global `if: failure()` which triggers on any downstream/post-step failures;
update the condition to check the specific step outcome instead: for the stable
release notification replace `if: failure()` with `if: steps.changesets.outcome
== 'failure'` (referencing the `changesets` step), and for the canary release
notification replace `if: failure()` with `if: steps.publish.outcome ==
'failure'` (referencing the `publish` step) so the alert only fires when the
actual release step fails.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 26c67838-46c2-4211-96ff-ef8e1dbd0aad

📥 Commits

Reviewing files that changed from the base of the PR and between 1f43bf7 and 3c4d922.

📒 Files selected for processing (1)
  • .github/workflows/release.yml

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 12, 2026

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@8023

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@8023

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@8023

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@8023

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@8023

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@8023

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@8023

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@8023

@clerk/express

npm i https://pkg.pr.new/@clerk/express@8023

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@8023

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@8023

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@8023

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@8023

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@8023

@clerk/react

npm i https://pkg.pr.new/@clerk/react@8023

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@8023

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@8023

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@8023

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@8023

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@8023

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@8023

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@8023

commit: e530903

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (2)
.github/workflows/release.yml (2)

237-255: ⚠️ Potential issue | 🟠 Major

Narrow failure condition to the actual canary release step.

Same issue as the stable release notification: if: failure() fires on any step failure. If "Trigger workflows on related repos" (lines 199-235) fails after a successful publish, this sends a misleading "Canary release failed" message.

Change the condition to target the specific publish step outcome:

Proposed fix
       - name: Notify Slack on failure
-        if: failure()
+        if: steps.publish.outcome == 'failure'
         uses: slackapi/slack-github-action@v1.24.0
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release.yml around lines 237 - 255, The Slack notify step
currently uses a global if: failure(), which triggers on any earlier step
failure; change its condition to target the canary publish step outcome (e.g.,
if: steps.publish_canary.outcome == 'failure') and ensure the canary publish
step has a stable id (set id: publish_canary on the step that performs the
canary publish). This makes the "Notify Slack on failure" step only run when the
specific publish step (referenced as publish_canary) fails.

132-150: ⚠️ Potential issue | 🟠 Major

Narrow failure condition to the actual release step.

Using if: failure() triggers this notification when any step in the job fails, including post-release steps like "Trigger workflows on related repos" (lines 75-115) or "Send commit log to Slack" (lines 122-130). This can produce false-positive "Stable release failed" alerts when the actual publish succeeded but a downstream step failed.

Change the condition to target the specific release step outcome:

Proposed fix
       - name: Notify Slack on failure
-        if: failure()
+        if: steps.changesets.outcome == 'failure'
         uses: slackapi/slack-github-action@v1.24.0
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release.yml around lines 132 - 150, The Slack notify step
currently uses if: failure() which fires on any job failure; change it to check
the specific publish/release step outcome by replacing if: failure() with a
targeted condition like if: steps.publish_release.outcome != 'success' (or if
you named the step "release" use steps.release.outcome != 'success'), and if
that release step lacks an id add id: publish_release to the release/publish
step so the Slack step can reference it reliably. Ensure the referenced step id
matches the release step's id exactly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In @.github/workflows/release.yml:
- Around line 237-255: The Slack notify step currently uses a global if:
failure(), which triggers on any earlier step failure; change its condition to
target the canary publish step outcome (e.g., if: steps.publish_canary.outcome
== 'failure') and ensure the canary publish step has a stable id (set id:
publish_canary on the step that performs the canary publish). This makes the
"Notify Slack on failure" step only run when the specific publish step
(referenced as publish_canary) fails.
- Around line 132-150: The Slack notify step currently uses if: failure() which
fires on any job failure; change it to check the specific publish/release step
outcome by replacing if: failure() with a targeted condition like if:
steps.publish_release.outcome != 'success' (or if you named the step "release"
use steps.release.outcome != 'success'), and if that release step lacks an id
add id: publish_release to the release/publish step so the Slack step can
reference it reliably. Ensure the referenced step id matches the release step's
id exactly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5ab683bd-3511-4bf4-939b-91a883bfdbc0

📥 Commits

Reviewing files that changed from the base of the PR and between 3c4d922 and 961bcde.

📒 Files selected for processing (1)
  • .github/workflows/release.yml

@jacekradko jacekradko changed the title ci: add Slack failure notifications to release workflow ci(repo): add Slack failure notifications to release workflow Mar 12, 2026
@jacekradko jacekradko merged commit d568c56 into main Mar 12, 2026
41 of 42 checks passed
@jacekradko jacekradko deleted the jacek/release-slack-notifications branch March 12, 2026 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants