Repository navigation
ci: set artifact retention on dist uploads - #75
Conversation
Code Review 👍 Approved with suggestions 🟡 Medium risk 0 closed / 1 findingsSetting CI and release artifact retention to 7 and 1 days shortens access to built distributions, limiting later inspection or recovery. Sets 💡 Edge Case: 1-day retention breaks re-runs and delayed approval of release jobs📄 .github/workflows/release.yml:80 📄 .github/workflows/release.yml:84-96 📄 .github/workflows/release.yml:100-111 The Keep release dists long enough to re-run failed jobs or approve a delayed deployment🤖 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 breaks re-runs and delayed approval of release jobs
The python-package-distributions artifact is downloaded by two jobs in the same run: publish-to-pypi, which is gated on the pypi environment, and github-release. With retention-days: 1, two things break once 24 hours have passed. First, re-running a failed github-release (for example after a gh release error) fails at download-artifact because the artifact has expired. Second, a pypi approval that waits more than a day hits the same failure. Recovering with "re-run all jobs" rebuilds the dists, but the PyPI upload then fails because that version already exists, so the release is stuck halfway. A few days of retention still saves most of the storage and leaves time to recover.
Keep release dists long enough to re-run failed jobs or approve a delayed deployment:
retention-days: 7
Was this helpful? React with 👍 / 👎
Sets
retention-dayson the two dist uploads: 7 days for the CI build artifact and 1 day for the releasepython-package-distributionsartifact, which only needs to live until the publish job in the same run downloads it. Both previously used the 90-day default, so each run kept built wheels and sdists far longer than anything reads them.