From 0ebc8d45a8a9baf50f5a7ff6ec8af358292f3218 Mon Sep 17 00:00:00 2001 From: Jack Ye Date: Thu, 11 Sep 2025 15:30:35 -0700 Subject: [PATCH] chore: fix no lock build warnings and CI timeouts (#2650) Example CI failures: - publish build timeout: https://github.com/lancedb/lancedb/actions/runs/17626482881/job/50084552906 - doc test build timeout: https://github.com/lancedb/lancedb/actions/runs/17627058590/job/50086456818 --- .github/workflows/docs_test.yml | 4 ++-- Cargo.lock | 10 +++++----- java/core/lancedb-jni/src/ffi.rs | 1 + java/core/lancedb-jni/src/traits.rs | 3 +++ python/src/connection.rs | 2 +- rust/lancedb/Cargo.toml | 10 +++++----- rust/lancedb/src/embeddings.rs | 4 ++-- rust/lancedb/src/embeddings/bedrock.rs | 4 ++-- rust/lancedb/src/embeddings/openai.rs | 4 ++-- rust/lancedb/src/embeddings/sentence_transformers.rs | 4 ++-- rust/lancedb/src/table.rs | 4 +--- rust/lancedb/tests/embedding_registry_test.rs | 4 ++-- 12 files changed, 28 insertions(+), 26 deletions(-) diff --git a/.github/workflows/docs_test.yml b/.github/workflows/docs_test.yml index 4ddc0643..934e92c7 100644 --- a/.github/workflows/docs_test.yml +++ b/.github/workflows/docs_test.yml @@ -24,7 +24,8 @@ env: jobs: test-python: name: Test doc python code - runs-on: ubuntu-24.04 + runs-on: warp-ubuntu-2204-x64-8x + timeout-minutes: 60 steps: - name: Checkout uses: actions/checkout@v4 @@ -48,7 +49,6 @@ jobs: uses: swatinem/rust-cache@v2 - name: Build Python working-directory: docs/test - timeout-minutes: 60 run: python -m pip install --extra-index-url https://pypi.fury.io/lancedb/ -r requirements.txt - name: Create test files diff --git a/Cargo.lock b/Cargo.lock index d87803ca..4c99fa41 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -713,9 +713,9 @@ dependencies = [ [[package]] name = "aws-sdk-s3" -version = "1.104.0" +version = "1.105.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38c488cd6abb0ec9811c401894191932e941c5f91dc226043edacd0afa1634bc" +checksum = "c99789e929b5e1d9a5aa3fa1d81317f3a789afc796141d11b0eaafd9d9f47e38" dependencies = [ "aws-credential-types", "aws-runtime", @@ -963,9 +963,9 @@ dependencies = [ [[package]] name = "aws-smithy-runtime" -version = "1.9.1" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3946acbe1ead1301ba6862e712c7903ca9bb230bdf1fbd1b5ac54158ef2ab1f" +checksum = "4fa63ad37685ceb7762fa4d73d06f1d5493feb88e3f27259b9ed277f4c01b185" dependencies = [ "aws-smithy-async", "aws-smithy-http", @@ -1153,7 +1153,7 @@ dependencies = [ "bitflags 2.9.4", "cexpr", "clang-sys", - "itertools 0.12.1", + "itertools 0.11.0", "lazy_static", "lazycell", "log", diff --git a/java/core/lancedb-jni/src/ffi.rs b/java/core/lancedb-jni/src/ffi.rs index 579bf692..d353b347 100644 --- a/java/core/lancedb-jni/src/ffi.rs +++ b/java/core/lancedb-jni/src/ffi.rs @@ -16,6 +16,7 @@ pub trait JNIEnvExt { fn get_integers(&mut self, obj: &JObject) -> Result>; /// Get strings from Java List object. + #[allow(dead_code)] fn get_strings(&mut self, obj: &JObject) -> Result>; /// Get strings from Java String[] object. diff --git a/java/core/lancedb-jni/src/traits.rs b/java/core/lancedb-jni/src/traits.rs index 077392bf..e8ed78bc 100644 --- a/java/core/lancedb-jni/src/traits.rs +++ b/java/core/lancedb-jni/src/traits.rs @@ -6,6 +6,7 @@ use jni::JNIEnv; use crate::Result; +#[allow(dead_code)] pub trait FromJObject { fn extract(&self) -> Result; } @@ -39,6 +40,7 @@ impl FromJObject for JObject<'_> { } } +#[allow(dead_code)] pub trait FromJString { fn extract(&self, env: &mut JNIEnv) -> Result; } @@ -66,6 +68,7 @@ pub trait JMapExt { fn get_f64(&self, env: &mut JNIEnv, key: &str) -> Result>; } +#[allow(dead_code)] fn get_map_value(env: &mut JNIEnv, map: &JMap, key: &str) -> Result> where for<'a> JObject<'a>: FromJObject, diff --git a/python/src/connection.rs b/python/src/connection.rs index b4698e39..ca426c3b 100644 --- a/python/src/connection.rs +++ b/python/src/connection.rs @@ -255,7 +255,7 @@ impl Connection { #[pyo3(signature = (uri, api_key=None, region=None, host_override=None, read_consistency_interval=None, client_config=None, storage_options=None, session=None))] #[allow(clippy::too_many_arguments)] pub fn connect( - py: Python, + py: Python<'_>, uri: String, api_key: Option, region: Option, diff --git a/rust/lancedb/Cargo.toml b/rust/lancedb/Cargo.toml index 2fe94822..cd564695 100644 --- a/rust/lancedb/Cargo.toml +++ b/rust/lancedb/Cargo.toml @@ -86,11 +86,11 @@ rand = { version = "0.9", features = ["small_rng"] } random_word = { version = "0.4.3", features = ["en"] } uuid = { version = "1.7.0", features = ["v4"] } walkdir = "2" -aws-sdk-dynamodb = { version = "1.38.0" } -aws-sdk-s3 = { version = "1.38.0" } -aws-sdk-kms = { version = "1.37" } -aws-config = { version = "1.0" } -aws-smithy-runtime = { version = "1.3" } +aws-sdk-dynamodb = { version = "1.55.0" } +aws-sdk-s3 = { version = "1.55.0" } +aws-sdk-kms = { version = "1.48.0" } +aws-config = { version = "1.5.10" } +aws-smithy-runtime = { version = "1.9.1" } datafusion.workspace = true http-body = "1" # Matching reqwest rstest = "0.23.0" diff --git a/rust/lancedb/src/embeddings.rs b/rust/lancedb/src/embeddings.rs index a4626ffc..70ab530c 100644 --- a/rust/lancedb/src/embeddings.rs +++ b/rust/lancedb/src/embeddings.rs @@ -45,10 +45,10 @@ use crate::{ pub trait EmbeddingFunction: std::fmt::Debug + Send + Sync { fn name(&self) -> &str; /// The type of the input data - fn source_type(&self) -> Result>; + fn source_type(&self) -> Result>; /// The type of the output data /// This should **always** match the output of the `embed` function - fn dest_type(&self) -> Result>; + fn dest_type(&self) -> Result>; /// Compute the embeddings for the source column in the database fn compute_source_embeddings(&self, source: Arc) -> Result>; /// Compute the embeddings for a given user query diff --git a/rust/lancedb/src/embeddings/bedrock.rs b/rust/lancedb/src/embeddings/bedrock.rs index 4b1b2321..33b04558 100644 --- a/rust/lancedb/src/embeddings/bedrock.rs +++ b/rust/lancedb/src/embeddings/bedrock.rs @@ -75,11 +75,11 @@ impl EmbeddingFunction for BedrockEmbeddingFunction { "bedrock" } - fn source_type(&self) -> Result> { + fn source_type(&self) -> Result> { Ok(Cow::Owned(DataType::Utf8)) } - fn dest_type(&self) -> Result> { + fn dest_type(&self) -> Result> { let n_dims = self.model.ndims(); Ok(Cow::Owned(DataType::new_fixed_size_list( DataType::Float32, diff --git a/rust/lancedb/src/embeddings/openai.rs b/rust/lancedb/src/embeddings/openai.rs index c2a36c6e..7fadad5c 100644 --- a/rust/lancedb/src/embeddings/openai.rs +++ b/rust/lancedb/src/embeddings/openai.rs @@ -144,11 +144,11 @@ impl EmbeddingFunction for OpenAIEmbeddingFunction { "openai" } - fn source_type(&self) -> Result> { + fn source_type(&self) -> Result> { Ok(Cow::Owned(DataType::Utf8)) } - fn dest_type(&self) -> Result> { + fn dest_type(&self) -> Result> { let n_dims = self.model.ndims(); Ok(Cow::Owned(DataType::new_fixed_size_list( DataType::Float32, diff --git a/rust/lancedb/src/embeddings/sentence_transformers.rs b/rust/lancedb/src/embeddings/sentence_transformers.rs index 24e892ec..0bc2f604 100644 --- a/rust/lancedb/src/embeddings/sentence_transformers.rs +++ b/rust/lancedb/src/embeddings/sentence_transformers.rs @@ -407,11 +407,11 @@ impl EmbeddingFunction for SentenceTransformersEmbeddings { "sentence-transformers" } - fn source_type(&self) -> crate::Result> { + fn source_type(&self) -> crate::Result> { Ok(Cow::Owned(DataType::Utf8)) } - fn dest_type(&self) -> crate::Result> { + fn dest_type(&self) -> crate::Result> { let (n_dims, dtype) = self.compute_ndims_and_dtype()?; Ok(Cow::Owned(DataType::new_fixed_size_list( dtype, diff --git a/rust/lancedb/src/table.rs b/rust/lancedb/src/table.rs index 6c01d751..33187d1f 100644 --- a/rust/lancedb/src/table.rs +++ b/rust/lancedb/src/table.rs @@ -242,17 +242,15 @@ pub struct OptimizeStats { /// Describes what happens when a vector either contains NaN or /// does not have enough values #[derive(Clone, Debug, Default)] +#[allow(dead_code)] // https://github.com/lancedb/lancedb/issues/992 enum BadVectorHandling { /// An error is returned #[default] Error, - #[allow(dead_code)] // https://github.com/lancedb/lancedb/issues/992 /// The offending row is droppped Drop, - #[allow(dead_code)] // https://github.com/lancedb/lancedb/issues/992 /// The invalid/missing items are replaced by fill_value Fill(f32), - #[allow(dead_code)] // https://github.com/lancedb/lancedb/issues/992 /// The invalid items are replaced by NULL None, } diff --git a/rust/lancedb/tests/embedding_registry_test.rs b/rust/lancedb/tests/embedding_registry_test.rs index b5191777..c87fad74 100644 --- a/rust/lancedb/tests/embedding_registry_test.rs +++ b/rust/lancedb/tests/embedding_registry_test.rs @@ -341,10 +341,10 @@ impl EmbeddingFunction for MockEmbed { fn name(&self) -> &str { &self.name } - fn source_type(&self) -> Result> { + fn source_type(&self) -> Result> { Ok(Cow::Borrowed(&self.source_type)) } - fn dest_type(&self) -> Result> { + fn dest_type(&self) -> Result> { Ok(Cow::Borrowed(&self.dest_type)) } fn compute_source_embeddings(&self, source: Arc) -> Result> {