diff --git a/Cargo.lock b/Cargo.lock index 45f4a998276fc..457e1663eadd3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -916,6 +916,28 @@ dependencies = [ "zeroize", ] +[[package]] +name = "aws-lc-rs" +version = "1.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a054912289d18629dc78375ba2c3726a3afe3ff71b4edba9dedfca0e3446d1fc" +dependencies = [ + "aws-lc-sys", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.39.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a25cf98105baa966497416dbd42565ce3a8cf8dbfd59803ec9ad46f3126399" +dependencies = [ + "cc", + "cmake", + "dunce", + "fs_extra", +] + [[package]] name = "aws-runtime" version = "1.7.2" @@ -1627,9 +1649,9 @@ dependencies = [ [[package]] name = "azure_core" -version = "0.30.1" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f35444aeeb91e29ca82d04dbb8ad904570f837c82093454dc1989c64a33554a7" +checksum = "bd0160068f7a3021b5e749dc552374e82360463e9fb51e1127631a69fdde641f" dependencies = [ "async-lock 3.4.0", "async-trait", @@ -1648,9 +1670,9 @@ dependencies = [ [[package]] name = "azure_core_macros" -version = "0.4.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94f7cc1bbae04cfe11de9e39e2c6dc755947901e0f4e76180ab542b6deb5e15e" +checksum = "1bd69a8e70ec6be32ebf7e947cf9a58f6c7255e4cd9c48e640532ef3e37adc6d" dependencies = [ "proc-macro2 1.0.106", "quote 1.0.44", @@ -1660,9 +1682,9 @@ dependencies = [ [[package]] name = "azure_identity" -version = "0.30.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f07bb0ee212021e75c3645e82d078e436b4b4184bde1295e9e81fcbcef923af" +checksum = "d7c89484f1ce8b81471c897150ec748b02beef8870bd0d43693bc5ef42365b8f" dependencies = [ "async-lock 3.4.0", "async-trait", @@ -1671,6 +1693,7 @@ dependencies = [ "openssl", "pin-project", "serde", + "serde_json", "time", "tracing 0.1.44", "url", @@ -1678,17 +1701,19 @@ dependencies = [ [[package]] name = "azure_storage_blob" -version = "0.7.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c38e589153b04af727a736f435d07b48b1a2b17df9353e5d439698fe8b718412" +checksum = "72693fc24f79adee4b3df7469b29724aa7ea25b908ea0e23f62b93f01f098283" dependencies = [ "async-trait", "azure_core", + "bytes", + "futures", + "percent-encoding", + "pin-project", "serde", "serde_json", - "typespec_client_core", - "url", - "uuid", + "time", ] [[package]] @@ -2160,10 +2185,11 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.15" +version = "1.2.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c736e259eea577f443d5c86c304f9f4ae0295c43f3ba05c21f1d66b5f06001af" +checksum = "43c5703da9466b66a946814e1adf53ea2c90f10063b86290cc9eb67ce3478a20" dependencies = [ + "find-msvc-tools", "jobserver", "libc", "shlex", @@ -3555,6 +3581,12 @@ dependencies = [ "shared_child", ] +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + [[package]] name = "dyn-clone" version = "1.0.20" @@ -4005,6 +4037,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "find-msvc-tools" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" + [[package]] name = "finl_unicode" version = "1.2.0" @@ -4129,6 +4167,12 @@ dependencies = [ "num", ] +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "fsevent-sys" version = "4.1.0" @@ -8468,6 +8512,15 @@ name = "quick-xml" version = "0.38.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b66c2058c55a409d601666cffe35f04333cf1013010882cec174a7467cd4e21c" +dependencies = [ + "memchr", +] + +[[package]] +name = "quick-xml" +version = "0.39.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "958f21e8e7ceb5a1aa7fa87fab28e7c75976e0bfe7e23ff069e0a260f894067d" dependencies = [ "memchr", "serde", @@ -8519,6 +8572,7 @@ version = "0.11.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098" dependencies = [ + "aws-lc-rs", "bytes", "getrandom 0.3.4", "lru-slab", @@ -9075,7 +9129,6 @@ dependencies = [ "bytes", "cookie", "cookie_store", - "encoding_rs", "futures-channel", "futures-core", "futures-util", @@ -9089,7 +9142,6 @@ dependencies = [ "hyper-util", "js-sys", "log", - "mime", "mime_guess", "native-tls", "percent-encoding", @@ -9112,11 +9164,57 @@ dependencies = [ "url", "wasm-bindgen", "wasm-bindgen-futures", - "wasm-streams", + "wasm-streams 0.4.0", "web-sys", "webpki-roots 1.0.4", ] +[[package]] +name = "reqwest" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab3f43e3283ab1488b624b44b0e988d0acea0b3214e694730a055cb6b2efa801" +dependencies = [ + "base64 0.22.1", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2 0.4.13", + "http 1.3.1", + "http-body 1.0.1", + "http-body-util", + "hyper 1.7.0", + "hyper-rustls 0.27.5", + "hyper-tls 0.6.0", + "hyper-util", + "js-sys", + "log", + "mime", + "native-tls", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls 0.23.37", + "rustls-pki-types", + "rustls-platform-verifier", + "serde", + "serde_json", + "sync_wrapper 1.0.1", + "tokio", + "tokio-native-tls", + "tokio-rustls 0.26.2", + "tokio-util", + "tower 0.5.3", + "tower-http 0.6.8", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams 0.5.0", + "web-sys", +] + [[package]] name = "reqwest-middleware" version = "0.4.2" @@ -9441,6 +9539,7 @@ version = "0.23.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "758025cb5fccfd3bc2fd74708fd4682be41d99e5dff73c377c0646c6012c73a4" dependencies = [ + "aws-lc-rs", "log", "once_cell", "ring", @@ -9504,6 +9603,33 @@ dependencies = [ "zeroize", ] +[[package]] +name = "rustls-platform-verifier" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d99feebc72bae7ab76ba994bb5e121b8d83d910ca40b36e0921f53becc41784" +dependencies = [ + "core-foundation 0.10.1", + "core-foundation-sys", + "jni", + "log", + "once_cell", + "rustls 0.23.37", + "rustls-native-certs 0.8.1", + "rustls-platform-verifier-android", + "rustls-webpki 0.103.10", + "security-framework 3.6.0", + "security-framework-sys", + "webpki-root-certs", + "windows-sys 0.61.0", +] + +[[package]] +name = "rustls-platform-verifier-android" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" + [[package]] name = "rustls-webpki" version = "0.101.7" @@ -9531,6 +9657,7 @@ version = "0.103.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df33b2b81ac578cabaf06b89b0631153a3f416b0a886e8a7a1707fb51abbd1ef" dependencies = [ + "aws-lc-rs", "ring", "rustls-pki-types", "untrusted", @@ -9839,16 +9966,16 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.145" +version = "1.0.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" dependencies = [ "indexmap 2.12.0", "itoa", "memchr", - "ryu", "serde", "serde_core", + "zmij", ] [[package]] @@ -11049,7 +11176,6 @@ checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" dependencies = [ "deranged", "itoa", - "js-sys", "libc", "num-conv", "num_threads", @@ -11898,14 +12024,14 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "typespec" -version = "0.10.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44f91ea93fdd5fd4985fcc0a197ed8e8da18705912bef63c9b9b3148d6f35510" +checksum = "b63559a2aab9c7694fa8d2658a828d6b36f1e3904b1860d820c7cc6a2ead61c7" dependencies = [ "base64 0.22.1", "bytes", "futures", - "quick-xml 0.38.4", + "quick-xml 0.39.2", "serde", "serde_json", "url", @@ -11913,22 +12039,20 @@ dependencies = [ [[package]] name = "typespec_client_core" -version = "0.9.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a0f6f7345c3389663551a64fc4dca78fa9689ece758c5ca76e82d6da69349dc" +checksum = "de81ecf3a175da5a10ed60344caa8b53fe6d8ce28c6c978a7e3e09ca1e1b4131" dependencies = [ "async-trait", "base64 0.22.1", "dyn-clone", "futures", - "getrandom 0.3.4", "pin-project", - "rand 0.9.2", - "reqwest 0.12.28", + "rand 0.10.0", + "reqwest 0.13.2", "serde", "serde_json", "time", - "tokio", "tracing 0.1.44", "typespec", "typespec_macros", @@ -11938,9 +12062,9 @@ dependencies = [ [[package]] name = "typespec_macros" -version = "0.9.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ecee5b05c459ea4cd97df7685db58699c32e070465f88dc806d7c98a5088edc" +checksum = "07108c5d18e00ec7bb09d2e48df95ebfab6b7179112d1e4216e9968ac2a0a429" dependencies = [ "proc-macro2 1.0.106", "quote 1.0.44", @@ -12371,7 +12495,7 @@ dependencies = [ "redis", "regex", "reqwest 0.11.26", - "reqwest 0.12.28", + "reqwest 0.13.2", "rmp-serde", "rmpv", "roaring", @@ -13084,12 +13208,14 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.38" +version = "0.4.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afec9963e3d0994cac82455b2b3502b81a7f40f9a0d32181f7528d9f4b43e02" +checksum = "e9c5522b3a28661442748e09d40924dfb9ca614b21c00d3fd135720e48b67db8" dependencies = [ "cfg-if", + "futures-util", "js-sys", + "once_cell", "wasm-bindgen", "web-sys", ] @@ -13161,6 +13287,19 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wasm-streams" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1ec4f6517c9e11ae630e200b2b65d193279042e28edd4a2cda233e46670bbb" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "wasmparser" version = "0.244.0" @@ -13224,6 +13363,15 @@ dependencies = [ "web-sys", ] +[[package]] +name = "webpki-root-certs" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "804f18a4ac2676ffb4e8b5b5fa9ae38af06df08162314f96a68d2a363e21a8ca" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "webpki-roots" version = "0.26.1" @@ -14145,6 +14293,12 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7948af682ccbc3342b6e9420e8c51c1fe5d7bf7756002b4a3c6cabfe96a7e3c" +[[package]] +name = "zmij" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" + [[package]] name = "zstd" version = "0.12.4" diff --git a/Cargo.toml b/Cargo.toml index 25ca1f9e0dec9..c150090b65423 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -221,7 +221,7 @@ strum = { version = "0.28", features = ["derive"] } [dependencies] cfg-if.workspace = true reqwest.workspace = true -reqwest_12 = { package = "reqwest", version = "0.12", features = ["json"] } +reqwest_13 = { package = "reqwest", version = "0.13", features = ["json"] } clap.workspace = true clap_complete.workspace = true indoc.workspace = true @@ -301,11 +301,11 @@ aws-smithy-runtime-api = { version = "1.7.3", default-features = false, optional aws-smithy-types = { version = "1.2.11", default-features = false, features = ["rt-tokio"], optional = true } # Azure -azure_core = { version = "0.30", features = ["reqwest", "hmac_openssl"], optional = true } -azure_identity = { version = "0.30", features = ["client_certificate"], optional = true } +azure_core = { version = "0.33", features = ["reqwest", "hmac_openssl"], optional = true } +azure_identity = { version = "0.33", features = ["client_certificate"], optional = true } # Azure Storage -azure_storage_blob = { version = "0.7", optional = true } +azure_storage_blob = { version = "0.10.1", optional = true } # OpenDAL opendal = { version = "0.54", default-features = false, features = ["services-webhdfs"], optional = true } @@ -875,8 +875,8 @@ sinks-aws_s3 = ["dep:base64", "dep:md-5", "aws-core", "dep:aws-sdk-s3"] sinks-aws_sqs = ["aws-core", "dep:aws-sdk-sqs"] sinks-aws_sns = ["aws-core", "dep:aws-sdk-sns"] sinks-axiom = ["sinks-http"] -sinks-azure_blob = ["dep:azure_core", "dep:azure_identity", "dep:azure_storage_blob", "dep:base64"] -sinks-azure_logs_ingestion = ["dep:azure_core", "dep:azure_identity", "dep:azure_storage_blob", "dep:base64"] +sinks-azure_blob = ["dep:azure_core", "dep:azure_identity", "dep:azure_storage_blob"] +sinks-azure_logs_ingestion = ["dep:azure_core", "dep:azure_identity", "dep:azure_storage_blob"] sinks-azure_monitor_logs = [] sinks-blackhole = [] sinks-chronicle = [] diff --git a/LICENSE-3rdparty.csv b/LICENSE-3rdparty.csv index 9a135f0479f51..d59068d1bcab5 100644 --- a/LICENSE-3rdparty.csv +++ b/LICENSE-3rdparty.csv @@ -64,6 +64,8 @@ atoi,https://github.com/pacman82/atoi-rs,MIT,Markus Klein atomic-waker,https://github.com/smol-rs/atomic-waker,Apache-2.0 OR MIT,"Stjepan Glavina , Contributors to futures-rs" aws-config,https://github.com/smithy-lang/smithy-rs,Apache-2.0,"AWS Rust SDK Team , Russell Cohen " aws-credential-types,https://github.com/smithy-lang/smithy-rs,Apache-2.0,AWS Rust SDK Team +aws-lc-rs,https://github.com/aws/aws-lc-rs,ISC AND (Apache-2.0 OR ISC),AWS-LibCrypto +aws-lc-sys,https://github.com/aws/aws-lc-rs,ISC AND (Apache-2.0 OR ISC) AND Apache-2.0 AND MIT AND BSD-3-Clause AND (Apache-2.0 OR ISC OR MIT) AND (Apache-2.0 OR ISC OR MIT-0),AWS-LC aws-runtime,https://github.com/smithy-lang/smithy-rs,Apache-2.0,AWS Rust SDK Team aws-sdk-cloudwatch,https://github.com/awslabs/aws-sdk-rust,Apache-2.0,"AWS Rust SDK Team , Russell Cohen " aws-sdk-cloudwatchlogs,https://github.com/awslabs/aws-sdk-rust,Apache-2.0,"AWS Rust SDK Team , Russell Cohen " @@ -655,6 +657,8 @@ rustls,https://github.com/rustls/rustls,Apache-2.0 OR ISC OR MIT,The rustls Auth rustls-native-certs,https://github.com/rustls/rustls-native-certs,Apache-2.0 OR ISC OR MIT,The rustls-native-certs Authors rustls-pemfile,https://github.com/rustls/pemfile,Apache-2.0 OR ISC OR MIT,The rustls-pemfile Authors rustls-pki-types,https://github.com/rustls/pki-types,MIT OR Apache-2.0,The rustls-pki-types Authors +rustls-platform-verifier,https://github.com/rustls/rustls-platform-verifier,MIT OR Apache-2.0,The rustls-platform-verifier Authors +rustls-platform-verifier-android,https://github.com/rustls/rustls-platform-verifier,MIT OR Apache-2.0,The rustls-platform-verifier-android Authors rustls-webpki,https://github.com/rustls/webpki,ISC,The rustls-webpki Authors rustversion,https://github.com/dtolnay/rustversion,MIT OR Apache-2.0,David Tolnay rusty-fork,https://github.com/altsysrq/rusty-fork,MIT OR Apache-2.0,Jason Lingle @@ -851,7 +855,7 @@ wasip2,https://github.com/bytecodealliance/wasi-rs,Apache-2.0 WITH LLVM-exceptio wasip3,https://github.com/bytecodealliance/wasi-rs,Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT,The wasip3 Authors wasite,https://github.com/ardaku/wasite,Apache-2.0 OR BSL-1.0 OR MIT,The wasite Authors wasm-bindgen,https://github.com/wasm-bindgen/wasm-bindgen,MIT OR Apache-2.0,The wasm-bindgen Developers -wasm-bindgen-futures,https://github.com/rustwasm/wasm-bindgen/tree/master/crates/futures,MIT OR Apache-2.0,The wasm-bindgen Developers +wasm-bindgen-futures,https://github.com/wasm-bindgen/wasm-bindgen/tree/master/crates/futures,MIT OR Apache-2.0,The wasm-bindgen Developers wasm-bindgen-macro,https://github.com/wasm-bindgen/wasm-bindgen/tree/master/crates/macro,MIT OR Apache-2.0,The wasm-bindgen Developers wasm-bindgen-macro-support,https://github.com/wasm-bindgen/wasm-bindgen/tree/master/crates/macro-support,MIT OR Apache-2.0,The wasm-bindgen Developers wasm-bindgen-shared,https://github.com/wasm-bindgen/wasm-bindgen/tree/master/crates/shared,MIT OR Apache-2.0,The wasm-bindgen Developers @@ -863,6 +867,7 @@ wasmtimer,https://github.com/whizsid/wasmtimer-rs,MIT,"WhizSid web-sys,https://github.com/wasm-bindgen/wasm-bindgen/tree/master/crates/web-sys,MIT OR Apache-2.0,The wasm-bindgen Developers web-time,https://github.com/daxpedda/web-time,MIT OR Apache-2.0,The web-time Authors webbrowser,https://github.com/amodm/webbrowser-rs,MIT OR Apache-2.0,Amod Malviya @amodm +webpki-root-certs,https://github.com/rustls/webpki-roots,CDLA-Permissive-2.0,The webpki-root-certs Authors webpki-roots,https://github.com/rustls/webpki-roots,CDLA-Permissive-2.0,The webpki-roots Authors webpki-roots,https://github.com/rustls/webpki-roots,MPL-2.0,The webpki-roots Authors whoami,https://github.com/ardaku/whoami,Apache-2.0 OR BSL-1.0 OR MIT,The whoami Authors @@ -923,6 +928,7 @@ zeroize,https://github.com/RustCrypto/utils/tree/master/zeroize,Apache-2.0 OR MI zerovec,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Project Developers zerovec-derive,https://github.com/unicode-org/icu4x,Unicode-3.0,Manish Goregaokar zlib-rs,https://github.com/trifectatechfoundation/zlib-rs,Zlib,The zlib-rs Authors +zmij,https://github.com/dtolnay/zmij,MIT,David Tolnay zstd,https://github.com/gyscos/zstd-rs,MIT,Alexandre Bury zstd-safe,https://github.com/gyscos/zstd-rs,MIT OR Apache-2.0,Alexandre Bury zstd-sys,https://github.com/gyscos/zstd-rs,MIT OR Apache-2.0,Alexandre Bury diff --git a/src/sinks/azure_blob/integration_tests.rs b/src/sinks/azure_blob/integration_tests.rs index dbe20a884ff86..f7cd38970a847 100644 --- a/src/sinks/azure_blob/integration_tests.rs +++ b/src/sinks/azure_blob/integration_tests.rs @@ -335,7 +335,7 @@ impl AzureBlobSinkConfig { let mut names = Vec::new(); while let Some(result) = pager.next().await { let item = result.expect("Failed to fetch blobs"); - if let Some(name) = item.name.and_then(|bn| bn.content) + if let Some(name) = item.name && name.starts_with(&prefix) { names.push(name); @@ -403,7 +403,7 @@ impl AzureBlobSinkConfig { async fn ensure_container(&self) { let client = self.build_test_client().await; - let result = client.create_container(None).await; + let result = client.create(None).await; let response = match result { Ok(_) => Ok(()), diff --git a/src/sinks/azure_common/config.rs b/src/sinks/azure_common/config.rs index 800e0a6eb3f23..357c66f1ce5e8 100644 --- a/src/sinks/azure_common/config.rs +++ b/src/sinks/azure_common/config.rs @@ -3,6 +3,7 @@ use std::io::Read; use std::path::PathBuf; use std::sync::Arc; +#[cfg(test)] use base64::prelude::*; use azure_core::error::Error as AzureCoreError; @@ -278,10 +279,6 @@ impl SpecificAzureCredential { ) })?; - // Note: in azure_identity 0.33.0+, this changes to SecretBytes, and the base64 encoding is no longer needed - let certificate_base64: azure_core::credentials::Secret = - BASE64_STANDARD.encode(&certificate_bytes).into(); - let mut options: ClientCertificateCredentialOptions = ClientCertificateCredentialOptions::default(); if let Some(password) = certificate_password { @@ -291,7 +288,7 @@ impl SpecificAzureCredential { ClientCertificateCredential::new( azure_tenant_id.clone(), azure_client_id.clone(), - certificate_base64, + certificate_bytes.into(), Some(options), )? } @@ -596,8 +593,8 @@ pub async fn build_client( } } - // Use reqwest v0.12 since Azure SDK only implements HttpClient for reqwest::Client v0.12 - let mut reqwest_builder = reqwest_12::ClientBuilder::new(); + // Use reqwest v0.13 since Azure SDK only implements HttpClient for reqwest::Client v0.13 + let mut reqwest_builder = reqwest_13::ClientBuilder::new(); let bypass_proxy = { let host = url.host_str().unwrap_or(""); let port = url.port(); @@ -611,13 +608,13 @@ pub async fn build_client( reqwest_builder = reqwest_builder.no_proxy(); } else { if let Some(http) = &proxy.http { - let p = reqwest_12::Proxy::http(http) + let p = reqwest_13::Proxy::http(http) .map_err(|e| format!("Invalid HTTP proxy URL: {e}"))?; // If credentials are embedded in the proxy URL, reqwest will handle them. reqwest_builder = reqwest_builder.proxy(p); } if let Some(https) = &proxy.https { - let p = reqwest_12::Proxy::https(https) + let p = reqwest_13::Proxy::https(https) .map_err(|e| format!("Invalid HTTPS proxy URL: {e}"))?; // If credentials are embedded in the proxy URL, reqwest will handle them. reqwest_builder = reqwest_builder.proxy(p); @@ -629,7 +626,7 @@ pub async fn build_client( { let mut buf = Vec::new(); File::open(ca_file)?.read_to_end(&mut buf)?; - let cert = reqwest_12::Certificate::from_pem(&buf)?; + let cert = reqwest_13::Certificate::from_pem(&buf)?; warn!("Adding TLS root certificate from {}", ca_file.display()); reqwest_builder = reqwest_builder.add_root_certificate(cert); diff --git a/src/sinks/azure_common/service.rs b/src/sinks/azure_common/service.rs index 1f1d322156f78..68f75d9afe8f0 100644 --- a/src/sinks/azure_common/service.rs +++ b/src/sinks/azure_common/service.rs @@ -47,13 +47,12 @@ impl Service for AzureBlobService { blob_content_type: Some(request.content_type.to_string()), blob_content_encoding: request.content_encoding.map(|e| e.to_string()), ..Default::default() - }; + } + .with_if_not_exists(); let result = blob_client .upload( RequestContent::from(request.blob_data.to_vec()), - false, - byte_size as u64, Some(upload_options), ) .instrument(info_span!("request").or_current()) diff --git a/tests/integration/azure/config/compose.yaml b/tests/integration/azure/config/compose.yaml index 384a65ab0e42d..f7186a61cb00b 100644 --- a/tests/integration/azure/config/compose.yaml +++ b/tests/integration/azure/config/compose.yaml @@ -9,7 +9,7 @@ services: azurite: image: mcr.microsoft.com/azure-storage/azurite:${CONFIG_VERSION} - command: azurite --blobHost 0.0.0.0 --blobPort 14430 --queuePort 14431 --tablePort 14432 --loose --oauth basic --cert /certs/azurite-chain.cert.pem --key /private/azurite.key.pem + command: azurite --skipApiVersionCheck --blobHost 0.0.0.0 --blobPort 14430 --queuePort 14431 --tablePort 14432 --loose --oauth basic --cert /certs/azurite-chain.cert.pem --key /private/azurite.key.pem volumes: - /var/run:/var/run - ../../../data/ca/intermediate_server/certs:/certs