Skip to content

chore: reduce scope of feature flags and compilation requirements for subcrates #3409

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions crates/aws/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "deltalake-aws"
version = "0.9.0"
version = "0.9.1"
authors.workspace = true
keywords.workspace = true
readme.workspace = true
Expand All @@ -13,7 +13,7 @@ rust-version.workspace = true

[dependencies]
# path dependencies
deltalake-core = { version = "0.26.0", path = "../core", features = ["cloud"] }
deltalake-core = { version = "0.26.0", path = "../core" }

# workspace dependencies
async-trait = { workspace = true }
Expand Down Expand Up @@ -51,7 +51,7 @@ hyper-tls = { version = "0.5", optional = true }
maplit = "1"

[dev-dependencies]
deltalake-core = { path = "../core", features = ["datafusion"] }
deltalake-core = { path = "../core" }
chrono = { workspace = true }
serial_test = "3"
deltalake-test = { path = "../test" }
Expand Down
6 changes: 2 additions & 4 deletions crates/azure/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "deltalake-azure"
version = "0.9.0"
version = "0.9.1"
authors.workspace = true
keywords.workspace = true
readme.workspace = true
Expand All @@ -12,9 +12,7 @@ repository.workspace = true
rust-version.workspace = true

[dependencies]
deltalake-core = { version = "0.26.0", path = "../core", features = [
"datafusion", "cloud",
]}
deltalake-core = { version = "0.26.0", path = "../core" }

# workspace depenndecies
async-trait = { workspace = true }
Expand Down
6 changes: 1 addition & 5 deletions crates/core/src/logstore/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
//! defines how to update internal fields based on key-value pairs.
use std::collections::HashMap;

