Repository navigation
feat: add safety checks to the PyPI publish workflow - #201
Open
chrisgong52 wants to merge 2 commits into
Open
chrisgong52 wants to merge 2 commits into
chrisgong52 wants to merge 2 commits into
Conversation
Smoke-test the wheel before upload, add a dry-run input, skip files already on PyPI and fail on a wheel hash mismatch, build reproducibly, and check the version installs from PyPI after upload. Refs Arize-ai/arize#94645 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chrisgong52
marked this pull request as ready for review
November 24, 2026 00:49
chrisgong52
requested review from
a team,
21ShisodeParth,
caroger,
fjcasti1,
gabe0912,
jyadav2008,
kafedewa,
musicionary,
nate-mar,
nosnaws,
sanchitram1 and
tofuadmiral
as code owners
November 24, 2026 00:49
musicionary
reviewed
Nov 24, 2026
| env: | ||
| TAG: ${{ inputs.tag }} | ||
| shell: uv run --no-project python {0} | ||
| run: | |
Contributor
There was a problem hiding this comment.
@chrisgong52 can we put this in a separate python file instead of in "inline" yaml?
publish.yml checks the script out from the workflow's own commit, since release tags cut before it was added don't contain it. Adds one offline test for the wheel hash mismatch case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes
publish.ymlsafe to run and re-run:scripts/smoke-wheel.sh) before any upload.dry-runinput: every check runs, the upload and post-publish install are skipped.SOURCE_DATE_EPOCHfrom the tag commit, pinned build deps, Python 3.11, uv 0.13.5.verifyjob:uv tool installfrom PyPI with retries, fails unlessarize-harness --versionprints the version.CONTRIBUTING.mdcovers dry-run, re-running and yanking.Wheel only. The sdist isn't reproducible (tar/gzip headers carry build time), so only the wheel hash is compared.
0.1.0rc1can't match. It was built before this change with run-time zip timestamps. A re-run of it always fails the hash check; contents are identical, timestamps aren't.resolves Arize-ai/arize#94645
Type of change
How tested
Locally, with no workflow runs:
v0.1.0rc1twice with the workflow's settings. Wheel4ceedc5a…both times; sdist differs each build. PyPI: wheel741ffaac…, sdista0f64872….smoke-wheel.shon a wheel from this branch: OK.0.1.0rc1, fails after retries for a missing version.actionlintclean.To do after merge, from
main(links to follow):Checklist
uv run pytest tests/ -m "not slow")uv run pre-commit run --all-files)code-reviewskill and addressed findings🤖 Generated with Claude Code