mirror of
https://github.com/lancedb/lancedb.git
synced 2026-12-03 07:45:17 +00:00
80c889cd9e9807dc8f2e643ca6916512d4ef6c72
16
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
c9faa78cc6 |
feat(python): add free-threaded CPython 3.15 wheel support (#4961)
## Problem The existing `cp310-abi3` wheel cannot be installed on free-threaded CPython 3.15. ## Changes - Keep `abi3-py310` in the default Cargo feature set and provide a separate native free-threaded build profile with the same Python distribution features. - Build and validate `cp315-cp315t` release wheels for Linux x86-64 and ARM64, macOS ARM64, and Windows x64; collect them with the existing release artifacts. - Add a Linux 3.15t CI job and tests for GIL state, concurrent operations, and persistence. The existing regular-Python jobs retain the full test suite. - Validate compressed manylinux platform tags against the expanded `WHEEL` metadata and use workspace-relative wheel paths in Python CI. ## Validation - Built and validated Windows x64 `lancedb-0.42.0b10-cp310-abi3-win_amd64.whl` and `lancedb-0.42.0b10-cp315-cp315t-win_amd64.whl` with Maturin 1.15.0 and `--profile ci`. - On the current PR commit `eecf193`, rebuilt the Windows x64 native wheel, installed it on official CPython 3.15.0t, and ran `python -m pytest python/python/tests/test_free_threaded.py -q`: 2 passed, including GIL state and concurrent database operations. - On the current PR commit, built a native Linux x86-64 `cp315-cp315t` wheel with Maturin 1.15.0 and `--profile ci`, validated its wheel metadata, installed it on CPython 3.15.2t, and ran `python -m pytest python/tests/test_free_threaded.py -q`: 2 passed. This local Linux wheel uses the native `linux_x86_64` platform tag, not a manylinux tag. - Cargo feature regression check, Ruff, Python syntax, workflow YAML parsing, and `git diff --check` passed. - `python -m unittest discover -s ci/tests -p test_check_python_wheel.py -v`: 4 passed on Windows and WSL Linux, including compressed manylinux tags and mismatched metadata. The workflow's corrected wheel glob was also checked from the `python` directory under WSL, and the two free-threaded runtime tests passed from that directory on Windows. The local ABI3 regression wheel was built before the rebase. The native Windows and Linux free-threaded wheels and concurrency tests were built from the current PR commit `eecf193`. The macOS and Linux manylinux release artifacts still need validation in upstream CI. The full test extra pulls optional dependencies requiring source builds on 3.15t, so the new job installs the wheel and focused test dependencies; regular jobs still run the full suite. The complete CI-script suite passed locally on WSL Linux at commit `eecf193`: `python3 -m unittest discover -s ci/tests -v` ran 39 tests successfully with Rust 1.97, a user-space GCC toolchain, and Python's `packaging` module. The upstream CI-script run is marked `action_required`. Closes #4641 |
||
|
|
d0dfa0d8f0 |
fix(java): fall back to curl when Maven Wrapper wget fails (#5231)
Fixes #5224 The Java beta release job stopped before Maven started. The job log shows that the wrapper cache was empty and wget failed to fetch the Maven distribution. The wrapper exited immediately even when curl was available. [Issue #5224](https://github.com/lancedb/lancedb/issues/5224) Use the existing curl download path when wget fails and curl is installed. Keep wget as the first choice and continue using the same distribution URL, archive validation, and cache. The wrapper still exits with an error if it cannot download the archive. Tests: `python3 -m unittest discover -s ci/tests -p test_maven_wrapper.py -v`. Result: Base: python3 -m unittest discover -s ci/tests -p test_maven_wrapper.py -v exited 1. The fallback regression reproduced the terminal wget error, and the successful-wget case passed. Result: Patched: python3 -m unittest discover -s ci/tests -p test_maven_wrapper.py -v exited 0. Both wrapper tests passed, including the cached invocation in the fallback test. Result: Patched: python3 -m unittest discover -s ci/tests -v exited 0 with Ran 40 tests and OK. Result: Base: (cd java && JAVA_HOME=/usr/lib/jvm/temurin-17-jdk-amd64 ./mvnw --batch-mode test -pl lancedb-core) exited 0 with 37 tests, 0 failures, 0 errors, and 0 skipped. Result: Patched: (cd java && JAVA_HOME=/usr/lib/jvm/temurin-17-jdk-amd64 ./mvnw --batch-mode -Dspotless.skip=true clean test -pl lancedb-core) exited 0 with 37 tests, 0 failures, 0 errors, and 0 skipped. Surefire XML reports are in java/lancedb-core/target/surefire-reports/. Result: Patched: The Temurin 8 cold-cache deployment command in setup_steps exited 0 and reported BUILD SUCCESS for lancedb-parent and lancedb-core after logging 'wget download failed, trying curl'. Both POMs and all three JARs were present in the file repository. Result: Patched: uvx ruff format --check ci/tests/test_maven_wrapper.py, uvx ruff check ci/tests/test_maven_wrapper.py, sh -n java/mvnw, shellcheck java/mvnw, and git diff --check passed. Regression coverage: `ci/tests/test_maven_wrapper.py`. <!-- oss-scout-job:job-71b2ce3e-46b8-467c-8342-2f1d491dd63c --> Signed-off-by: wangshun <96341168+xixi-box@users.noreply.github.com> |
||
|
|
09b8ec1134 |
ci: open Homebrew tap PRs for stable CLI releases (#5173)
Stable CLI releases already publish three binary archives and their checksums, but a maintainer would have to copy those checksums into the Homebrew formula for every release. This adds a job that opens a PR in the tap after GitHub publishes a stable release. Tap CI tests the published binaries and a maintainer merges the update. Before the first automated update, merge the initial [stable formula](https://github.com/lancedb/homebrew-tap/pull/1) and configure the GitHub App as described in `release_process.md`. This was accomplished with the following changes: - Read `SHA256SUMS` from the published tag and update the formula version and the hash for each matching platform archive. - Use a tap-scoped App token and a branch per release so retries update the same PR. Older release retries preserve newer formula versions. ### Testing All 38 CI-script tests passed locally, including checksum mapping, invalid or incomplete manifests, prerelease rejection, and retries. A dry run against the actual draft formula with a simulated stable manifest produced valid Ruby and a second run produced no changes. Live App authentication and tap PR creation require the installation credentials. |
||
|
|
a0e65400a9 |
fix(java): keep Maven coordinates in sync with release tags (#5151)
Fixes #4937 ## Summary The `v0.42.0-beta.21` release commit retained `0.42.0-beta.20` in both Java POMs, so its Maven build produced coordinates for the previous beta. The release bump used a Maven version hook whose final shell commands could return success after Maven failed, allowing the tag to be created with stale coordinates. [Issue #4937](https://github.com/lancedb/lancedb/issues/4937) Declare both Maven version fields in the shared version-bump configuration and align the checked-in POMs with the current release version. Preview and stable release bumps now apply the same version to the parent POM and the core module's parent reference before tagging. Package names, dependencies, and publication destinations are preserved. ## Verification Tests: `/bin/sh -c 'PATH=/tmp/osscout-release-venv/bin:$PATH bash ci/tests/test_bump_version.sh'`. Result: PATH=/tmp/osscout-release-venv/bin:$PATH bash ci/tests/test_bump_version.sh — base exit 1 with the tag/POM mismatch, patched exit 0 with both preview and stable cases passing. Result: python -m unittest discover -s ci/tests -v — base, 35 passed. Result: /tmp/osscout-release-venv/bin/python -m unittest discover -s ci/tests -v — patched, 35 passed. Result: bash ci/tests/test_cli_installer.sh — passed. Result: cd java && ./mvnw --batch-mode test -pl lancedb-core — base, 37 passed on JDK 25. Result: cd java && JAVA_HOME=/usr/lib/jvm/temurin-17-jdk-amd64 ./mvnw --batch-mode -Dspotless.skip=true clean test -pl lancedb-core — patched, 37 passed. Surefire XML reports are in java/lancedb-core/target/surefire-reports/. Result: osscout_base_work=$(mktemp -d) && git archive HEAD java | tar -xf - -C "$osscout_base_work" && cd "$osscout_base_work/java" && JAVA_HOME=/tmp/osscout-jdk8 ./mvnw --batch-mode -DskipTests -Dspotless.skip=true clean deploy -pl lancedb-core -am -P deploy-to-fury -DaltDeploymentRepository=fury::file:///tmp/osscout-fury-base — base build succeeded and emitted stale 0.42.0-beta.20 artifacts for the 0.42.0-beta.21 release sources. Result: cd java && JAVA_HOME=/tmp/osscout-jdk8 ./mvnw --batch-mode -DskipTests -Dspotless.skip=true clean deploy -pl lancedb-core -am -P deploy-to-fury -DaltDeploymentRepository=fury::file:///tmp/osscout-fury-deploy — patched build succeeded and emitted both 0.42.0-beta.21 POMs and the main, sources and Javadoc JARs. Regression coverage: `ci/tests/test_bump_version.sh`. <!-- oss-scout-job:job-d5fa2e08-6a6f-46ca-821c-d3a65d054055 --> Signed-off-by: wangshun <96341168+xixi-box@users.noreply.github.com> |
||
|
|
dd69a2c535 |
feat(cli): install release binaries with a shell script (#5082)
Install the public CLI from GitHub Releases with `sh scripts/install.sh`. The script selects the macOS Apple Silicon or Linux ARM64/x86-64 archive, verifies its SHA-256 and reported version, and installs it under the user's home directory. Set `LANCEDB_VERSION` to pin a release, including a beta. The default resolves GitHub's latest stable tag, which must have CLI assets. If an Enterprise or other `lancedb` is already on PATH, the installer asks for a separate install directory. An existing destination (including a symlink) is always preserved. The installer workflow exercises that same release on all three native targets and checks checksum failures and existing executable handling. |
||
|
|
db098ba812 |
fix(ci): support Cargo 1.100 artifact layout in cleanup fixture (#5010)
Cargo 1.100 moves intermediate compiler artifacts into per-unit build directories and emits `build_script_build` instead of `build-script-build`. The unlocked-build fixture currently fails on its old rlib path before the SDK build starts, even though the library survives cleanup. Discover compiler inputs recursively and accept both build-script names while preserving the library, generated-input, ordinary-executable, discarded-test, linker-failure and outside-target assertions. The standalone fixture reproduces the failure before this change and passes afterward on Rust/Cargo 1.100.0; it also passes on 1.97.0. Fault injection confirms missing libraries and other retained inputs still fail their assertions. Production cleanup and normal workflow coverage are unchanged. |
||
|
|
181ac2b567 |
test: match SDK documentation fallback URL (#4875)
Update the SDK documentation-link CI assertion to match the production fallback URL introduced by #4870. #4870 changed `rust/lancedb/src/docs.rs` from `/enterprise` to `/basics/embedded-vs-enterprise`. The extractor already reads that source, but its regression test still expected the old value. Keep the assertion and update only the expected URL. Verification: `python -m unittest discover -s ci/tests -v` passes 35/35 on Python 3.12. The same command on main `3c4aaa8e` fails only `test_extracts_all_links_from_repo_docs_rs`. |
||
|
|
2dedde9b6c |
feat(python)!: expose typed query errors and request metadata (#4832)
Remote SQL failures currently become generic runtime errors, and HTTP table lookup can discard server error metadata. Preserve transport status, current request ID, SQL job ID and worker request ID across Rust and Python. Select typed column, table, reference and schema exceptions only when an explicit server code matches the transport status. Remote `HttpError` and `RuntimeError` handlers remain compatible. Failed SQL jobs retain `JobFailedError` with a typed SQL cause when available. Missing metadata stays absent; message text never determines the exception class. Local missing-column errors retain their type and qualified-field suggestions, and `JobFailure.source` documents structured remote Flight SQL failures. This branch integrates main at `a9ad4997`, including its released Lance 15.0.0-beta.9 dependency update and remote optimize support. The only textual conflict was two independent additions to `test_remote_db.py`; both test groups and all original assertions are retained. The feature has no dependency or lockfile delta against current main. SDK runtime validation on `03ee633a` (runtime source unchanged in `f3f2d0b8`), macOS ARM64, pinned Rust 1.97.0 and the frozen uv Python 3.14 environment: - Rebuilt the native extension from the integrated source. All 22 targeted Python tests passed: native local errors, HTTP/Flight metadata, legacy sync/async table-not-found behavior, and the three main remote-optimize regressions. - All 52 Rust SQL, metadata/source and nested-field tests passed, including the new main optimize cases. - Root and Python-binding Rust Clippy with `-D warnings`, Rust formatting, Python package Ruff and conflict-file formatting passed. - Repository-wide Ruff reports 59 existing documentation findings, and its format check identifies six documentation files. Every affected file is byte-identical to current main; these checks are not reported as passing. - Direct integration review and AST comparison confirm both conflicting test groups were preserved. Earlier exception-constructor/pickling evidence remains applicable to the unchanged Python error modules. The unlocked build exhausted disk again on a runner with the same label but only 9.4 GiB free on a 72 GiB root filesystem. Keep the existing runner and dependency caches, serialize Cargo compilation, and remove only completed test/bench executables reported by Cargo. This job never runs those binaries; normal binaries, libraries and build-script outputs remain available. Fresh resolution, the ci profile, all features, and test/bench compilation and linking are retained. Three probes using Cargo and target-path validation pass with `-D warnings`: all fixture targets link while ordinary outputs remain usable; an undefined symbol still produces Cargo exit 101 and its linker diagnostic; files outside the target directory are never removed. The [current-head build-no-lock job](https://github.com/lancedb/lancedb/actions/runs/41911613851/job/126860364065) passed on `f3f2d0b8`: all compilation/linking completed, 20 completed test executables were removed, and `target` retained about 7.3 GiB. This successful run had a 145 GiB root with about 78 GiB free afterward; it was not an identical rerun of the failed 72 GiB image. The driver tests also passed in this job. All previous-head jobs ended naturally before the push; new-head CI and review gates still apply. Typed remote input exceptions require the server metadata contract. Older servers retain generic transport errors and existing missing-table compatibility. The optimize tests use mock servers and do not establish downstream server acceptance. BREAKING CHANGE: Rust callers with exhaustive matches on `lancedb::Error` must handle the new `FieldNotFound` and `Sql` variants. Local `Error::ColumnNotFound` failures now raise `lancedb.exceptions.ColumnNotFoundError`, a `ValueError` subclass. Python callers that previously caught only `RuntimeError` for this local failure must catch `ColumnNotFoundError` or `ValueError`. |
||
|
|
10625f6dda |
chore: update lance dependency to v15.0.0-beta.9 (#4814)
Update Rust Lance dependencies to [v15.0.0-beta.9](https://github.com/lance-format/lance/releases/tag/v15.0.0-beta.9), including the scoped stable-row-ID conversion fix. Python tests use published beta.9 wheels on Linux/Windows while macOS retains beta.4. Java stays on beta.8, matching the original base, so this update does not depend on beta.9 Maven publication or macOS Java packaging. The dependency updater preserves workspace inheritance, the WAL test wrapper uses the new StoredBatch module, and Linux/remote Rust CI uses its installed mold linker. The Python lockfile also records the already-declared OCI extra. CLI CI now caches Cargo downloads under a separate key instead of restoring compiled targets: the previous runner exhausted its disk during cache restoration, before compilation. Its test matrix and commands are unchanged. This branch includes #4820's row-freshness changes: successful rows become current while skipped rows retain their values and remain eligible for retry. Repair identities, replay handling and Restore fencing protect publication completion. BREAKING CHANGE: `StalenessPlan::row_dirty` is a new public field. Rust callers using exhaustive struct literals must initialize it. Validation: - All reported non-Java checks passed on `f5fa66fcbcf31a8eb188935f728735560c77c873`, including Rust lint/Linux/remote, Python, NodeJS and CLI checks. Current head `c660bc0ac9fd5920ad4b64be9c19f732ef4c56a5` preserves those product sources, manifests, lockfiles and compiler/test commands; only the Java pin restoration and CLI cache configuration differ. Current-head CI is tracked separately. - The complete Java directory is identical to the original PR base. The scope correction reuses [Xuanwo's prepared and validated commit](https://github.com/lancedb/lancedb/pull/4814#issuecomment-6626088466); no new Java build was run. - CLI workflow YAML parses successfully, its inputs match the pinned rust-cache action schema, and the existing jobs, matrix and commands are unchanged. Hosted execution must confirm the cache-restoration repair. - Existing validation includes the updater regressions and 32 CI-script tests, dependency-policy checks, count/WAL coverage, and #4820's 42 freshness tests, strict core Clippy and Rust doctest. Root Ruff previously reported unchanged documentation-example issues; Python-package Ruff passed. This PR adopts the existing released Lance beta.9. A subsequent official SDK release and normal Sophon dependency adoption remain separate delivery steps. --------- Co-authored-by: Xuanwo <github@xuanwo.io> |
||
|
|
2d70bec53a |
feat: add UTM-tagged docs links to SDK warnings and enterprise-only errors (#4797)
Add a central documentation link registry (`lancedb::docs::DocLink`) in the Rust core that builds `docs.lancedb.com` URLs with UTM parameters (`utm_source=lancedb_sdk`, `utm_medium=warning|error`, `utm_campaign=<id>`, `utm_content=<sdk>-<version>`) placed before any `#anchor` fragment and without user-identifying data. - Initialize `utm_content` per language binding (`python`, `nodejs`, `cli`, defaulting to `rust`) and expose the link builder to Python so `DBConnection` and `Job` stubs reuse the core definitions. - Append published documentation links to Enterprise-only `NotSupported` / `NotImplementedError` errors across database, job, catalog, and table operations. - Emit rate-limited maintenance warnings (once per table per process when `warn` logging is enabled) when opening a native table with at least 100 small fragments (`< 100k` physical rows each) or at least 1,000,000 unindexed rows on an optimizable user index, reading only manifest metadata without opening data or `_indices/` files, and document the thresholds in the compaction and reindexing guides. - Verify published/in-repo `docs/web/` targets and `#anchor` fragments in unit tests and include extracted SDK links in the scheduled `docs-link-check` workflow. Linear: OSS-2772 |
||
|
|
2044179a8b |
feat: add a CLI release binary (#4751)
Package the standalone lancedb CLI with every stable and beta GitHub release. Publish archives for Linux x86_64, Linux ARM64, and Apple Silicon macOS, along with SHA-256 checksums, licenses, and third-party notices. Synchronize the CLI version with the SDKs and validate that release tags match both manifests. Add PR and manual packaging dry runs, runtime compatibility checks, and smoke tests of extracted executables. GitHub release creation now waits for all three archives to pass validation; SDK registry publishing remains independent. Update installation instructions and the release checklist. Linux binaries target glibc 2.28, retaining existing x86_64 CPU requirements; macOS binaries target macOS 14 or newer. |
||
|
|
301ccad3aa |
feat: add a LanceDB command line (#4600)
Add a LanceDB command line with the following functionality: - `lancedb auth`: log in with OAuth, check cached OAuth session status, or log out. - `lancedb profile`: Create, edit, list, show, select, and delete connection profiles. - When no subcommand is given, we will attempt to create a SQL shell. Update ci/check_cargo_lock.py and its regression tests to allow pruning dependency edges while their target packages remain in Cargo.lock. Removing the CLI from the Python source distribution can disable optional features such as Axum tracing, even though other SDK dependencies still require the tracing package. |
||
|
|
197403e891 |
fix: honor downstream Lance dependency overrides (#4671)
Consumers that provide a local Lance checkout cannot resolve the dependency graph because the SDK directly selects a vendored `lance-arrow`, producing two path packages with the same name and version. The Rust core now declares its upstream Git dependency separately so the consuming workspace can override that source consistently. Python continues inheriting the vendored workspace dependency, keeping the sliced-struct validity fix in Maturin source distributions. Standalone SDK builds still select that same fix through the existing root patch. Adds a downstream consumer CI regression that resolves a local Lance override and checks that exactly one canonical `lance-arrow` package is selected. The Lance version updater also updates the core declaration in stable, preview and local modes. Public APIs and query behavior are unchanged. The workspace declaration lint excludes path dependencies because the Python binding intentionally uses the bundled source. Duplicate and unused external declarations remain errors; advisory, license, banned-package and source checks continue covering the full dependency graph. --------- Co-authored-by: Lance Release <lance-dev@lancedb.com> |
||
|
|
702389654e |
fix(python): align pylance extra and preview install indexes (#4556)
Fixes #4248. The preview index still contains pylance 1.0.0b6. uv's default first-index resolution can select it, or backtrack to an old LanceDB release when installing the extra. Meanwhile, the extra still permits pylance 5 even though current main bundles Lance 14. Raise the optional dependency to `pylance>=14.0.0b12`, the version already pinned in the test extra, and keep the lockfile metadata consistent. Document both Fury indexes and uv's `unsafe-best-match` strategy in the Python README and the source-owned quickstart (`docs/web/quickstart.mdx`). Explain the index trust requirement and recommend installing the extra to enforce the version floor. Add CI checks that reject older Lance majors and ensure the pylance and tests extras remain compatible. Run these checks when either dependency manifest changes, so a future Lance major bump cannot silently leave the Python minimum behind. ### Validation - Recreated the reported install on Ubuntu 26.04 / CPython 3.12.15 with uv 0.12.23: `lancedb==0.40.0b5` plus the old index selects `pylance==1.0.0b6`. Reproduced both the missing `blob_array` import and the unexpected `blob_handling` scanner argument using a real blob table. - Resolved the modified `python/pyproject.toml` with the pylance extra against both indexes: selects `pylance==14.0.0b18`, matching the current Rust pin. - Ran both documented pip and uv installations in isolated environments: `lancedb==0.41.0b7`, `pylance==14.0.0b18`; blob-array construction and a blob-bytes round trip through `to_pandas(blob_mode="bytes")` pass. Both package dependency checks pass. - New regression fails on the original dependency bound (27 rejected-version cases incorrectly accepted), then passes with the fix. Full CI-script suite: 3 tests pass. - `uv lock --check` with both indexes passes; focused Ruff checks pass; `git diff --check` passes. - Repository-wide Ruff reports 49 existing errors in untouched `docs/web-tests` files. Unrelated formatting changes were discarded. Runtime smoke checks used released native wheels; source dependency resolution was tested directly from the modified pyproject. No Rust or Python runtime code changes. --------- Co-authored-by: Xuanwo <github@xuanwo.io> |
||
|
|
1ad97b148b |
build(python): publish an sdist alongside the wheels (#4522)
Closes #4246. lancedb publishes no source distribution, so a platform without a prebuilt wheel (#4104, #4239) has nothing to install. This adds an sdist to the Python release. ## The sdist job The release workflow builds an sdist with the maturin version of the wheel jobs. On a tag, the publish job uploads it with the wheels: to PyPI, and to Fury for beta tags. The job also runs on the pull request dry run, which now starts on a change to `python/pyproject.toml`. ## Checks - The job builds a wheel from the sdist with `--locked` and smoke-tests it in a fresh venv. - `ci/check_sdist.py` fails if a tracked file of the Python package is missing from the tarball. - `twine check --strict` checks that the metadata renders. `pydistcheck` enforces PyPI's 100 MiB size limit. - The unit tests of both check scripts run in the CI scripts workflow. ## Cargo.lock maturin ships the repository lockfile, which pins crates that only the dropped `nodejs` member uses, so `cargo --locked` fails (PyO3/maturin#2609). The job first runs `cargo metadata --locked` on the repository workspace, so a lockfile that has drifted from `Cargo.toml` fails there. It then removes the nodejs-only pins and repacks the sdist. `ci/check_cargo_lock.py` fails if the prune changes any package it keeps, or any dependency of one. The published file is the repacked one. ## Behavior change After the first release with an sdist, pip on a platform with no current wheel builds the newest version from source, which needs a Rust toolchain and `protoc`. Before, pip installed the last version with a wheel for that platform. |
||
|
|
cf27f6902e |
chore: update lance dependency to v11.0.0-beta.16 (#3992)
Updates Lance dependencies and Java lance-core to v11.0.0-beta.16. Also narrows the dependency updater's package matching so the local LanceDB crate remains a path dependency. Lance tag: https://github.com/lance-format/lance/releases/tag/v11.0.0-beta.16 --------- Co-authored-by: Yang Cen <bubble-cal@outlook.com> |