#[cfg(feature = "cloud")]
use ::object_store::RetryConfig;
use object_store::{path::Path, prefix::PrefixStore, ObjectStore, ObjectStoreScheme};
use tokio::runtime::Handle;
Expand Down Expand Up @@ -95,7 +94,6 @@ pub struct StorageConfig {
/// Configuration to set up a dedicated IO runtime to execute IO related operations.
pub runtime: Option<RuntimeConfig>,

#[cfg(feature = "cloud")]
pub retry: ::object_store::RetryConfig,

/// Limit configuration.
Expand Down Expand Up @@ -178,7 +176,6 @@ where

let remainder = result.unparsed;

#[cfg(feature = "cloud")]
let remainder = {
let result = ParseResult::<RetryConfig>::from_iter(remainder);
config.retry = result.config;
Expand Down Expand Up @@ -229,7 +226,6 @@ impl StorageConfig {
props.limit = (!result.is_default).then_some(result.config);
let remainder = result.unparsed;

#[cfg(feature = "cloud")]
let remainder = {
let (retry, remainder): (RetryConfig, _) = try_parse_impl(remainder)?;
props.retry = retry;
Expand Down Expand Up @@ -299,7 +295,7 @@ pub fn str_is_truthy(val: &str) -> bool {
| val.eq_ignore_ascii_case("y")
}

#[cfg(all(test, feature = "cloud"))]
#[cfg(test)]
mod tests {
use maplit::hashmap;
use object_store::RetryConfig;
Expand Down
24 changes: 1 addition & 23 deletions crates/core/src/logstore/factories.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use std::{

use dashmap::DashMap;
use object_store::path::Path;
#[cfg(feature = "cloud")]
use object_store::RetryConfig;
use url::Url;

Expand All @@ -24,37 +23,19 @@ pub trait ObjectStoreFactory: Send + Sync {
/// The path segment is returned as second element of the tuple. It must point at the path
/// corresponding to the path segment of the URL.
///
/// The store should __NOT__ apply the decorations via the passed `StorageConfig`
#[cfg(feature = "cloud")]
/// The store should __NOT__ apply the decorations via the passed `options`
fn parse_url_opts(
&self,
url: &Url,
options: &HashMap<String, String>,
retry: &RetryConfig,
) -> DeltaResult<(ObjectStoreRef, Path)>;

#[cfg(not(feature = "cloud"))]
fn parse_url_opts(
&self,
url: &Url,
options: &HashMap<String, String>,
) -> DeltaResult<(ObjectStoreRef, Path)>;
}

#[derive(Clone, Debug, Default)]
pub(crate) struct DefaultObjectStoreFactory {}

impl ObjectStoreFactory for DefaultObjectStoreFactory {
#[cfg(not(feature = "cloud"))]
fn parse_url_opts(
&self,
url: &Url,
options: &HashMap<String, String>,
) -> DeltaResult<(ObjectStoreRef, Path)> {
default_parse_url_opts(url, options)
}

#[cfg(feature = "cloud")]
fn parse_url_opts(
&self,
url: &Url,
Expand Down Expand Up @@ -103,11 +84,8 @@ where
let scheme = Url::parse(&format!("{}://", url.scheme())).unwrap();
let storage_config = StorageConfig::parse_options(options)?;
if let Some(factory) = object_store_factories().get(&scheme) {
#[cfg(feature = "cloud")]
let (store, _prefix) =
factory.parse_url_opts(url, &storage_config.raw, &storage_config.retry)?;
#[cfg(not(feature = "cloud"))]
let (store, _prefix) = factory.parse_url_opts(url, &storage_config.raw)?;
let store = storage_config.decorate_store(store, url, None)?;
Ok(Arc::new(store))
} else {
Expand Down
5 changes: 0 additions & 5 deletions crates/core/src/logstore/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,16 +176,11 @@ where

if let Some(entry) = object_store_factories().get(&scheme) {
debug!("Found a storage provider for {scheme} ({location})");
#[cfg(feature = "cloud")]
let (store, _prefix) = entry.value().parse_url_opts(
&location,
&storage_options.raw,
&storage_options.retry,
)?;
#[cfg(not(feature = "cloud"))]
let (store, _prefix) = entry
.value()
.parse_url_opts(&location, &storage_options.raw)?;
return logstore_with(store, location, storage_options.raw, io_runtime);
}

Expand Down
2 changes: 0 additions & 2 deletions crates/core/src/logstore/storage/retry_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use ::object_store::path::Path;
use ::object_store::{Error, ObjectStore, PutPayload, PutResult, Result};
use tracing::log::*;

#[cfg(feature = "cloud")]
use crate::logstore::config;

impl<T: ObjectStore + ?Sized> ObjectStoreRetryExt for T {}
Expand Down Expand Up @@ -78,7 +77,6 @@ pub trait ObjectStoreRetryExt: ObjectStore {
}
}

#[cfg(feature = "cloud")]
impl config::TryUpdateKey for object_store::RetryConfig {
fn try_update_key(&mut self, key: &str, v: &str) -> crate::DeltaResult<Option<()>> {
match key {
Expand Down
2 changes: 1 addition & 1 deletion crates/deltalake/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "deltalake"
version = "0.26.0"
version = "0.26.1"
authors.workspace = true
keywords.workspace = true
readme.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "deltalake-derive"
version = "0.26.0"
description = "Dervice macoros for use in delta ecosystem crates"
description = "Dervice macros for use in delta ecosystem crates"
authors.workspace = true
rust-version.workspace = true
keywords.workspace = true
Expand Down
4 changes: 2 additions & 2 deletions crates/gcp/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "deltalake-gcp"
version = "0.10.0"
version = "0.10.1"
authors.workspace = true
keywords.workspace = true
readme.workspace = true
Expand All @@ -12,7 +12,7 @@ repository.workspace = true
rust-version.workspace = true

[dependencies]
deltalake-core = { version = "0.26.0", path = "../core", features = ["cloud"] }
deltalake-core = { version = "0.26.0", path = "../core" }

# workspace depenndecies
async-trait = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions crates/hdfs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "deltalake-hdfs"
version = "0.10.0"
version = "0.10.1"
authors.workspace = true
keywords.workspace = true
readme.workspace = true
Expand All @@ -12,7 +12,7 @@ repository.workspace = true
rust-version.workspace = true

[dependencies]
deltalake-core = { version = "0.26.0", path = "../core", features = ["cloud"] }
deltalake-core = { version = "0.26.0", path = "../core"}
hdfs-native-object-store = "0.14"

# workspace dependecies
Expand Down
8 changes: 4 additions & 4 deletions crates/lakefs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "deltalake-lakefs"
version = "0.9.0"
version = "0.9.1"
authors.workspace = true
keywords.workspace = true
readme.workspace = true
Expand All @@ -12,7 +12,7 @@ repository.workspace = true
rust-version.workspace = true

[dependencies]
deltalake-core = { version = "0.26.0", path = "../core", features = ["cloud"] }
deltalake-core = { version = "0.26.0", path = "../core" }
# workspace dependencies
async-trait = { workspace = true }
bytes = { workspace = true }
Expand All @@ -29,11 +29,11 @@ dashmap = "6"
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
reqwest = {version = "0.12", default-features = false, features = ["http2", "json", "rustls-tls-native-roots"]}
http = "1.0.0"
http = "1.0"
delta_kernel = { workspace = true, features = [] }

[dev-dependencies]
deltalake-core = { path = "../core", features = ["datafusion"] }
deltalake-core = { path = "../core" }
chrono = { workspace = true }
serial_test = "3"
deltalake-test = { path = "../test" }
Expand Down
4 changes: 1 addition & 3 deletions crates/mount/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ repository.workspace = true
rust-version.workspace = true

[dependencies]
deltalake-core = { version = "0.26.0", path = "../core", features = [
"cloud",
] }
deltalake-core = { version = "0.26.0", path = "../core" }
errno = "0.3"

# workspace depenndecies
Expand Down
Loading