Skip to content

fix: improve promote-release workflow robustness and error handling#146

Merged
boscorat merged 1 commit into
masterfrom
140-change-release-process-to-create-draft-release
Jul 8, 2026
Merged

fix: improve promote-release workflow robustness and error handling#146
boscorat merged 1 commit into
masterfrom
140-change-release-process-to-create-draft-release

Conversation

@boscorat

@boscorat boscorat commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Address git-expert review feedback with the following improvements:

  • Fix draft release check logic: now explicitly rejects already-live releases instead of warning and proceeding (prevents accidental re-promotion)
  • Add artifact validation: verify wheel and sdist exist before publishing to PyPI
  • Implement PyPI verification with exponential backoff retry (up to 5 attempts) at 10s, 25s, 40s, 55s, 70s intervals to handle slower indexing
  • Fix string interpolation: use heredoc to avoid shell-to-Python interpolation issues with special characters in package names
  • Reorder deployment creation: create deployment AFTER PyPI verification succeeds to ensure deployment records accurately reflect release state
  • Add conditional guards: deployment status only updates if deployment created
  • Simplify retroactive docs update: improve error handling, clearer git state management, explicit cleanup of stashed changes
  • Add better error messages: distinguish between missing releases, non-draft releases, artifact download failures, and verification timeouts

All changes maintain backward compatibility while improving reliability and maintainability. Workflow will now handle edge cases and transient failures more gracefully.

Address git-expert review feedback with the following improvements:

- Fix draft release check logic: now explicitly rejects already-live releases
  instead of warning and proceeding (prevents accidental re-promotion)
- Add artifact validation: verify wheel and sdist exist before publishing to PyPI
- Implement PyPI verification with exponential backoff retry (up to 5 attempts)
  at 10s, 25s, 40s, 55s, 70s intervals to handle slower indexing
- Fix string interpolation: use heredoc to avoid shell-to-Python interpolation
  issues with special characters in package names
- Reorder deployment creation: create deployment AFTER PyPI verification
  succeeds to ensure deployment records accurately reflect release state
- Add conditional guards: deployment status only updates if deployment created
- Simplify retroactive docs update: improve error handling, clearer git state
  management, explicit cleanup of stashed changes
- Add better error messages: distinguish between missing releases, non-draft
  releases, artifact download failures, and verification timeouts

All changes maintain backward compatibility while improving reliability and
maintainability. Workflow will now handle edge cases and transient failures
more gracefully.

Signed-off-by: Jason Farrar <farrar.jason1@gmail.com>
@boscorat boscorat force-pushed the 140-change-release-process-to-create-draft-release branch from d46f265 to 020d630 Compare July 8, 2026 10:00
@boscorat boscorat merged commit 44c1437 into master Jul 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant