Harden publish workflow recovery, notifications, and dispatch guard - #130
Conversation
|
👋 Hello @glenn-jocher, thank you for submitting a
For more guidance, please refer to our Contributing Guide. Don't hesitate to leave a comment if you have any questions. Thank you for contributing to Ultralytics! 🚀 |
UltralyticsAssistant
left a comment
There was a problem hiding this comment.
🔍 PR Review
Made with ❤️ by Ultralytics Actions
No genuine issues found in the changed workflow. The updates are narrowly scoped and improve idempotency for tag/release creation, PyPI re-runs, SBOM upload, and notification gating without introducing an obvious regression.
|
Great work @glenn-jocher, and thank you for getting this merged! 🚀 “Success is not final, failure is not fatal: it is the courage to continue that counts.” — Winston Churchill This PR brings that spirit directly into the THOP release workflow by making PyPI publishing, GitHub Releases, SBOM uploads, and Slack notifications more resilient, recoverable, and trustworthy. The added safeguards against duplicate tags/releases, rerun-friendly publishing, improved SBOM handling, and main-branch-only release checks all help ensure smoother releases and faster recovery when something goes wrong. These improvements strengthen confidence for both maintainers and users, making every THOP release more reliable. Appreciate the thoughtful work! 🙌 |
🛠️ Summary
Ports the release-workflow hardening from ultralytics/template#91 (and matching PRs in mkdocs/ultralytics). The
publish.ymlpipeline previously had no recovery path after a partial failure, and Slack could report success before the pipeline finished.1. Failed releases can now be recovered via
workflow_dispatchOnce the tag is pushed, any downstream failure (build, PyPI upload, SBOM) previously left the release unrecoverable — a re-run hit
git tag -aon the existing tag and thecheckjob died. Now, when thepypidispatch input is checked, the run proceeds as a recovery re-run:workflow_dispatchwithpypi: trueforcesincrement=Truegit ls-remote)gh release view), healing the tag-pushed-but-no-release state, and unshallows history first so the changelog resolves the true previous tagprevious_tagoutput is omitted on recovery re-runs (online == local) so the summarizer falls back to the real previous tag instead of comparingvX...vXskip-existing: true; SBOM upload uses--clobberA partially failed release can be re-run from any point and completes only what is missing.
2. Slack success can no longer fire prematurely
notifynow includessbominneedsand in the success/failure conditions, so the ✅ message reflects the entire pipeline rather than racing the SBOM job.3.
workflow_dispatchcan no longer release a non-main commitThe
checkjob now requiresgithub.ref == 'refs/heads/main'.🧪 Testing
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Improves the THOP release workflow to make PyPI publishing, GitHub releases, SBOM uploads, and Slack notifications more reliable and recoverable 🚀
📊 Key Changes
mainbranch only, reducing accidental publishing from other branches 🔒pypiworkflow input 🛠️skip-existing: trueto tolerate reruns after partial failures 📦--clobber, allowing replacement of existing SBOM files ♻️🎯 Purpose & Impact