diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 4e0b1dd987..750c77356e 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -251,7 +251,7 @@ regex = "^1" semver = "^1" duckdb = { version = "^1.3.2", features = ["bundled"] } aws-sigv4 = "^1.3.4" -aws-sdk-config = "^1.83.0" +aws-sdk-config = "^1.68.0" v8 = "=130.0.7" # Exact version NOTE: Do not forget to update version and hash in flake.nix deno_fetch = "0.214.0" diff --git a/backend/windmill-common/src/s3_helpers.rs b/backend/windmill-common/src/s3_helpers.rs index 89aa7caf3a..1bcc9fe5f4 100644 --- a/backend/windmill-common/src/s3_helpers.rs +++ b/backend/windmill-common/src/s3_helpers.rs @@ -350,6 +350,18 @@ pub struct AzureBlobResource { pub federated_token_file: Option, } +impl AzureBlobResource { + pub fn get_endpoint_url(&self) -> error::Result { + Ok(render_endpoint( + self.endpoint.clone().unwrap_or_else(|| "".to_string()), + self.use_ssl.unwrap_or(false), + None, + None, + "".to_string(), + )) + } +} + fn as_string<'de, D>(deserializer: D) -> Result where D: serde::de::Deserializer<'de>, @@ -1123,16 +1135,7 @@ impl ObjectStoreResource { "https://storage.googleapis.com/{}", gcs_resource.bucket )), - ObjectStoreResource::Azure(az_resource) => Ok(render_endpoint( - az_resource - .endpoint - .clone() - .unwrap_or_else(|| "".to_string()), - az_resource.use_ssl.unwrap_or(false), - None, - None, - "".to_string(), - )), + ObjectStoreResource::Azure(az_resource) => az_resource.get_endpoint_url(), } } } diff --git a/backend/windmill-worker/src/duckdb_executor.rs b/backend/windmill-worker/src/duckdb_executor.rs index 351b426d5a..062f4433e8 100644 --- a/backend/windmill-worker/src/duckdb_executor.rs +++ b/backend/windmill-worker/src/duckdb_executor.rs @@ -201,8 +201,8 @@ pub async fn do_duckdb( }; conn.execute_batch(&format!( - "INSTALL httpfs; - LOAD httpfs; + "INSTALL httpfs; LOAD httpfs; + INSTALL azure; LOAD azure; CREATE OR REPLACE SECRET s3_secret ( TYPE s3, PROVIDER config,