mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-09-13 08:52:15 +00:00
chore(deps): bump opendal to 0.58.1 (#8742)
* chore(deps): bump opendal to 0.58.1 Upgrade direct opendal dependency and workspace object_store_opendal pin from 0.57 to 0.58 (lockfile resolves opendal 0.58.1 / object_store_opendal 0.58.0). Adapt to OpenDAL 0.58 composition API: - Operator::new returns a finished operator; drop .finish() call sites - Replace HttpClientLayer / raw::HttpClient with OperationContext + HttpTransporter (ReqwestTransport) - Migrate SecureFsBackend and MockLayer from Access/LayeredAccess to Service + Layer::apply_service - Rewrite SecureFs reader/writer/lister for sync factories and StreamRead - Use OperatorInfo::capability() instead of removed native_capability() Signed-off-by: Xuanwo <github@xuanwo.io> Signed-off-by: WenyXu <wenymedia@gmail.com> * chore: retrigger CI after udeps runner segfault Signed-off-by: Xuanwo <github@xuanwo.io> Signed-off-by: WenyXu <wenymedia@gmail.com> * fix(object-store): restore suffix read simulation for secure fs Signed-off-by: WenyXu <wenymedia@gmail.com> * fix: adapt remaining callers to OpenDAL 0.58 Signed-off-by: WenyXu <wenymedia@gmail.com> --------- Signed-off-by: Xuanwo <github@xuanwo.io> Signed-off-by: WenyXu <wenymedia@gmail.com> Co-authored-by: WenyXu <wenymedia@gmail.com>
This commit is contained in:
@@ -389,8 +389,7 @@ pub fn new_fs_object_store(root: &str) -> std::result::Result<ObjectStore, Boxed
|
||||
let builder = Fs::default().root(root);
|
||||
let object_store = ObjectStore::new(builder)
|
||||
.context(error::InitBackendSnafu)
|
||||
.map_err(BoxedError::new)?
|
||||
.finish();
|
||||
.map_err(BoxedError::new)?;
|
||||
|
||||
Ok(with_instrument_layers(object_store, false))
|
||||
}
|
||||
@@ -406,8 +405,7 @@ macro_rules! gen_object_store_builder {
|
||||
);
|
||||
let object_store = ObjectStore::new(<$service_type>::from(&config))
|
||||
.context(error::InitBackendSnafu)
|
||||
.map_err(BoxedError::new)?
|
||||
.finish();
|
||||
.map_err(BoxedError::new)?;
|
||||
Ok(with_instrument_layers(
|
||||
with_retry_layers(object_store),
|
||||
false,
|
||||
|
||||
@@ -338,9 +338,7 @@ impl OpenDalStorage {
|
||||
let path = extract_file_path_from_uri(uri)?;
|
||||
|
||||
let builder = Fs::default().root(&path);
|
||||
let object_store = ObjectStore::new(builder)
|
||||
.context(BuildObjectStoreSnafu)?
|
||||
.finish();
|
||||
let object_store = ObjectStore::new(builder).context(BuildObjectStoreSnafu)?;
|
||||
Ok(Self::new_operator_rooted(
|
||||
Self::finish_local_store(object_store),
|
||||
uri,
|
||||
@@ -381,9 +379,7 @@ impl OpenDalStorage {
|
||||
Self::validate_remote_config(uri, "s3", config.validate())?;
|
||||
|
||||
let conn: S3Connection = config.into();
|
||||
let object_store = ObjectStore::new(S3::from(&conn))
|
||||
.context(BuildObjectStoreSnafu)?
|
||||
.finish();
|
||||
let object_store = ObjectStore::new(S3::from(&conn)).context(BuildObjectStoreSnafu)?;
|
||||
Ok(Self::new_operator_rooted(
|
||||
Self::finish_remote_store(object_store),
|
||||
uri,
|
||||
@@ -412,9 +408,7 @@ impl OpenDalStorage {
|
||||
Self::validate_remote_config(uri, "oss", config.validate())?;
|
||||
|
||||
let conn: OssConnection = config.into();
|
||||
let object_store = ObjectStore::new(Oss::from(&conn))
|
||||
.context(BuildObjectStoreSnafu)?
|
||||
.finish();
|
||||
let object_store = ObjectStore::new(Oss::from(&conn)).context(BuildObjectStoreSnafu)?;
|
||||
Ok(Self::new_operator_rooted(
|
||||
Self::finish_remote_store(object_store),
|
||||
uri,
|
||||
@@ -448,9 +442,7 @@ impl OpenDalStorage {
|
||||
}
|
||||
|
||||
let conn: GcsConnection = config.into();
|
||||
let object_store = ObjectStore::new(Gcs::from(&conn))
|
||||
.context(BuildObjectStoreSnafu)?
|
||||
.finish();
|
||||
let object_store = ObjectStore::new(Gcs::from(&conn)).context(BuildObjectStoreSnafu)?;
|
||||
Ok(Self::new_operator_rooted(
|
||||
Self::finish_remote_store(object_store),
|
||||
uri,
|
||||
@@ -500,9 +492,7 @@ impl OpenDalStorage {
|
||||
Self::validate_remote_config(uri, "azblob", config.validate())?;
|
||||
|
||||
let conn: AzblobConnection = config.into();
|
||||
let object_store = ObjectStore::new(Azblob::from(&conn))
|
||||
.context(BuildObjectStoreSnafu)?
|
||||
.finish();
|
||||
let object_store = ObjectStore::new(Azblob::from(&conn)).context(BuildObjectStoreSnafu)?;
|
||||
Ok(Self::new_operator_rooted(
|
||||
Self::finish_remote_store(object_store),
|
||||
uri,
|
||||
@@ -732,9 +722,7 @@ mod tests {
|
||||
use crate::data::export_v2::schema::SchemaDefinition;
|
||||
|
||||
fn make_storage_with_rooted_fs(dir: &std::path::Path) -> OpenDalStorage {
|
||||
let object_store = ObjectStore::new(Fs::default().root(dir.to_str().unwrap()))
|
||||
.unwrap()
|
||||
.finish();
|
||||
let object_store = ObjectStore::new(Fs::default().root(dir.to_str().unwrap())).unwrap();
|
||||
OpenDalStorage::new_operator_rooted(
|
||||
OpenDalStorage::finish_local_store(object_store),
|
||||
Url::from_directory_path(dir).unwrap().as_ref(),
|
||||
|
||||
Reference in New Issue
Block a user