mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-13 14:16:54 +00:00
feat(remote): discover server builds and retain error provenance (#4999)
Remote callers can use `db.server_info()` in Rust and Python, including synchronous and asynchronous Python connections, to identify the responding server without submitting a query or Job. Typed results describe the query-node build, component versions, Function protocol and configured images. Older servers without the endpoint return an explicit unsupported error. REST and Flight errors retain the reported build in diagnostic text and Rust `RemoteErrorMetadata.server`. Typed table/job-not-found errors preserve their HTTP source and classification, including the schema-cache path; masked REST errors can obtain provenance from the response header. Unknown build information stays absent. The matching native Python SDK was exercised against a real localhost server (`8829b074` client / `43920fa` server): sync/async discovery, both SQL version forms and actual REST/Flight error provenance passed. The product files match this branch; private validation drivers are excluded. Focused coverage includes typed 404 errors, masked errors, and the public schema-cache regression. Deployment and published-package acceptance remain separate. Server counterpart: https://github.com/lancedb/sophon/pull/10234. Related: ENT-3565.
This commit is contained in:
@@ -37,6 +37,18 @@ embedding_functions`. Prefer keyword arguments for optional parameters.
|
||||
|
||||
::: lancedb.db.DBConnection
|
||||
|
||||
Use `db.server_info()` (or `await db.server_info()` on an asynchronous connection)
|
||||
to include the responding server's release, Git revision, build date and Function
|
||||
runtime information in a bug report. It returns a JSON-compatible dictionary and
|
||||
does not submit a query or job. Configured images are distinct from the version
|
||||
of an already running job. During a rolling upgrade, successive requests can
|
||||
reach different query-node builds. Embedded connections and older servers without
|
||||
the endpoint raise `NotImplementedError`.
|
||||
|
||||
::: lancedb.server_info.ServerBuildInfo
|
||||
|
||||
::: lancedb.server_info.ServerInfo
|
||||
|
||||
Resource listings return iterators. Use `list(db.list_tables())` to collect all
|
||||
table names. `db.list_tables().tables` is a list of the first page; `limit`
|
||||
controls its page size and `page_token` resumes at a saved token. The same
|
||||
|
||||
Reference in New Issue
Block a user