You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Update lance-duckdb to a specific Lance release or tag. Use when bumping Lance Rust dependencies in the lance-duckdb repository, including Cargo.toml, Cargo.lock, validation, branch creation, commit, push, and PR creation when requested.
4
+
---
5
+
6
+
# lance-duckdb Update Lance Dependency
7
+
8
+
## Scope
9
+
10
+
Use this skill in the `lance-format/lance-duckdb` repository when updating Lance Rust dependencies to a specific Lance version or tag.
11
+
12
+
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`.
13
+
14
+
## Workflow
15
+
16
+
1. Confirm the worktree status with `git status --short`.
17
+
2. Resolve the target Lance version:
18
+
19
+
- If the input is `latest`, empty, or omitted, run:
20
+
21
+
```bash
22
+
python3 ci/check_lance_release.py
23
+
```
24
+
25
+
Parse the JSON output. If `needs_update` is not `true`, stop without creating a PR. Otherwise use `latest_tag`.
26
+
27
+
- If the input is explicit, use it directly.
28
+
29
+
3. Compute update metadata without changing files:
This updates the direct Lance Rust crate versions in`Cargo.toml`, removes repository-local Lance `[patch.crates-io]` entries if present, refreshes `Cargo.lock` with precise Cargo updates, and prints JSON metadata containing `branch_name`, `commit_message`, and `pr_title`.
If Cargo reports incompatible Arrow/DataFusion requirements, inspect the target Lance release requirements and update the pinned Arrow/DataFusion versions in`Cargo.toml`, then rerun `python3 ci/update_lance_dependency.py "$TAG_OR_VERSION"` and the validation commands. Fix real diagnostics and rerun validation until it succeeds.
60
+
61
+
6. Inspect `git status --short` and `git diff` to ensure only the Lance dependency update and required compatibility fixes are present.
62
+
63
+
7. If the task only asks to prepare local changes, stop here and report the changed files and validation result.
64
+
65
+
8. If the task asks to publish the update, create a branch using the printed `branch_name`, stage all relevant files, and commit using the printed `commit_message`. Do not amend or rewrite existing commits.
66
+
67
+
9. Push to `origin`. Before creating the PR, check that the current token has push permission:
68
+
69
+
```bash
70
+
gh api repos/lance-format/lance-duckdb --jq .permissions.push
71
+
```
72
+
73
+
If the remote branch already exists for the same generated branch name, delete the remote ref with `gh api -X DELETE repos/lance-format/lance-duckdb/git/refs/heads/$BRANCH_NAME`, then push. Do not force-push.
74
+
75
+
10. Create a PR targeting `main` with the printed `pr_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.
76
+
77
+
11. Read back the remote PR title after creation. If it is not a Conventional Commit title, fix it immediately.
78
+
79
+
## GitHub Actions
80
+
81
+
This workflow is intentionally manual. 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:
- Do not add or keep a [patch.crates-io] section for Lance crates; dependencies must come from crates.io stable releases only.
105
-
2. Update Cargo.lock to match the new versions.
106
-
- Prefer precise updates like:
107
-
cargo update -p lance --precise ${VERSION}
108
-
cargo update -p lance-arrow --precise ${VERSION}
109
-
... (repeat for each of the crates above)
110
-
- If Cargo complains about incompatible Arrow/DataFusion versions, update the pinned Arrow/DataFusion versions in Cargo.toml to match the Lance ${VERSION} dependency requirements, then update Cargo.lock again.
4. Inspect "git status --short" and "git diff" to confirm the dependency update and any required fixes.
116
-
5. Create and switch to a new branch named "${BRANCH_NAME}" (replace any duplicated hyphens if necessary).
117
-
6. Stage all relevant files with "git add -A". Commit using the message "chore: update lance dependency to v${VERSION}".
118
-
7. Push the branch to origin. If the remote branch already exists, delete it first with "gh api -X DELETE repos/lance-format/lance-duckdb/git/refs/heads/${BRANCH_NAME}" then push with "git push origin ${BRANCH_NAME}". Do NOT use "git push --force" or "git push -f".
119
-
8. env "GH_TOKEN" is available; use "gh" tools for GitHub operations like creating pull requests.
120
-
9. Create a pull request targeting "main" with title "chore: update lance dependency to v${VERSION}".
121
-
- First, write the PR body to /tmp/pr-body.md using a heredoc (cat <<'EOF' > /tmp/pr-body.md).
122
-
- The body should summarize the dependency bump, key resolver changes (if any), the commands run in step 3, and link the triggering tag (${TAG}).
123
-
- Then run "gh pr create --body-file /tmp/pr-body.md".
124
-
10. Display the PR URL, "git status --short", and a concise summary of the commands run and their results.
79
+
Use \$lance-duckdb-update-lance-dependency with target "${TARGET_TAG}".
125
80
126
81
Constraints:
127
-
- Use bash commands.
128
-
- Do not merge the PR.
129
-
- If any command fails, diagnose and fix the issue instead of aborting.
130
-
- For compatibility issues, consult lance-format/lance at tag v${VERSION} for the expected Rust dependency versions.
82
+
- Use env "GH_TOKEN" for GitHub operations.
83
+
- Do not merge the pull request.
84
+
- Do not force-push.
85
+
- Do not create a duplicate pull request if an open PR already exists for the target Lance version.
86
+
- If any command fails, diagnose and fix the root cause instead of aborting.
87
+
- For compatibility issues, consult lance-format/lance at the target tag for the expected Rust dependency versions.
88
+
- After creating the PR, display the PR URL, "git status --short", and a concise summary of the commands run and their results.
0 commit comments