Skip to content

Commit 36baca9

Browse files
authored
infra: add instructions for cleaning up testpypi artifacts (#2774)
<!-- Thanks for opening a pull request! --> <!-- In the case this PR will resolve an issue, please replace ${GITHUB_ISSUE_ID} below with the actual Github issue id. --> <!-- Closes #${GITHUB_ISSUE_ID} --> # Rationale for this change Similar to apache/iceberg-rust#1855 Add instructions to cleanup testpypi for `pyiceberg` in case of reaching TestPyPI storage limits ## Are these changes tested? ## Are there any user-facing changes? <!-- In the case of user-facing changes, please add the changelog label. -->
1 parent c330eb4 commit 36baca9

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/nightly-pypi-build.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,35 @@ jobs:
7878
- name: List downloaded artifacts
7979
run: ls -R dist/
8080
- name: Publish to TestPyPI
81+
id: publish-testpypi
82+
continue-on-error: true
8183
uses: pypa/gh-action-pypi-publish@release/v1
8284
with:
8385
repository-url: https://test.pypi.org/legacy/
8486
skip-existing: true
8587
verbose: true
88+
- name: Display error message on publish failure
89+
if: steps.publish-testpypi.outcome == 'failure'
90+
run: |
91+
echo "::error::Failed to publish to TestPyPI"
92+
echo ""
93+
echo "⚠️ TestPyPI Publish Failed"
94+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
95+
echo ""
96+
echo "This may be due to TestPyPI storage limits."
97+
echo "See: https://docs.pypi.org/project-management/storage-limits"
98+
echo ""
99+
echo "To resolve this issue, use the pypi-cleanup utility to clean up old TestPyPI artifacts:"
100+
echo "https://pypi.org/project/pypi-cleanup/"
101+
echo ""
102+
echo " uvx pypi-cleanup --package pyiceberg --host https://test.pypi.org/ \\"
103+
echo " --verbose -d 10 --do-it --username <username>"
104+
echo ""
105+
echo "Requirements:"
106+
echo " • Must be a maintainer for pyiceberg on TestPyPI"
107+
echo " (https://test.pypi.org/project/pyiceberg)"
108+
echo " • Requires TestPyPI password and 2FA"
109+
echo " • ⚠️ ONLY do this for TestPyPI, NOT for production PyPI!"
110+
echo ""
111+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
112+
exit 1

0 commit comments

Comments
 (0)