Repository navigation
ci: separate release notification errors for safe retries - #708
Conversation
Move the Slack release announcement out of the publish job into a separate notify job that reads the published flag and payload values from job outputs, and set errors: true so a rejected post fails the job. A webhook hiccup now only turns notify red, which can be retried with gh run rerun --failed without republishing. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #708 +/- ##
=======================================
Coverage 99.86% 99.86%
=======================================
Files 8 8
Lines 732 732
=======================================
Hits 731 731
Misses 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
🌟 Thanks for the kind review @mwbrooks! One webhook for every release now, and a hiccup is just a quick rerun 🔁 |
Summary
This pull request moves the Slack release announcement out of the
publishjob into a separatenotifyjob, so a webhook hiccup only turnsnotifyred whilepublishstays green.publishnow exposesreleaseExistsandversionas joboutputs:, andnotifyreads them withneeds: publish.notifyruns whenneeds.publish.outputs.releaseExists == 'false'and only onslackapi/slack-github-action, withcontents: read.errors: trueon the step makes a rejected post (e.g. a revoked webhook) fail the job. With the defaulterrors: falseit only logs and stays green.gh run rerun <id> --failedretries justnotifywith the outputs from the passingpublishjob, without republishing. We're not addingcontinue-on-error, since that would hide a missed announcement. Motivated by this suggestion on the python release-notify PRs.notifyjob in java-slack-sdk and slack-cli.Testing
A dry run would need a real publish, so I checked the expressions instead:
releaseExists←steps.check.outputs.exists, written by "Check if release exists" before the release is created, sofalsemeans this run published.version←steps.version.outputs.version, written by "Gather version". The action URL is still built from it by hand.needs.publish.outputs.*innotifyresolves to a job output, a stepidinpublish, and an output that step actually sets.notify'sif:has no status function, so the implicitsuccess()skips it whenpublishfails or is skipped, like the old step did.notify: only theif:/needs:gating and where the payload values come from differ.zizmor .github/workflows/release.yml: no findings. Pedantic findings matchmain.publishthennotify, with the post in the release announcements channel.Requirements