mirror of
https://github.com/lancedb/lancedb.git
synced 2026-12-03 07:45:17 +00:00
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.
289 lines
14 KiB
Markdown
289 lines
14 KiB
Markdown
# Release process
|
|
|
|
We release four `lancedb` SDK packages (Python, Rust, Java, and Node.js) and
|
|
standalone `lancedb` command-line binaries.
|
|
|
|
All SDKs and the CLI share a single version number, defined by `current_version` in
|
|
`.bumpversion.toml`. One `vX.Y.Z` tag releases all of them, so a breaking change
|
|
in any SDK bumps the minor version for every SDK.
|
|
|
|
> [!NOTE]
|
|
> Python used to be versioned separately, under `python-vX.Y.Z` tags. It ran
|
|
> three minor versions ahead of the other SDKs, which made the two numbers hard
|
|
> to reason about. Both tracks were merged at `v0.37.0`: the Python line went
|
|
> `0.36` → `0.37` as usual, while Rust, Java, and Node.js jumped `0.33` → `0.37`
|
|
> to catch up. Tags before `v0.37.0` follow the old split scheme.
|
|
|
|
## Preview releases
|
|
|
|
LanceDB has full releases about every 2 weeks, but in between we make frequent
|
|
preview releases. These are released as `0.x.y.betaN` versions. They receive the
|
|
same level of testing as normal releases and let you get access to the latest
|
|
features. However, we do not guarantee that preview releases will be available
|
|
more than 6 months after they are released. We may delete the preview releases
|
|
from the packaging index after a while. Once your application is stable, we
|
|
recommend switching to full releases, which will never be removed from package
|
|
indexes.
|
|
|
|
## Prepare a stable release
|
|
|
|
### Select the release baseline
|
|
|
|
Choose the SDK product commit for the planned release and record its SHA. Include
|
|
all fixes required for that release, including security fixes. Create and push a
|
|
release branch such as `release/v0.41` from that commit before opening the Lance RC
|
|
upgrade PR. For a patch to an existing stable line, reuse its release branch and
|
|
backport the required fixes.
|
|
|
|
Keep the selected product baseline while main continues development. If main
|
|
already tracks a newer Lance development version, retain that dependency on main
|
|
and prepare the stable Lance dependency on the SDK release branch. Any additional
|
|
fixes should arrive through reviewed PRs into the release branch and be validated.
|
|
|
|
### Validate the Lance RC
|
|
|
|
1. Open a **draft PR targeting the SDK release branch** to consume the exact Lance
|
|
RC. Check both the PR base and dependency references when using automation.
|
|
Update the Rust declarations and lockfile, Python dependency declarations and
|
|
lockfile, and Java Maven version consistently.
|
|
2. Wait for the RC artifacts needed by each SDK to be available, then run the
|
|
relevant Rust, Python, Node.js, Java, and packaging checks. Resolve compatibility
|
|
failures and rerun CI after changes to the PR or its release-branch base.
|
|
3. Complete code and compatibility review on the RC pin PR. If draft status
|
|
skips Gatekeeper or another applicable review, mark the PR ready for review or
|
|
explicitly run the review. Read the recommendation and inline findings even
|
|
when GitHub records them as comments. Passing CI or a skipped review does not
|
|
clear an unresolved blocking finding.
|
|
4. Before the Lance vote is closed and Lance stable is published, the pin PR
|
|
must be **ready to merge**: all relevant CI and reviews are complete, with no
|
|
unresolved blocking findings at its current head and release-branch base.
|
|
Refresh reviews and comments immediately before reporting readiness.
|
|
5. Report the exact Lance tag and peeled SHA,
|
|
SDK release-branch base and PR head SHAs (and tested merge commit, when
|
|
applicable), full CI results and review outcomes to the release manager.
|
|
Label local source checks separately from checks consuming the published RC
|
|
artifacts.
|
|
|
|
Keep the RC validation PR unmerged until Lance is approved, while completing all
|
|
substantive compatibility and review work before Lance stable publication. Once
|
|
the official stable Lance artifacts are available, only the mechanical
|
|
RC-to-stable dependency update and validation of those packages should remain.
|
|
Update the PR, rerun the relevant checks and refresh reviews. In particular,
|
|
verify that the Rust package resolves
|
|
published dependencies: Cargo only reads [`[patch]` settings at the workspace root](https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#the-patch-section),
|
|
so package consumers do not inherit a dependency's workspace override. Merge the
|
|
validated stable update into the SDK release branch.
|
|
|
|
### Publish the validated candidate
|
|
|
|
Run **Create Release Commit** from the verified SDK release-branch head. Do not
|
|
switch to a later main snapshot after validation. Start with a dry run, review the
|
|
expected version and lockfile updates, and use the same branch and release inputs
|
|
for the real run.
|
|
|
|
The workflow creates a new version commit and tag. Compare that tag with the
|
|
validated candidate and check that only the expected mechanical version and
|
|
lockfile updates were introduced. Code or dependency changes require renewed
|
|
validation. Verify all four SDK publishing workflows and the exact registry
|
|
artifacts, plus the three CLI archives and their `SHA256SUMS` on the GitHub
|
|
release, before reporting the stable release as complete. Download the CLI
|
|
archives, verify their checksums, and confirm their reported versions on the
|
|
corresponding platforms.
|
|
|
|
## Making releases
|
|
|
|
The release process uses a handful of GitHub actions to automate the process.
|
|
|
|
```text
|
|
┌─────────────────────┐
|
|
│Create Release Commit│
|
|
└─┬───────────────────┘
|
|
│ ┌──────────────┐
|
|
└──►(tag) vX.Y.Z ─┬─►│GitHub Release├───►CLI packages + GH Release
|
|
│ └──────────────┘
|
|
│ ┌────────────┐
|
|
├─►│PyPI Publish├─────►Python Wheels
|
|
│ └────────────┘
|
|
│ ┌───────────┐
|
|
├─►│NPM Publish├──────►NPM Packages
|
|
│ └───────────┘
|
|
│ ┌─────────────┐
|
|
├─►│Cargo Publish├────►Cargo Release
|
|
│ └─────────────┘
|
|
│ ┌─────────────┐
|
|
└─►│Maven Publish├────►Java Maven Repo Release
|
|
└─────────────┘
|
|
```
|
|
|
|
To start a release, trigger a `Create Release Commit` action from
|
|
[the workflows page](https://github.com/lancedb/lancedb/actions/workflows/make-release-commit.yml)
|
|
(Click on "Run workflow").
|
|
|
|
* **For a preview release**, leave the default parameters.
|
|
* **For a stable release**, select the verified release branch and set the `type` input to `stable`.
|
|
|
|
For example, dry-run a stable release from the selected branch:
|
|
|
|
```bash
|
|
gh workflow run make-release-commit.yml --repo lancedb/lancedb \
|
|
--ref release/v0.41 -f type=stable -f dry_run=true -f bump-minor=false
|
|
```
|
|
|
|
After reviewing the dry run, use the same branch and inputs with `dry_run=false`.
|
|
Select `bump-minor` according to the version and breaking-change check below.
|
|
|
|
> [!IMPORTANT]
|
|
> If there was a breaking change since the last stable release, and we haven't
|
|
> done so yet, we should increment the minor version. The CI will detect if this
|
|
> is needed and fail the `Create Release Commit` job. To fix, select the
|
|
> "bump minor version" option.
|
|
|
|
### Retrying Java publication
|
|
|
|
If the original Java publishing workflow can no longer be rerun, dispatch it
|
|
from `main` with the existing release tag. The workflow checks out that tag,
|
|
verifies the Maven versions, and uses the same destination and signing steps
|
|
as a tag-triggered run. Check the destination for the version before retrying.
|
|
|
|
```bash
|
|
gh workflow run java-publish.yml --repo lancedb/lancedb --ref main -f tag=v0.42.1
|
|
```
|
|
|
|
### CLI release packages
|
|
|
|
The GitHub Release workflow calls **CLI release packages** before creating the
|
|
release. Both stable and beta tags produce these archives:
|
|
|
|
* `lancedb-v<VERSION>-x86_64-unknown-linux-gnu.tar.gz`
|
|
* `lancedb-v<VERSION>-aarch64-unknown-linux-gnu.tar.gz`
|
|
* `lancedb-v<VERSION>-aarch64-apple-darwin.tar.gz`
|
|
|
|
Each archive contains a matching top-level directory with the `lancedb`
|
|
executable, `LICENSE`, and `RUST_THIRD_PARTY_LICENSES.html`. Linux builds target
|
|
glibc 2.28; x86_64 retains the repository's Haswell/AVX2 CPU requirements. macOS
|
|
builds target Apple Silicon on macOS 14 or newer.
|
|
|
|
Packaging runs on relevant PRs without publishing. To dry-run packaging on a
|
|
candidate branch before merging or tagging, run:
|
|
|
|
```bash
|
|
gh workflow run cli-release.yml --repo lancedb/lancedb --ref <candidate-branch>
|
|
```
|
|
|
|
Inspect the `cli-release` workflow artifact: it must contain all three archives
|
|
and a matching `SHA256SUMS`. The workflow checks runtime library compatibility
|
|
and runs the extracted executables; Linux also runs on a clean AlmaLinux 8
|
|
system. A tag must match both the CLI and SDK manifests before any build starts.
|
|
|
|
A CLI packaging failure blocks GitHub release creation. SDK registry workflows
|
|
run independently. Fix the failure and rerun the failed GitHub Release jobs;
|
|
the publishing job replaces assets with matching names on an existing release.
|
|
Verify beta releases remain marked as prereleases and do not take the latest
|
|
release designation.
|
|
|
|
### Python CLI wheels
|
|
|
|
When **GitHub Release** finishes, **CLI Python wheels** runs from `main` for the
|
|
stable tag if that attempt published the CLI archives. It verifies the archives
|
|
against `SHA256SUMS`, bundles the native executable and its notices, and saves the three wheels as
|
|
the `lancedb-tools-wheels` Actions artifact. Python package versions follow
|
|
PEP 440 (for example, CLI `v0.42.0-beta.30` becomes `0.42.0b30`).
|
|
|
|
The same run builds a source distribution from the tagged Rust workspace and
|
|
saves it as `lancedb-tools-sdist`. Installers can compile the CLI locally when
|
|
no wheel matches. Source builds need rustup, a C/C++ compiler, CMake, and
|
|
`protoc`. The Intel macOS job installs by package name from the four release
|
|
files and checks that the installer chose the source archive and built a
|
|
working x86-64 executable.
|
|
|
|
The workflow tests `uvx` and `pipx` against the artifact on each supported
|
|
platform. To try a downloaded wheel on a matching machine, substitute its
|
|
local path for `"$wheel"`:
|
|
|
|
```sh
|
|
uvx --from "$wheel" lancedb --version
|
|
pipx install "$wheel"
|
|
lancedb profile list
|
|
```
|
|
|
|
To recover a missed automatic run, first check the **CLI Python wheels** run
|
|
history for the tag. If the release archives are published and the tag has no
|
|
wheel run, dispatch it from `main`:
|
|
|
|
```sh
|
|
gh workflow run cli-wheels.yml --repo lancedb/lancedb --ref main -f tag=v0.42.0 -f publish=true
|
|
```
|
|
|
|
After the three wheel tests and the Intel macOS source install pass, a member of the `release` team checks
|
|
the tag and install results and approves the `pypi-cli` deployment in the workflow run.
|
|
The upload job publishes the tested wheels and source archive and verifies their SHA-256 digests
|
|
against PyPI. If an upload stops partway, rerun the failed job in the same run
|
|
to finish uploading the original wheels. To verify the public install:
|
|
|
|
```sh
|
|
uvx --from lancedb-tools==0.42.0 lancedb --version
|
|
```
|
|
|
|
Before the first upload, a repository admin creates the `pypi-cli` Actions
|
|
environment with a required reviewer and permits deployments only from the
|
|
`main` branch. A PyPI maintainer registers a pending GitHub Trusted Publisher
|
|
for the `lancedb-tools` project with owner `lancedb`, repository `lancedb`,
|
|
workflow `cli-wheels.yml`, and environment `pypi-cli`.
|
|
|
|
### Homebrew tap updates
|
|
|
|
After a stable GitHub release publishes, the `homebrew` job reads its
|
|
`SHA256SUMS` and opens a PR against `lancedb/homebrew-tap`. Review the
|
|
version and three checksums, wait for the tap's install tests, then merge the
|
|
PR manually. Rerunning the failed job reuses the release-specific branch.
|
|
|
|
Before enabling the job, land the initial `Formula/lancedb.rb` on the tap's
|
|
`main` branch and configure the release credentials:
|
|
|
|
1. Register a private GitHub App under the LanceDB organization. Grant repository
|
|
permissions **Contents** and **Pull requests** (both read and write). Leave
|
|
webhooks disabled. Install the App on the selected repository
|
|
`lancedb/homebrew-tap`.
|
|
2. In `lancedb/lancedb`, create a GitHub Actions environment named
|
|
`homebrew-tap`. Under deployment branches and tags, select tags matching
|
|
`v*`. Add the App's **Client ID** as the environment variable
|
|
`HOMEBREW_TAP_APP_CLIENT_ID` and its generated PEM private key as the
|
|
environment secret `HOMEBREW_TAP_APP_PRIVATE_KEY`.
|
|
|
|
The release job exchanges the key for a short-lived tap installation token.
|
|
If opening the tap PR fails, fix the configuration and rerun the failed job
|
|
against the already published release.
|
|
|
|
## Breaking changes
|
|
|
|
We try to avoid breaking changes, but sometimes they are necessary. When there
|
|
are breaking changes, we will increment the minor version. (This is valid
|
|
semantic versioning because we are still in `0.x` versions.)
|
|
|
|
When a PR makes a breaking change, the PR author should mark the PR using the
|
|
conventional commit markers: either exclamation mark after the type
|
|
(such as `feat!: change signature of func`) or have `BREAKING CHANGE` in the
|
|
body of the PR. A CI job will add a `breaking-change` label to the PR, which is
|
|
what will ultimately be used to CI to determine if the minor version should be
|
|
incremented.
|
|
|
|
> [!IMPORTANT]
|
|
> Reviewers should check that PRs with breaking changes receive the `breaking-change`
|
|
> label. If a PR is missing the label, please add it, even if after it was merged.
|
|
> This label is used in the release process.
|
|
|
|
Some things that are considered breaking changes:
|
|
|
|
* Upgrading `lance` to a new minor version. Minor version bumps in Lance are
|
|
considered breaking changes during `0.x` releases. This can change behavior
|
|
in LanceDB.
|
|
* Upgrading a dependency pin that is in the Rust API. In particular, upgrading
|
|
`DataFusion` and `Arrow` are breaking changes. Changing dependencies that are
|
|
not exposed in our public API are not considered breaking changes.
|
|
* Changing the signature of a public function or method.
|
|
* Removing a public function or method.
|
|
|
|
We do make exceptions for APIs that are marked as experimental. These are APIs
|
|
that are under active development and not in major use. These changes should not
|
|
receive the `breaking-change` label.
|