Repository navigation
Shorten dist artifact retention - #234
Conversation
Code Review 👍 Approved with suggestions 🟡 Medium risk 0 closed / 1 findingsShortening CI and release artifact retention to 7 and 1 days could limit later access to build outputs needed for debugging or recovery. Shortens CI
💡 Edge Case: 1-day retention can break delayed PyPI publishes and re-runs of failed jobs📄 .github/workflows/release.yml:45 📄 .github/workflows/release.yml:51-53 📄 .github/workflows/release.yml:57-61 📄 .github/workflows/release.yml:72-76
Keep the release artifact long enough to cover approval delays and re-runs of single jobs🤖 Prompt for agentsVerificationRules No rules evaluated Functional validation Not enabledAuto-approval Approved For more verification details, comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
| with: | ||
| name: python-package-distributions | ||
| path: dist/ | ||
| retention-days: 1 |
There was a problem hiding this comment.
💡 Edge Case: 1-day retention can break delayed PyPI publishes and re-runs of failed jobs
publish-to-pypi runs in the pypi environment. If that environment requires a reviewer, the job waits for approval, and GitHub lets that wait last up to 30 days. If someone approves more than 24 hours after gate, or re-runs only the failed publish-to-pypi/github-release job a day later (for example after a PyPI outage or a failed gh release upload), download-artifact fails because the artifact has expired. The only way out is to re-run every job, which rebuilds the dist. A few days of retention (e.g. 3–7) still saves most of the storage and covers these recovery cases.
Keep the release artifact long enough to cover approval delays and re-runs of single jobs:
retention-days: 7
Was this helpful? React with 👍 / 👎
The CI
distupload now keeps artifacts for 7 days and the release workflow'spython-package-distributionsupload for 1 day, instead of the 90-day default. The release artifact is only consumed by the publish and GitHub Release jobs in the same run, and PyPI and the GitHub Release hold the durable copies.