LanceDB Update Lance Dependency
Scope
Use this skill in the lancedb/lancedb repository when updating the Lance dependency to a specific Lance version or tag.
Inputs can be a version (7.2.0-beta.1), a tag (v7.2.0-beta.1), a tag ref (refs/tags/v7.2.0-beta.1), or latest.
Workflow
- Confirm the worktree status with
git status --short. - Resolve the target Lance version:
- If the input is
latest, empty, or omitted, run:
```bash
python3 ci/check_lance_release.py
```
Parse the JSON output. If needs_update is not true, stop without creating a PR. Otherwise use latest_tag.
- If the input is explicit, use it directly.
- Compute update metadata without changing files:
```bash
python3 ci/update_lance_dependency.py "$TAG_OR_VERSION" --metadata-only
```
Before making changes, check for an existing open PR with the emitted pr_title:
```bash
gh pr list --search "\"$PR_TITLE\" in:title" --state open --limit 1 --json number,url,title
```
If a matching open PR exists, stop and report it instead of creating a duplicate.
- Run the deterministic update entrypoint:
```bash
python3 ci/update_lance_dependency.py "$TAG_OR_VERSION"
```
This updates the Rust workspace Lance dependencies through ci/set_lance_version.py, updates java/pom.xml, refreshes Cargo metadata, and prints JSON metadata containing branch_name, commit_message, and pr_title.
Also synchronize the Python requirements in python/pyproject.toml: set the
tests extra's exact pylance pin to the matching published Python release,
and update the pylance extra's minimum when needed to exclude older bundled
Lance majors. The minimum must still accept the test pin. Python prerelease
spelling differs from Rust (for example, 15.0.0-beta.1 becomes 15.0.0b1).
Confirm the matching Python release is published before changing the pin.
Refresh and check python/uv.lock from the repository root:
```bash
uv lock --project python --index https://pypi.fury.io/lancedb/ --index https://pypi.fury.io/lance-format/ --index-strategy unsafe-best-match
uv lock --project python --check --index https://pypi.fury.io/lancedb/ --index https://pypi.fury.io/lance-format/ --index-strategy unsafe-best-match
```
This strategy considers versions across indexes; use it only with trusted
indexes. Commit the Python requirements and lockfile together with the bump.
- Run validation:
```bash
cargo clippy --quiet --workspace --tests --all-features -- -D warnings
cargo fmt --all --quiet
```
Fix real diagnostics and rerun clippy until it succeeds. Do not skip warnings.
Run the Python dependency guards with Python 3.11+ and packaging installed:
```bash
python3 -m unittest discover -s ci/tests -p test_python_dependencies.py -v
```
These checks reject older Lance majors and ensure the pylance and tests
extras remain compatible. The full CI-script suite uses
python3 -m unittest discover -s ci/tests -v.
- Inspect
git status --shortandgit diffto ensure only the Lance dependency update and required compatibility fixes are present.
- If the task only asks to prepare local changes, stop here and report the changed files and validation result.
- If the task asks to publish the update, create a branch using the printed
branch_name, stage all relevant files, and commit using the printedcommit_message. Do not amend or rewrite existing commits.
- Push to
origin. Before creating the PR, check that the current token has push permission:
```bash
gh api repos/lancedb/lancedb --jq .permissions.push
```
If the remote branch already exists for the same generated branch name, delete the remote ref with gh api -X DELETE repos/lancedb/lancedb/git/refs/heads/$BRANCH_NAME, then push. Do not force-push.
- Create a PR targeting
mainwith the printedpr_title. If there is no PR template, keep the body to two or three concise sentences: state the Lance dependency bump, note any required compatibility fixes, and link the triggering Lance tag or release.
- Read back the remote PR title after creation. If it is not a Conventional Commit title, fix it immediately.
- When running in GitHub Actions after creating the LanceDB PR, trigger the Sophon dependency update:
```bash
gh workflow run codex-bump-lancedb-lance.yml \
--repo lancedb/sophon \
-f lance_ref="$LANCE_TAG" \
-f lancedb_ref="$BRANCH_NAME"
gh run list --repo lancedb/sophon --workflow codex-bump-lancedb-lance.yml --limit 1 --json databaseId,url,displayTitle
```
Use the emitted metadata tag value as LANCE_TAG. Do this only after a new LanceDB PR has been created. If the update was skipped because no update is needed or an open PR already exists, do not trigger Sophon.
GitHub Actions
When this skill is used from GitHub Actions, TAG, GH_TOKEN, and GITHUB_TOKEN may already be set. Resolve latest first when TAG is empty. Once an explicit tag or version is known, use:
python3 ci/update_lance_dependency.py "$TAG" --github-output "$GITHUB_OUTPUT"
Then use the emitted branch_name, commit_message, and pr_title values for branch, commit, and PR creation.