fix: remove OpenSSL dependency by migrating isahc to reqwest (rustls-tls)
This commit fixes CI failures caused by curl-sys requiring OpenSSL 3.0.0+ which is not available in the CI container image (Debian bullseye). Changes: - Replace isahc with reqwest (rustls-tls feature) in relay-utils - Remove isahc from workspace dependencies - Update reqwest to use rustls-tls and json features - Update Cargo.lock (removes curl, curl-sys, isahc, openssl-sys, native-tls) Benefits: - Pure Rust TLS implementation (no OpenSSL dependency) - More portable across different Linux distributions - Eliminates C compilation requirements for TLS - Better security (memory-safe TLS implementation) Affected workflows: - Checks / cargo-clippy - Checks / check-try-runtime - Docs / test-doc, build-rustdoc - Build and push images - tests linux stable - tests misc
This commit is contained in:
@@ -19,7 +19,8 @@ async-std = { workspace = true }
|
||||
async-trait = { workspace = true }
|
||||
backoff = { workspace = true }
|
||||
futures = { workspace = true }
|
||||
isahc = { workspace = true }
|
||||
# Using reqwest with rustls-tls for pure Rust TLS (no OpenSSL dependency)
|
||||
reqwest = { workspace = true }
|
||||
jsonpath_lib = { workspace = true }
|
||||
num-traits = { workspace = true, default-features = true }
|
||||
parking_lot = { workspace = true, default-features = true }
|
||||
|
||||
@@ -65,10 +65,14 @@ impl FloatJsonValueMetric {
|
||||
|
||||
/// Request value from HTTP service.
|
||||
async fn request_value(&self) -> anyhow::Result<String> {
|
||||
use isahc::{AsyncReadResponseExt, HttpClient, Request};
|
||||
|
||||
let request = Request::get(&self.url).header("Accept", "application/json").body(())?;
|
||||
let raw_response = HttpClient::new()?.send_async(request).await?.text().await?;
|
||||
let client = reqwest::Client::new();
|
||||
let raw_response = client
|
||||
.get(&self.url)
|
||||
.header("Accept", "application/json")
|
||||
.send()
|
||||
.await?
|
||||
.text()
|
||||
.await?;
|
||||
Ok(raw_response)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user