You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2026/05/19 12:50:20 UTC
(opendal) branch main updated: refactor(services/obs): deprecate versioning option (#7560)
This is an automated email from the ASF dual-hosted git repository.
Xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/opendal.git
The following commit(s) were added to refs/heads/main by this push:
new 01ede5657 refactor(services/obs): deprecate versioning option (#7560)
01ede5657 is described below
commit 01ede56577618b241b5926e83e4631b56eb96b3b
Author: Xuanwo <gi...@xuanwo.io>
AuthorDate: Tue May 19 20:50:14 2026 +0800
refactor(services/obs): deprecate versioning option (#7560)
---
bindings/dotnet/OpenDAL/ServiceConfig/ObsServiceConfig.cs | 2 +-
.../java/src/main/java/org/apache/opendal/ServiceConfig.java | 4 +++-
bindings/python/python/opendal/operator.pyi | 6 ++++--
bindings/python/src/services.rs | 6 ++++--
core/services/obs/src/backend.rs | 10 ++++++----
core/services/obs/src/config.rs | 7 +++++--
core/services/obs/src/docs.md | 1 +
7 files changed, 24 insertions(+), 12 deletions(-)
diff --git a/bindings/dotnet/OpenDAL/ServiceConfig/ObsServiceConfig.cs b/bindings/dotnet/OpenDAL/ServiceConfig/ObsServiceConfig.cs
index a96ef7341..ea0d0f674 100644
--- a/bindings/dotnet/OpenDAL/ServiceConfig/ObsServiceConfig.cs
+++ b/bindings/dotnet/OpenDAL/ServiceConfig/ObsServiceConfig.cs
@@ -37,7 +37,7 @@ namespace OpenDAL.ServiceConfig
/// </summary>
public string? Bucket { get; init; }
/// <summary>
- /// Is bucket versioning enabled for this bucket
+ /// Deprecated: OBS versioning capability is not controlled by service config.
/// </summary>
public bool? EnableVersioning { get; init; }
/// <summary>
diff --git a/bindings/java/src/main/java/org/apache/opendal/ServiceConfig.java b/bindings/java/src/main/java/org/apache/opendal/ServiceConfig.java
index 55e760c01..68d47de75 100644
--- a/bindings/java/src/main/java/org/apache/opendal/ServiceConfig.java
+++ b/bindings/java/src/main/java/org/apache/opendal/ServiceConfig.java
@@ -2211,7 +2211,9 @@ public interface ServiceConfig {
*/
public final String bucket;
/**
- * <p>Is bucket versioning enabled for this bucket</p>
+ * <p>Deprecated: OBS versioning capability is not controlled by service config.</p>
+ *
+ * @deprecated OBS versioning capability is not controlled by this option and this option is no longer needed.
*/
public final Boolean enableVersioning;
/**
diff --git a/bindings/python/python/opendal/operator.pyi b/bindings/python/python/opendal/operator.pyi
index cfe0cca46..97c4dc786 100644
--- a/bindings/python/python/opendal/operator.pyi
+++ b/bindings/python/python/opendal/operator.pyi
@@ -1792,7 +1792,8 @@ class AsyncOperator:
bucket : builtins.str, optional
Bucket for obs.
enable_versioning : builtins.bool, optional
- Is bucket versioning enabled for this bucket
+ Deprecated: OBS versioning capability is not controlled by
+ service config.
endpoint : builtins.str, optional
Endpoint for obs.
root : builtins.str, optional
@@ -4393,7 +4394,8 @@ class Operator:
bucket : builtins.str, optional
Bucket for obs.
enable_versioning : builtins.bool, optional
- Is bucket versioning enabled for this bucket
+ Deprecated: OBS versioning capability is not controlled by
+ service config.
endpoint : builtins.str, optional
Endpoint for obs.
root : builtins.str, optional
diff --git a/bindings/python/src/services.rs b/bindings/python/src/services.rs
index fe28c4d9f..044f10044 100644
--- a/bindings/python/src/services.rs
+++ b/bindings/python/src/services.rs
@@ -1664,7 +1664,8 @@ submit! {
bucket : builtins.str, optional
Bucket for obs.
enable_versioning : builtins.bool, optional
- Is bucket versioning enabled for this bucket
+ Deprecated: OBS versioning capability is not
+ controlled by service config.
endpoint : builtins.str, optional
Endpoint for obs.
root : builtins.str, optional
@@ -4343,7 +4344,8 @@ submit! {
bucket : builtins.str, optional
Bucket for obs.
enable_versioning : builtins.bool, optional
- Is bucket versioning enabled for this bucket
+ Deprecated: OBS versioning capability is not
+ controlled by service config.
endpoint : builtins.str, optional
Endpoint for obs.
root : builtins.str, optional
diff --git a/core/services/obs/src/backend.rs b/core/services/obs/src/backend.rs
index eba4b232e..7deafba0f 100644
--- a/core/services/obs/src/backend.rs
+++ b/core/services/obs/src/backend.rs
@@ -121,10 +121,12 @@ impl ObsBuilder {
self
}
- /// Set bucket versioning status for this backend
- pub fn enable_versioning(mut self, enabled: bool) -> Self {
- self.config.enable_versioning = enabled;
-
+ /// Deprecated: OBS versioning capability is not controlled by service config.
+ #[deprecated(
+ since = "0.57.0",
+ note = "OBS versioning capability is not controlled by this option and this option is no longer needed."
+ )]
+ pub fn enable_versioning(self, _enabled: bool) -> Self {
self
}
}
diff --git a/core/services/obs/src/config.rs b/core/services/obs/src/config.rs
index 1efa2cc0a..654c43366 100644
--- a/core/services/obs/src/config.rs
+++ b/core/services/obs/src/config.rs
@@ -37,7 +37,11 @@ pub struct ObsConfig {
pub secret_access_key: Option<String>,
/// Bucket for obs.
pub bucket: Option<String>,
- /// Is bucket versioning enabled for this bucket
+ /// Deprecated: OBS versioning capability is not controlled by service config.
+ #[deprecated(
+ since = "0.57.0",
+ note = "OBS versioning capability is not controlled by this option and this option is no longer needed."
+ )]
pub enable_versioning: bool,
}
@@ -47,7 +51,6 @@ impl Debug for ObsConfig {
.field("root", &self.root)
.field("endpoint", &self.endpoint)
.field("bucket", &self.bucket)
- .field("enable_versioning", &self.enable_versioning)
.finish_non_exhaustive()
}
}
diff --git a/core/services/obs/src/docs.md b/core/services/obs/src/docs.md
index c2fcfff24..76be17975 100644
--- a/core/services/obs/src/docs.md
+++ b/core/services/obs/src/docs.md
@@ -19,6 +19,7 @@ This service can be used to:
- `endpoint`: Customizable endpoint setting
- `access_key_id`: Set the access_key_id for backend.
- `secret_access_key`: Set the secret_access_key for backend.
+- `enable_versioning`: Deprecated. OBS versioning capability is not controlled by this option and this option is no longer needed.
You can refer to [`ObsBuilder`]'s docs for more information