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
This commit is contained in:
Jack Ye
2025-09-11 15:30:35 -07:00
committed by GitHub
parent f7d78c3420
commit 0ebc8d45a8
12 changed files with 28 additions and 26 deletions

View File

@@ -24,7 +24,8 @@ env:
jobs: jobs:
test-python: test-python:
name: Test doc python code name: Test doc python code
runs-on: ubuntu-24.04 runs-on: warp-ubuntu-2204-x64-8x
timeout-minutes: 60
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
@@ -48,7 +49,6 @@ jobs:
uses: swatinem/rust-cache@v2 uses: swatinem/rust-cache@v2
- name: Build Python - name: Build Python
working-directory: docs/test working-directory: docs/test
timeout-minutes: 60
run: run:
python -m pip install --extra-index-url https://pypi.fury.io/lancedb/ -r requirements.txt python -m pip install --extra-index-url https://pypi.fury.io/lancedb/ -r requirements.txt
- name: Create test files - name: Create test files

10
Cargo.lock generated
View File

@@ -713,9 +713,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-sdk-s3" name = "aws-sdk-s3"
version = "1.104.0" version = "1.105.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38c488cd6abb0ec9811c401894191932e941c5f91dc226043edacd0afa1634bc" checksum = "c99789e929b5e1d9a5aa3fa1d81317f3a789afc796141d11b0eaafd9d9f47e38"
dependencies = [ dependencies = [
"aws-credential-types", "aws-credential-types",
"aws-runtime", "aws-runtime",
@@ -963,9 +963,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-smithy-runtime" name = "aws-smithy-runtime"
version = "1.9.1" version = "1.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3946acbe1ead1301ba6862e712c7903ca9bb230bdf1fbd1b5ac54158ef2ab1f" checksum = "4fa63ad37685ceb7762fa4d73d06f1d5493feb88e3f27259b9ed277f4c01b185"
dependencies = [ dependencies = [
"aws-smithy-async", "aws-smithy-async",
"aws-smithy-http", "aws-smithy-http",
@@ -1153,7 +1153,7 @@ dependencies = [
"bitflags 2.9.4", "bitflags 2.9.4",
"cexpr", "cexpr",
"clang-sys", "clang-sys",
"itertools 0.12.1", "itertools 0.11.0",
"lazy_static", "lazy_static",
"lazycell", "lazycell",
"log", "log",

View File

@@ -16,6 +16,7 @@ pub trait JNIEnvExt {
fn get_integers(&mut self, obj: &JObject) -> Result<Vec<i32>>; fn get_integers(&mut self, obj: &JObject) -> Result<Vec<i32>>;
/// Get strings from Java List<String> object. /// Get strings from Java List<String> object.
#[allow(dead_code)]
fn get_strings(&mut self, obj: &JObject) -> Result<Vec<String>>; fn get_strings(&mut self, obj: &JObject) -> Result<Vec<String>>;
/// Get strings from Java String[] object. /// Get strings from Java String[] object.

View File

@@ -6,6 +6,7 @@ use jni::JNIEnv;
use crate::Result; use crate::Result;
#[allow(dead_code)]
pub trait FromJObject<T> { pub trait FromJObject<T> {
fn extract(&self) -> Result<T>; fn extract(&self) -> Result<T>;
} }
@@ -39,6 +40,7 @@ impl FromJObject<f64> for JObject<'_> {
} }
} }
#[allow(dead_code)]
pub trait FromJString { pub trait FromJString {
fn extract(&self, env: &mut JNIEnv) -> Result<String>; fn extract(&self, env: &mut JNIEnv) -> Result<String>;
} }
@@ -66,6 +68,7 @@ pub trait JMapExt {
fn get_f64(&self, env: &mut JNIEnv, key: &str) -> Result<Option<f64>>; fn get_f64(&self, env: &mut JNIEnv, key: &str) -> Result<Option<f64>>;
} }
#[allow(dead_code)]
fn get_map_value<T>(env: &mut JNIEnv, map: &JMap, key: &str) -> Result<Option<T>> fn get_map_value<T>(env: &mut JNIEnv, map: &JMap, key: &str) -> Result<Option<T>>
where where
for<'a> JObject<'a>: FromJObject<T>, for<'a> JObject<'a>: FromJObject<T>,

View File

@@ -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))] #[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)] #[allow(clippy::too_many_arguments)]
pub fn connect( pub fn connect(
py: Python, py: Python<'_>,
uri: String, uri: String,
api_key: Option<String>, api_key: Option<String>,
region: Option<String>, region: Option<String>,

View File

@@ -86,11 +86,11 @@ rand = { version = "0.9", features = ["small_rng"] }
random_word = { version = "0.4.3", features = ["en"] } random_word = { version = "0.4.3", features = ["en"] }
uuid = { version = "1.7.0", features = ["v4"] } uuid = { version = "1.7.0", features = ["v4"] }
walkdir = "2" walkdir = "2"
aws-sdk-dynamodb = { version = "1.38.0" } aws-sdk-dynamodb = { version = "1.55.0" }
aws-sdk-s3 = { version = "1.38.0" } aws-sdk-s3 = { version = "1.55.0" }
aws-sdk-kms = { version = "1.37" } aws-sdk-kms = { version = "1.48.0" }
aws-config = { version = "1.0" } aws-config = { version = "1.5.10" }
aws-smithy-runtime = { version = "1.3" } aws-smithy-runtime = { version = "1.9.1" }
datafusion.workspace = true datafusion.workspace = true
http-body = "1" # Matching reqwest http-body = "1" # Matching reqwest
rstest = "0.23.0" rstest = "0.23.0"

View File

@@ -45,10 +45,10 @@ use crate::{
pub trait EmbeddingFunction: std::fmt::Debug + Send + Sync { pub trait EmbeddingFunction: std::fmt::Debug + Send + Sync {
fn name(&self) -> &str; fn name(&self) -> &str;
/// The type of the input data /// The type of the input data
fn source_type(&self) -> Result<Cow<DataType>>; fn source_type(&self) -> Result<Cow<'_, DataType>>;
/// The type of the output data /// The type of the output data
/// This should **always** match the output of the `embed` function /// This should **always** match the output of the `embed` function
fn dest_type(&self) -> Result<Cow<DataType>>; fn dest_type(&self) -> Result<Cow<'_, DataType>>;
/// Compute the embeddings for the source column in the database /// Compute the embeddings for the source column in the database
fn compute_source_embeddings(&self, source: Arc<dyn Array>) -> Result<Arc<dyn Array>>; fn compute_source_embeddings(&self, source: Arc<dyn Array>) -> Result<Arc<dyn Array>>;
/// Compute the embeddings for a given user query /// Compute the embeddings for a given user query

View File

@@ -75,11 +75,11 @@ impl EmbeddingFunction for BedrockEmbeddingFunction {
"bedrock" "bedrock"
} }
fn source_type(&self) -> Result<Cow<DataType>> { fn source_type(&self) -> Result<Cow<'_, DataType>> {
Ok(Cow::Owned(DataType::Utf8)) Ok(Cow::Owned(DataType::Utf8))
} }
fn dest_type(&self) -> Result<Cow<DataType>> { fn dest_type(&self) -> Result<Cow<'_, DataType>> {
let n_dims = self.model.ndims(); let n_dims = self.model.ndims();
Ok(Cow::Owned(DataType::new_fixed_size_list( Ok(Cow::Owned(DataType::new_fixed_size_list(
DataType::Float32, DataType::Float32,

View File

@@ -144,11 +144,11 @@ impl EmbeddingFunction for OpenAIEmbeddingFunction {
"openai" "openai"
} }
fn source_type(&self) -> Result<Cow<DataType>> { fn source_type(&self) -> Result<Cow<'_, DataType>> {
Ok(Cow::Owned(DataType::Utf8)) Ok(Cow::Owned(DataType::Utf8))
} }
fn dest_type(&self) -> Result<Cow<DataType>> { fn dest_type(&self) -> Result<Cow<'_, DataType>> {
let n_dims = self.model.ndims(); let n_dims = self.model.ndims();
Ok(Cow::Owned(DataType::new_fixed_size_list( Ok(Cow::Owned(DataType::new_fixed_size_list(
DataType::Float32, DataType::Float32,

View File

@@ -407,11 +407,11 @@ impl EmbeddingFunction for SentenceTransformersEmbeddings {
"sentence-transformers" "sentence-transformers"
} }
fn source_type(&self) -> crate::Result<std::borrow::Cow<arrow_schema::DataType>> { fn source_type(&self) -> crate::Result<std::borrow::Cow<'_, arrow_schema::DataType>> {
Ok(Cow::Owned(DataType::Utf8)) Ok(Cow::Owned(DataType::Utf8))
} }
fn dest_type(&self) -> crate::Result<std::borrow::Cow<arrow_schema::DataType>> { fn dest_type(&self) -> crate::Result<std::borrow::Cow<'_, arrow_schema::DataType>> {
let (n_dims, dtype) = self.compute_ndims_and_dtype()?; let (n_dims, dtype) = self.compute_ndims_and_dtype()?;
Ok(Cow::Owned(DataType::new_fixed_size_list( Ok(Cow::Owned(DataType::new_fixed_size_list(
dtype, dtype,

View File

@@ -242,17 +242,15 @@ pub struct OptimizeStats {
/// Describes what happens when a vector either contains NaN or /// Describes what happens when a vector either contains NaN or
/// does not have enough values /// does not have enough values
#[derive(Clone, Debug, Default)] #[derive(Clone, Debug, Default)]
#[allow(dead_code)] // https://github.com/lancedb/lancedb/issues/992
enum BadVectorHandling { enum BadVectorHandling {
/// An error is returned /// An error is returned
#[default] #[default]
Error, Error,
#[allow(dead_code)] // https://github.com/lancedb/lancedb/issues/992
/// The offending row is droppped /// The offending row is droppped
Drop, Drop,
#[allow(dead_code)] // https://github.com/lancedb/lancedb/issues/992
/// The invalid/missing items are replaced by fill_value /// The invalid/missing items are replaced by fill_value
Fill(f32), Fill(f32),
#[allow(dead_code)] // https://github.com/lancedb/lancedb/issues/992
/// The invalid items are replaced by NULL /// The invalid items are replaced by NULL
None, None,
} }

View File

@@ -341,10 +341,10 @@ impl EmbeddingFunction for MockEmbed {
fn name(&self) -> &str { fn name(&self) -> &str {
&self.name &self.name
} }
fn source_type(&self) -> Result<Cow<DataType>> { fn source_type(&self) -> Result<Cow<'_, DataType>> {
Ok(Cow::Borrowed(&self.source_type)) Ok(Cow::Borrowed(&self.source_type))
} }
fn dest_type(&self) -> Result<Cow<DataType>> { fn dest_type(&self) -> Result<Cow<'_, DataType>> {
Ok(Cow::Borrowed(&self.dest_type)) Ok(Cow::Borrowed(&self.dest_type))
} }
fn compute_source_embeddings(&self, source: Arc<dyn Array>) -> Result<Arc<dyn Array>> { fn compute_source_embeddings(&self, source: Arc<dyn Array>) -> Result<Arc<dyn Array>> {