The [0.42.1 CLI publish
run](https://github.com/lancedb/lancedb/actions/runs/46743361906/job/143030097235)
uploaded all four distributions, then failed verification because the
first PyPI metadata response listed only some of the files. The workflow
fetched that response once and stopped at the first missing filename.
This change gives PyPI time to list every expected file while still
rejecting a published checksum mismatch immediately.
This was accomplished with the following changes:
- Fetch release metadata up to eight times, with a 15-second request
timeout and 15 seconds between attempts. Report any filenames still
missing when retries run out.
- Compare every listed distribution against its local SHA-256 on each
attempt, even when a different wheel or the source archive is missing.
### Testing
Five regression tests passed, covering complete metadata, delayed files,
persistent omissions, a mismatched digest in a partial listing, and a
transient request error. The existing stable publishing checks also
passed.
The `lancedb-tools` release contains wheels for Apple Silicon and two
Linux architectures. Users on Intel macOS have no compatible wheel, so
the Python installer has no way to install the CLI. This extends the
release workflow from #5313 to build a source distribution from the same
tag and check the source fallback before the release team approves
publication.
This was accomplished with the following changes:
- Package the tagged Rust CLI, workspace manifests, lockfile, and
licenses with a setuptools-rust binary target.
- Install by package name on a native Intel macOS runner with all four
release files available, then check that pip selected the sdist and
built a working x86-64 executable.
- Upload the tested sdist alongside the wheels and verify its published
SHA-256 digest.
The CLI workflow added in #5214 builds and tests `lancedb-tools` wheels,
but release maintainers still need a way to publish them to PyPI. This
adds an opt-in upload for published stable releases. A maintainer starts
the workflow from `main` with the release tag, then a required reviewer
approves the upload after the native install tests pass.
This was accomplished with the following changes:
- Check the GitHub release and the required reviewer configuration on
`pypi-cli` before requesting deployment.
- Use PyPI Trusted Publishing to upload the three tested wheels from the
same run and verify their public SHA-256 digests. A retry can finish a
partial upload.
- Document the dispatch command and the one-time GitHub environment and
PyPI publisher setup.
### Testing
Added tests for a published stable release, mismatched and beta tags,
draft or missing releases, and missing reviewer protection. PR runs also
exercise the beta wheels with `uvx` and `pipx` across all three
supported platforms. The first production upload requires the configured
publisher and an approved stable release.
Python users can install the LanceDB SDK today. This adds a separate
`lancedb-tools` distribution so they can also run the standalone
`lancedb` CLI with `uvx` or install it with `pipx`. The wheels bundle
the same binaries shipped through GitHub Releases for Apple Silicon
macOS, Linux ARM64, and Linux x86-64. The workflow uploads the wheels to
GitHub Actions for testing. PyPI publication will wait for a stable
release.
This was accomplished with the following changes:
- Verify the release archives against `SHA256SUMS` and bundle each
binary with its license and third-party notices in a platform-specific
wheel.
- Add the `lancedb` entry point and document how to build and test
wheels from a release tag.
- Exercise each wheel with both `uvx` and `pipx` on a native runner.
### Testing
All six installation checks passed against `v0.42.0-beta.30` (Python
version `0.42.0b30`). On Apple Silicon macOS, Linux ARM64, and Linux
x86-64, both `uvx` and `pipx` reported `lancedb 0.42.0-beta.30` and
listed the built-in local profile. [Native test results and wheel
artifacts](https://github.com/lancedb/lancedb/actions/runs/45680764524)
Locally verified that all three wheels contain byte-for-byte copies of
the released binary and license notices. All 38 tests in `ci/tests`
discovered by Python unittest passed.