ci: automatically update Cargo.lock (#2416)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Chores**
- Updated workflow to ignore changes in the `Cargo.lock` file during
documentation checks, reducing unnecessary workflow failures.
- Enhanced release process by adding automated lockfile updates for
Node.js and Rust components.
- Removed an obsolete package-lock update job from the publishing
workflow to streamline releases.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Will Jones
2025-06-03 07:49:21 -07:00
committed by GitHub
parent 0525c055fc
commit 570f2154d5
5 changed files with 24 additions and 23 deletions

View File

@@ -84,6 +84,7 @@ jobs:
run: |
pip install bump-my-version PyGithub packaging
bash ci/bump_version.sh ${{ inputs.type }} ${{ inputs.bump-minor }} v $COMMIT_BEFORE_BUMP
bash ci/update_lockfiles.sh
- name: Push new version tag
if: ${{ !inputs.dry_run }}
uses: ad-m/github-push-action@master

View File

@@ -116,7 +116,7 @@ jobs:
set -e
npm ci
npm run docs
if ! git diff --exit-code; then
if ! git diff --exit-code -- . ':(exclude)Cargo.lock'; then
echo "Docs need to be updated"
echo "Run 'npm run docs', fix any warnings, and commit the changes."
exit 1

View File

@@ -546,21 +546,3 @@ jobs:
notification_title: "{workflow} is failing"
env:
SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }}
update-package-lock:
if: startsWith(github.ref, 'refs/tags/v')
needs: [release]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: main
token: ${{ secrets.LANCEDB_RELEASE_TOKEN }}
fetch-depth: 0
lfs: true
- uses: ./.github/workflows/update_package_lock
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

8
Cargo.lock generated
View File

@@ -4123,7 +4123,7 @@ dependencies = [
[[package]]
name = "lancedb"
version = "0.19.2-beta.0"
version = "0.20.0-beta.0"
dependencies = [
"arrow",
"arrow-array",
@@ -4210,7 +4210,7 @@ dependencies = [
[[package]]
name = "lancedb-node"
version = "0.19.2-beta.0"
version = "0.20.0-beta.0"
dependencies = [
"arrow-array",
"arrow-ipc",
@@ -4235,7 +4235,7 @@ dependencies = [
[[package]]
name = "lancedb-nodejs"
version = "0.19.2-beta.0"
version = "0.20.0-beta.0"
dependencies = [
"arrow-array",
"arrow-ipc",
@@ -4255,7 +4255,7 @@ dependencies = [
[[package]]
name = "lancedb-python"
version = "0.22.2-beta.0"
version = "0.23.0-beta.0"
dependencies = [
"arrow",
"env_logger",

18
ci/update_lockfiles.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env bash
set -euo pipefail
# This updates the lockfile without building
cargo metadata > /dev/null
pushd nodejs || exit 1
npm install --package-lock-only
popd
pushd node || exit 1
npm install --package-lock-only
popd
if git diff --quiet --exit-code; then
echo "No lockfile changes to commit; skipping amend."
else
git commit --amend --no-edit
fi