diff --git a/Cargo.lock b/Cargo.lock index 2a0d79fb1078..9decb29b1006 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8583,12 +8583,11 @@ dependencies = [ [[package]] name = "reqsign" version = "0.14.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43e319d9de9ff4d941abf4ac718897118b0fe04577ea3f8e0f5788971784eef5" +source = "git+https://github.com/wcy-fdu/reqsign.git?rev=e6cb304#e6cb3048581033275f4525431b757c8c612d37db" dependencies = [ "anyhow", "async-trait", - "base64 0.21.7", + "base64 0.22.0", "chrono", "form_urlencoded", "getrandom", diff --git a/Cargo.toml b/Cargo.toml index 5eb2fdd0ae75..616f17bffc8f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -304,6 +304,8 @@ tokio-postgres = { git = "https://github.com/madsim-rs/rust-postgres.git", rev = futures-timer = { git = "https://github.com/madsim-rs/futures-timer.git", rev = "05b33b4" } # patch: unlimit 4MB message size for grpc client etcd-client = { git = "https://github.com/risingwavelabs/etcd-client.git", rev = "4e84d40" } +# todo(wcy-fdu): remove this patch fork after opendal release a new version to apply azure workload identity change. +reqsign = { git = "https://github.com/wcy-fdu/reqsign.git", rev = "e6cb304" } [workspace.metadata.dylint] libraries = [{ path = "./lints" }] diff --git a/risedev.yml b/risedev.yml index 18898e735cc8..ad6eb7531e35 100644 --- a/risedev.yml +++ b/risedev.yml @@ -1370,4 +1370,4 @@ template: port: 6379 # address of redis - address: "127.0.0.1" + address: "127.0.0.1" \ No newline at end of file diff --git a/src/object_store/src/object/opendal_engine/azblob.rs b/src/object_store/src/object/opendal_engine/azblob.rs index b446a2885a69..ae09a0fe2d33 100644 --- a/src/object_store/src/object/opendal_engine/azblob.rs +++ b/src/object_store/src/object/opendal_engine/azblob.rs @@ -18,6 +18,8 @@ use opendal::Operator; use super::{EngineType, OpendalObjectStore}; use crate::object::ObjectResult; + +const AZBLOB_ENDPOINT: &str = "AZBLOB_ENDPOINT"; impl OpendalObjectStore { /// create opendal azblob engine. pub fn new_azblob_engine(container_name: String, root: String) -> ObjectResult { @@ -26,16 +28,10 @@ impl OpendalObjectStore { builder.root(&root); builder.container(&container_name); - let endpoint = std::env::var("AZBLOB_ENDPOINT") + let endpoint = std::env::var(AZBLOB_ENDPOINT) .unwrap_or_else(|_| panic!("AZBLOB_ENDPOINT not found from environment variables")); - let account_name = std::env::var("AZBLOB_ACCOUNT_NAME") - .unwrap_or_else(|_| panic!("AZBLOB_ACCOUNT_NAME not found from environment variables")); - let account_key = std::env::var("AZBLOB_ACCOUNT_KEY") - .unwrap_or_else(|_| panic!("AZBLOB_ACCOUNT_KEY not found from environment variables")); builder.endpoint(&endpoint); - builder.account_name(&account_name); - builder.account_key(&account_key); let op: Operator = Operator::new(builder)? .layer(LoggingLayer::default()) .layer(RetryLayer::default())