lancedb-update-lance-dependency
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLanceDB Update Lance Dependency
LanceDB 更新Lance依赖
Scope
适用范围
Use this skill in the repository when updating the Lance dependency to a specific Lance version or tag.
lancedb/lancedbInputs can be a version (), a tag (), a tag ref (), or .
7.2.0-beta.1v7.2.0-beta.1refs/tags/v7.2.0-beta.1latest在仓库中,当将Lance依赖更新至特定Lance版本或标签时使用该技能。
lancedb/lancedb输入可以是版本(如)、标签(如)、标签引用(如)或。
7.2.0-beta.1v7.2.0-beta.1refs/tags/v7.2.0-beta.1latestWorkflow
工作流程
-
Confirm the worktree status with.
git status --short -
Resolve the target Lance version:
-
If the input is, empty, or omitted, run:
latestbashpython3 ci/check_lance_release.pyParse the JSON output. Ifis notneeds_update, stop without creating a PR. Otherwise usetrue.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-onlyBefore making changes, check for an existing open PR with the emitted:pr_titlebashgh pr list --search "\"$PR_TITLE\" in:title" --state open --limit 1 --json number,url,titleIf 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, updatesci/set_lance_version.py, refreshes Cargo metadata, and prints JSON metadata containingjava/pom.xml,branch_name, andcommit_message.pr_title -
Run validation:bash
cargo clippy --quiet --workspace --tests --all-features -- -D warnings cargo fmt --all --quietFix real diagnostics and rerun clippy until it succeeds. Do not skip warnings. -
Inspectand
git status --shortto ensure only the Lance dependency update and required compatibility fixes are present.git diff -
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, stage all relevant files, and commit using the printed
branch_name. Do not amend or rewrite existing commits.commit_message -
Push to. Before creating the PR, check that the current token has push permission:
originbashgh api repos/lancedb/lancedb --jq .permissions.pushIf the remote branch already exists for the same generated branch name, delete the remote ref with, then push. Do not force-push.gh api -X DELETE repos/lancedb/lancedb/git/refs/heads/$BRANCH_NAME -
Create a PR targetingwith the printed
main. 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.pr_title -
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,displayTitleUse the emitted metadatavalue astag. 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.LANCE_TAG
-
使用确认工作区状态。
git status --short -
解析目标Lance版本:
-
若输入为、空值或未提供,执行:
latestbashpython3 ci/check_lance_release.py解析JSON输出。若不为needs_update,则停止操作,不创建PR。否则使用true。latest_tag -
若输入为明确值,则直接使用该值。
-
-
在不修改文件的情况下计算更新元数据:bash
python3 ci/update_lance_dependency.py "$TAG_OR_VERSION" --metadata-only在进行修改前,检查是否存在标题与输出的匹配的已开放PR:pr_titlebashgh pr list --search "\"$PR_TITLE\" in:title" --state open --limit 1 --json number,url,title若存在匹配的已开放PR,则停止操作并告知该PR,避免创建重复内容。 -
执行确定性更新入口命令:bash
python3 ci/update_lance_dependency.py "$TAG_OR_VERSION"该命令会通过更新Rust工作区的Lance依赖,更新ci/set_lance_version.py,刷新Cargo元数据,并打印包含java/pom.xml、branch_name和commit_message的JSON元数据。pr_title -
执行验证:bash
cargo clippy --quiet --workspace --tests --all-features -- -D warnings cargo fmt --all --quiet修复实际诊断问题并重新运行clippy,直至成功。请勿忽略警告。 -
通过和
git status --short检查,确保仅存在Lance依赖更新及必要的兼容性修复内容。git diff -
若任务仅要求准备本地修改,则在此步骤停止,并报告已修改的文件和验证结果。
-
若任务要求发布更新,则使用打印的创建分支,暂存所有相关文件,并使用打印的
branch_name提交。请勿修改或重写现有提交。commit_message -
推送到。创建PR前,检查当前令牌是否拥有推送权限:
originbashgh api repos/lancedb/lancedb --jq .permissions.push若对应生成的分支名称已存在远程分支,使用删除远程引用,然后推送。请勿强制推送。gh api -X DELETE repos/lancedb/lancedb/git/refs/heads/$BRANCH_NAME -
创建以为目标分支的PR,标题使用打印的
main。若无PR模板,PR正文保持2-3句简洁内容:说明Lance依赖升级情况,标注必要的兼容性修复,并关联触发本次更新的Lance标签或版本。pr_title -
PR创建后查看远程PR标题。若不符合Conventional Commit规范,立即修正。
-
在GitHub Actions中创建LanceDB PR后,触发Sophon依赖更新: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使用输出元数据中的值作为tag。仅在创建新的LanceDB PR后执行此操作。若因无需更新或已存在开放PR而跳过更新,则不触发Sophon更新。LANCE_TAG
GitHub Actions
GitHub Actions
When this skill is used from GitHub Actions, , , and may already be set. Resolve first when is empty. Once an explicit tag or version is known, use:
TAGGH_TOKENGITHUB_TOKENlatestTAGbash
python3 ci/update_lance_dependency.py "$TAG" --github-output "$GITHUB_OUTPUT"Then use the emitted , , and values for branch, commit, and PR creation.
branch_namecommit_messagepr_title当在GitHub Actions中使用该技能时,、和可能已预先设置。若为空,先解析。确定明确的标签或版本后,执行:
TAGGH_TOKENGITHUB_TOKENTAGlatestbash
python3 ci/update_lance_dependency.py "$TAG" --github-output "$GITHUB_OUTPUT"随后使用输出的、和值进行分支创建、提交和PR创建。
branch_namecommit_messagepr_title