ci(repo): add Slack failure notifications to release workflow#8023
ci(repo): add Slack failure notifications to release workflow#8023jacekradko merged 5 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: e530903 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen 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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThe pull request adds three Slack failure notification steps to 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📝 Coding Plan
Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (1)
.github/workflows/release.yml
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
There was a problem hiding this comment.
♻️ Duplicate comments (2)
.github/workflows/release.yml (2)
237-255:⚠️ Potential issue | 🟠 MajorNarrow 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 | 🟠 MajorNarrow 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
📒 Files selected for processing (1)
.github/workflows/release.yml
Summary
SDK_SLACKER_WEBHOOK_URLchannel when either release pipeline failsSLACK_CHANGELOG_WEBHOOK_URLis unchangedPrerequisites
SDK_SLACKER_WEBHOOK_URLsecret must be configured in the repo settingsTest plan
SDK_SLACKER_WEBHOOK_URLsecret is setSummary by CodeRabbit