From 46ffa87cd4a2b18954052c3f795dba87d57df8c4 Mon Sep 17 00:00:00 2001 From: Weston Pace Date: Wed, 24 Apr 2024 09:28:24 -0700 Subject: [PATCH] chore: disable the remote feature by default (#1239) The rust implementation of the remote client is not yet ready. This is understandably confusing for users since it is enabled by default. This PR disables it by default. We can re-enable it when we are ready (even then it is not clear this is something that should be a default feature). --------- Co-authored-by: Will Jones --- rust/lancedb/Cargo.toml | 4 ++-- rust/lancedb/src/connection.rs | 4 ++++ rust/lancedb/src/lib.rs | 10 ++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/rust/lancedb/Cargo.toml b/rust/lancedb/Cargo.toml index 517fcd03..70e72b4a 100644 --- a/rust/lancedb/Cargo.toml +++ b/rust/lancedb/Cargo.toml @@ -52,7 +52,7 @@ aws-sdk-kms = { version = "1.0" } aws-config = { version = "1.0" } [features] -default = ["remote"] +default = [] remote = ["dep:reqwest"] fp16kernels = ["lance-linalg/fp16kernels"] -s3-test = [] \ No newline at end of file +s3-test = [] diff --git a/rust/lancedb/src/connection.rs b/rust/lancedb/src/connection.rs index b2675c5a..5890f6cf 100644 --- a/rust/lancedb/src/connection.rs +++ b/rust/lancedb/src/connection.rs @@ -33,6 +33,9 @@ use crate::table::{NativeTable, WriteOptions}; use crate::utils::validate_table_name; use crate::Table; +#[cfg(feature = "remote")] +use log::warn; + pub const LANCE_FILE_EXTENSION: &str = "lance"; pub type TableBuilderCallback = Box OpenTableBuilder + Send>; @@ -579,6 +582,7 @@ impl ConnectBuilder { let api_key = self.api_key.ok_or_else(|| Error::InvalidInput { message: "An api_key is required when connecting to LanceDb Cloud".to_string(), })?; + warn!("The rust implementation of the remote client is not yet ready for use."); let internal = Arc::new(crate::remote::db::RemoteDatabase::try_new( &self.uri, &api_key, diff --git a/rust/lancedb/src/lib.rs b/rust/lancedb/src/lib.rs index 4b1269e9..4fae0fa6 100644 --- a/rust/lancedb/src/lib.rs +++ b/rust/lancedb/src/lib.rs @@ -34,6 +34,16 @@ //! cargo install lancedb //! ``` //! +//! ## Crate Features +//! +//! ### Experimental Features +//! +//! These features are not enabled by default. They are experimental or in-development features that +//! are not yet ready to be released. +//! +//! - `remote` - Enable remote client to connect to LanceDB cloud. This is not yet fully implemented +//! and should not be enabled. +//! //! ### Quick Start //! //! #### Connect to a database.