Skip to content

Commit

Permalink
refactor: Supabase is now an S3-compatible servcices (#5663)
Browse files Browse the repository at this point in the history
* refactor: Supabase is now an S3-compatible servcices

Signed-off-by: Xuanwo <github@xuanwo.io>

* Remove supabase

Signed-off-by: Xuanwo <github@xuanwo.io>

---------

Signed-off-by: Xuanwo <github@xuanwo.io>
  • Loading branch information
Xuanwo authored Feb 26, 2025
1 parent 1c30624 commit 0e41a17
Show file tree
Hide file tree
Showing 28 changed files with 7 additions and 858 deletions.
4 changes: 0 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,6 @@ OPENDAL_WEBHDFS_ENDPOINT=http://127.0.0.1:9870
OPENDAL_WEBHDFS_DELEGATION=<delegation>
OPENDAL_WEBHDFS_ATOMIC_WRITE_DIR=.opendal_tmp/
OPENDAL_WEBHDFS_DISABLE_LIST_BATCH=false
# supbase
OPENDAL_SUPABASE_BUCKET=<bucket>
OPENDAL_SUPABASE_ENDPOINT=<endpoint>
OPENDAL_SUPABASE_KEY=<service_key>
# vercel artifacts
OPENDAL_VERCEL_ARTIFACTS_ACCESS_TOKEN=<token>
# onedrive
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/ci_core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ jobs:
# services-sftp
services-sled
services-swift
services-supabase
services-tikv
services-vercel-artifacts
services-webdav
Expand Down
2 changes: 1 addition & 1 deletion bindings/c/include/opendal.h
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ void opendal_operator_free(const struct opendal_operator *ptr);
* reference the [documentation](https://opendal.apache.org/docs/category/services/) for
* each service, especially for the **Configuration Part**.
*
* @param scheme the service scheme you want to specify, e.g. "fs", "s3", "supabase"
* @param scheme the service scheme you want to specify, e.g. "fs", "s3"
* @param options the pointer to the options for this operator, it could be NULL, which means no
* option is set
* @see opendal_operator_options
Expand Down
2 changes: 1 addition & 1 deletion bindings/c/src/operator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ fn build_operator(
/// reference the [documentation](https://opendal.apache.org/docs/category/services/) for
/// each service, especially for the **Configuration Part**.
///
/// @param scheme the service scheme you want to specify, e.g. "fs", "s3", "supabase"
/// @param scheme the service scheme you want to specify, e.g. "fs", "s3"
/// @param options the pointer to the options for this operator, it could be NULL, which means no
/// option is set
/// @see opendal_operator_options
Expand Down
2 changes: 0 additions & 2 deletions bindings/java/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ services-all = [
# FIXME: rocksdb will lead to "cannot allocate memory in static TLS block" while linking.
# "services-rocksdb",
"services-sled",
"services-supabase",
"services-tikv",
"services-vercel-artifacts",
"services-mongodb",
Expand Down Expand Up @@ -143,7 +142,6 @@ services-seafile = ["opendal/services-seafile"]
services-sftp = ["opendal/services-sftp"]
services-sled = ["opendal/services-sled"]
services-sqlite = ["opendal/services-sqlite"]
services-supabase = ["opendal/services-supabase"]
services-swift = ["opendal/services-swift"]
services-tikv = ["opendal/services-tikv"]
services-upyun = ["opendal/services-upyun"]
Expand Down
46 changes: 0 additions & 46 deletions bindings/java/src/main/java/org/apache/opendal/ServiceConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -3192,52 +3192,6 @@ public Map<String, String> configMap() {
}
}

/**
* Configuration for service supabase.
*/
@Builder
@Data
@RequiredArgsConstructor(access = AccessLevel.PRIVATE)
class Supabase implements ServiceConfig {
/**
* <p>The bucket for supabase service.</p>
*/
public final @NonNull String bucket;
/**
* <p>The root for supabase service.</p>
*/
public final String root;
/**
* <p>The endpoint for supabase service.</p>
*/
public final String endpoint;
/**
* <p>The key for supabase service.</p>
*/
public final String key;

@Override
public String scheme() {
return "supabase";
}

@Override
public Map<String, String> configMap() {
final HashMap<String, String> map = new HashMap<>();
map.put("bucket", bucket);
if (root != null) {
map.put("root", root);
}
if (endpoint != null) {
map.put("endpoint", endpoint);
}
if (key != null) {
map.put("key", key);
}
return map;
}
}

/**
* Configuration for service surrealdb.
*/
Expand Down
10 changes: 5 additions & 5 deletions bindings/lua/src/operator_doc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,24 @@

local _M = {}

--- Construct an operator based on scheme and option. Uses an table of key-value pairs to initialize
--- the operator based on provided scheme and options. For each scheme, i.e. Backend,
--- Construct an operator based on scheme and option. Uses an table of key-value pairs to initialize
--- the operator based on provided scheme and options. For each scheme, i.e. Backend,
--- different options could be set, you may reference the https://opendal.apache.org/docs/category/services/
--- for each service, especially for the **Configuration Part**.
-- @param string scheme the service scheme you want to specify, e.g. "fs", "s3", "supabase"
-- @param string scheme the service scheme you want to specify, e.g. "fs", "s3"
-- @param table options the table to the options for this operators
-- @return table, error opendal operator table which contain opendal operator instance, error nil if success, others otherwise
-- @function new


--- Blockingly write raw bytes to path.
--- Blockingly write raw bytes to path.
--- Write the bytes into the path blockingly, returns nil if success, others otherwise
-- @param string path the designated path you want to write your bytes in
-- @param string bytes the bytes to be written
-- @return error nil if success, otherwise error message
-- @function write

--- Blockingly read raw bytes from path.
--- Blockingly read raw bytes from path.
--- Read the data out from `path` blockingly by operator, returns the string if success, others otherwise
-- @param string path the designated path you want to write your bytes in
-- @return string, error read data, error nil if success, otherwise error message
Expand Down
2 changes: 0 additions & 2 deletions bindings/nodejs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ services-all = [
# FIXME how to support rocksdb services in bindings?
# "services-rocksdb",
"services-sled",
"services-supabase",
"services-swift",
# FIXME this service need protoc
# "services-tikv",
Expand Down Expand Up @@ -141,7 +140,6 @@ services-seafile = ["opendal/services-seafile"]
services-sftp = ["opendal/services-sftp"]
services-sled = ["opendal/services-sled"]
services-sqlite = ["opendal/services-sqlite"]
services-supabase = ["opendal/services-supabase"]
services-swift = ["opendal/services-swift"]
services-tikv = ["opendal/services-tikv"]
services-upyun = ["opendal/services-upyun"]
Expand Down
2 changes: 0 additions & 2 deletions bindings/python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ services-all = [
# FIXME how to support rocksdb services in bindings?
# "services-rocksdb",
"services-sled",
"services-supabase",
"services-swift",
# FIXME this service need protoc
# "services-tikv",
Expand Down Expand Up @@ -144,7 +143,6 @@ services-seafile = ["opendal/services-seafile"]
services-sftp = ["opendal/services-sftp"]
services-sled = ["opendal/services-sled"]
services-sqlite = ["opendal/services-sqlite"]
services-supabase = ["opendal/services-supabase"]
services-swift = ["opendal/services-swift"]
services-tikv = ["opendal/services-tikv"]
services-upyun = ["opendal/services-upyun"]
Expand Down
12 changes: 0 additions & 12 deletions bindings/python/python/opendal/__base.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -717,18 +717,6 @@ class _Base:
root: str = ...,
) -> None: ...

@overload
def __init__(
self,
scheme: Literal["supabase"],
/,
*,
bucket: str,
root: str = ...,
endpoint: str = ...,
key: str = ...,
) -> None: ...

@overload
def __init__(
self,
Expand Down
1 change: 0 additions & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ services-seafile = []
services-sftp = ["dep:openssh", "dep:openssh-sftp-client", "dep:bb8"]
services-sled = ["dep:sled", "internal-tokio-rt"]
services-sqlite = ["dep:sqlx", "sqlx?/sqlite", "dep:ouroboros"]
services-supabase = []
services-surrealdb = ["dep:surrealdb"]
services-swift = []
services-tikv = ["tikv-client"]
Expand Down
1 change: 0 additions & 1 deletion core/fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ services-seafile = ["opendal/services-seafile"]
services-sftp = ["opendal/services-sftp"]
services-sled = ["opendal/services-sled"]
services-sqlite = ["opendal/services-sqlite"]
services-supabase = ["opendal/services-supabase"]
services-swift = ["opendal/services-swift"]
services-tikv = ["opendal/services-tikv"]
services-upyun = ["opendal/services-upyun"]
Expand Down
3 changes: 0 additions & 3 deletions core/src/services/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,6 @@ pub use self::sled::*;
mod sqlite;
pub use self::sqlite::*;

mod supabase;
pub use supabase::*;

mod surrealdb;
pub use surrealdb::*;

Expand Down
Loading

0 comments on commit 0e41a17

Please sign in to comment.