Skip to content

Queue publish runs and retry PyPI upload failures#205

Merged
glenn-jocher merged 2 commits into
mainfrom
publish-retry
Jul 21, 2026
Merged

Queue publish runs and retry PyPI upload failures#205
glenn-jocher merged 2 commits into
mainfrom
publish-retry

Conversation

@glenn-jocher

@glenn-jocher glenn-jocher commented Jul 21, 2026

Copy link
Copy Markdown
Member

Summary

  • Serialize publish workflows with queue: max, preserving up to 100 pending releases.
  • Retry pypa/gh-action-pypi-publish once after transient Sigstore/Rekor or PyPI failures.
  • Remove partial publish attestations and wait briefly before retrying; retain skip-existing for partial-upload recovery.

This applies the resilience fix from ultralytics/ultralytics#25331 consistently across active Ultralytics PyPI publishers.

Deleted: nothing — GitHub owns workflow scheduling, and the external PyPI action exposes no retry input while retaining partial attestation files after failure.

Validation

  • git diff --check
  • GitHub's documented concurrency.queue: max syntax; local actionlint 1.7.12 predates this property

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Improves PyPI publishing reliability by preventing overlapping releases and automatically retrying transient failures. 🚀

📊 Key Changes

  • Added workflow concurrency controls to queue publishing runs and avoid conflicting releases.
  • Updated the PyPI publish step to:
    • Tolerate an initial failure.
    • Remove partial attestation files left behind by failed attempts.
    • Wait briefly before retrying the upload.
    • Skip packages that already exist on PyPI.
  • Ensured the SBOM job continues to depend on the completed publish job.

🎯 Purpose & Impact

  • Reduces failed releases caused by temporary Sigstore, Rekor, or PyPI network issues. 🔄
  • Makes recovery runs safer after partially completed uploads.
  • Prevents concurrent publishing workflows from interfering with one another.
  • Improves the reliability of package releases without requiring manual intervention. ✅

@UltralyticsAssistant UltralyticsAssistant added devops GitHub Devops or MLops fixed Bug has been resolved labels Jul 21, 2026
@UltralyticsAssistant

Copy link
Copy Markdown
Member

👋 Hello @glenn-jocher, thank you for submitting a ultralytics/mkdocs 🚀 PR! This automated message helps with the initial review, and an engineer will assist with any questions or follow-up. To ensure a seamless integration of your work, please review the following checklist:

  • Define a Purpose: Clearly explain the purpose of your fix or feature in your PR description, and link to any relevant issues. Ensure your commit messages are clear, concise, and adhere to the project's conventions.
  • Synchronize with Source: Confirm your PR is synchronized with the ultralytics/mkdocs main branch. If it's behind, update it by clicking the 'Update branch' button or by running git pull and git merge main locally.
  • Ensure CI Checks Pass: Verify all Ultralytics Continuous Integration (CI) checks are passing. If any checks fail, please address the issues.
  • Update Documentation: Update the relevant documentation for any new or modified features.
  • Add Tests: If applicable, include or update tests to cover your changes, and confirm that all tests are passing.
  • Sign the CLA: Please ensure you have signed our Contributor License Agreement if this is your first Ultralytics PR by writing "I have read the CLA Document and I sign the CLA" in a new message.
  • Minimize Changes: Limit your changes to the minimum necessary for your bug fix or feature addition. "It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is." — Bruce Lee

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 UltralyticsAssistant left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🔍 PR Review

Made with ❤️ by Ultralytics Actions

The retry and attestation cleanup flow is coherent, but the new workflow-level concurrency group can silently skip queued releases unless it opts into a multi-run queue.

💬 Posted 1 inline comment

Comment thread .github/workflows/publish.yml
@glenn-jocher glenn-jocher changed the title Harden publishing against transient failures Queue publish runs and retry PyPI upload failures Jul 21, 2026
@glenn-jocher
glenn-jocher merged commit 8aa38dc into main Jul 21, 2026
5 checks passed
@glenn-jocher
glenn-jocher deleted the publish-retry branch July 21, 2026 10:50
@UltralyticsAssistant

Copy link
Copy Markdown
Member

🎉 Merged—thank you @glenn-jocher for improving PyPI publishing reliability!

As Benjamin Franklin said, “By failing to prepare, you are preparing to fail.” The new concurrency controls, retry handling, cleanup of partial attestations, and safe skipping of existing packages help prepare releases for transient failures and overlapping workflows, making Ultralytics package delivery more dependable. Your contribution is greatly appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops GitHub Devops or MLops fixed Bug has been resolved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants