Skip to content

Commit 3fe5030

Browse files
kevinjqliuFokko
andauthored
infra: add docs for cleaning up testpypi artifacts (#1855)
## Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123. --> - Closes #1837 ## What changes are included in this PR? Used the [`pypi-cleanup`](https://github.com/arcivanov/pypi-cleanup) utility to bulk cleanup old artifacts of pyiceberg-core from testpypi for #1837. The alternative is to do this manually in the UI for each artifact. Adding this as reminder / instruction when the nightly pipeline fails again <!-- Provide a summary of the modifications in this PR. List the main changes such as new features, bug fixes, refactoring, or any other updates. --> ## Are these changes tested? <!-- Specify what test covers (unit test, integration test, etc.). If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? --> Co-authored-by: Fokko Driesprong <fokko@apache.org>
1 parent 760b752 commit 3fe5030

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/release_python_nightly.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,36 @@ jobs:
128128
- name: List downloaded artifacts
129129
run: ls -R bindings/python/dist
130130
- name: Publish to TestPyPI
131+
id: publish-testpypi
132+
continue-on-error: true
131133
uses: pypa/gh-action-pypi-publish@release/v1
132134
with:
133135
repository-url: https://test.pypi.org/legacy/
134136
skip-existing: true
135137
packages-dir: bindings/python/dist
136138
verbose: true
139+
- name: Display error message on publish failure
140+
if: steps.publish-testpypi.outcome == 'failure'
141+
run: |
142+
echo "::error::Failed to publish to TestPyPI"
143+
echo ""
144+
echo "⚠️ TestPyPI Publish Failed"
145+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
146+
echo ""
147+
echo "This may be due to TestPyPI storage limits."
148+
echo "See: https://docs.pypi.org/project-management/storage-limits"
149+
echo ""
150+
echo "To resolve this issue, use the pypi-cleanup utility to clean up old TestPyPI artifacts:"
151+
echo "https://pypi.org/project/pypi-cleanup/"
152+
echo ""
153+
echo " uvx pypi-cleanup --package pyiceberg-core --host https://test.pypi.org/ \\"
154+
echo " --verbose -d 10 --do-it --username <username>"
155+
echo ""
156+
echo "Requirements:"
157+
echo " • Must be a maintainer for pyiceberg-core on TestPyPI"
158+
echo " (https://test.pypi.org/project/pyiceberg-core)"
159+
echo " • Requires TestPyPI password and 2FA"
160+
echo " • ⚠️ ONLY do this for TestPyPI, NOT for production PyPI!"
161+
echo ""
162+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
163+
exit 1

0 commit comments

Comments
 (0)