From 333b6d5160310da8848b8e4ff582bfca271b3993 Mon Sep 17 00:00:00 2001 From: Daniel Sharifi Date: Mon, 28 Oct 2024 14:51:19 +0000 Subject: [PATCH 1/6] upgrade hyper util and increase header limit --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- bazel/external_crates.bzl | 2 +- rs/https_outcalls/adapter/src/rpc_server.rs | 15 ++++++++++----- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 59cf32379be..a7628527777 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5111,9 +5111,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", diff --git a/Cargo.toml b/Cargo.toml index d79b05e8763..e73b11dec86 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -545,7 +545,7 @@ hyper-rustls = { version = "0.27.3", default-features = false, features = [ "tls12", ] } hyper-socks2 = { version = "0.9.1", default-features = false } -hyper-util = { version = "0.1.9", features = ["full"] } +hyper-util = { version = "0.1.10", features = ["full"] } ic-agent = { version = "0.37.1", features = [ "experimental_sync_call", "hyper", diff --git a/bazel/external_crates.bzl b/bazel/external_crates.bzl index e9eee822a64..64547dd929c 100644 --- a/bazel/external_crates.bzl +++ b/bazel/external_crates.bzl @@ -510,7 +510,7 @@ def external_crates_repository(name, cargo_lockfile, lockfile, sanitizers_enable default_features = False, ), "hyper-util": crate.spec( - version = "^0.1.9", + version = "^0.1.10", features = ["full"], ), "hyper-rustls": crate.spec( diff --git a/rs/https_outcalls/adapter/src/rpc_server.rs b/rs/https_outcalls/adapter/src/rpc_server.rs index 6366324210d..9310e9b97a9 100644 --- a/rs/https_outcalls/adapter/src/rpc_server.rs +++ b/rs/https_outcalls/adapter/src/rpc_server.rs @@ -27,16 +27,20 @@ use std::str::FromStr; use std::time::Duration; use tonic::{Request, Response, Status}; -/// Hyper only supports a maximum of 32768 headers https://docs.rs/hyper/0.14.23/hyper/header/index.html#limitations-1 +/// Hyper only supports a maximum of 32768 headers https://docs.rs/hyper/1.5.0/hyper/header/index.html /// and it panics if we try to allocate more headers. And since hyper sometimes grows the map by doubling the entries /// we choose a lower value to be safe. const HEADERS_LIMIT: usize = 1_024; -/// Hyper also limits the size of the HeaderName to 32768. https://docs.rs/hyper/0.14.23/hyper/header/index.html#limitations. +/// Hyper also limits the size of the HeaderName to 32768. https://docs.rs/hyper/1.5.0/hyper/header/index.html. const HEADER_NAME_VALUE_LIMIT: usize = 8_192; /// By default most higher-level http libs like `curl` set some `User-Agent` so we do the same here to avoid getting rejected due to strict server requirements. const USER_AGENT_ADAPTER: &str = "ic/1.0"; +/// We should support at least 48 KB in headers and values according to the IC spec: +/// "the total number of bytes representing the header names and values must not exceed 48KiB". +const MAX_HEADER_LIST_SIZE: u32 = 52 * 1024; + type OutboundRequestBody = Full; /// Implements HttpsOutcallsService @@ -87,8 +91,9 @@ impl CanisterHttp { let socks_client = Client::builder(TokioExecutor::new()).build::<_, Full>(proxied_https_connector); - let client = - Client::builder(TokioExecutor::new()).build::<_, Full>(direct_https_connector); + let client = Client::builder(TokioExecutor::new()) + .http2_max_header_list_size(MAX_HEADER_LIST_SIZE) + .build::<_, Full>(direct_https_connector); Self { client, @@ -204,7 +209,7 @@ impl HttpsOutcallsService for CanisterHttp { *http_req.headers_mut() = headers; *http_req.method_mut() = method; *http_req.uri_mut() = uri.clone(); - self.client.request(http_req).await.map_err(|e| format!("Failed to directly connect: {e}")) + self.client.request(http_req).await.map_err(|e| format!("Failed to directly connect: {:?}", e)) } .map_err(|err| { debug!(self.logger, "Failed to connect: {}", err); From 412672108cab4a5f366b605fd49398853d25396d Mon Sep 17 00:00:00 2001 From: Daniel Sharifi Date: Mon, 28 Oct 2024 14:54:46 +0000 Subject: [PATCH 2/6] update lock files --- Cargo.Bazel.Fuzzing.json.lock | 42 +++--- Cargo.Bazel.Fuzzing.toml.lock | 4 +- Cargo.Bazel.json.lock | 42 +++--- Cargo.Bazel.toml.lock | 4 +- Cargo.lock | 276 +++++++++++++++++----------------- 5 files changed, 184 insertions(+), 184 deletions(-) diff --git a/Cargo.Bazel.Fuzzing.json.lock b/Cargo.Bazel.Fuzzing.json.lock index b97e1e1351b..797e36edad9 100644 --- a/Cargo.Bazel.Fuzzing.json.lock +++ b/Cargo.Bazel.Fuzzing.json.lock @@ -1,5 +1,5 @@ { - "checksum": "78f0da06c53d3fea869c6e8cac026c31871cde95bd6f583246b83cdd0b49f696", + "checksum": "f8b4c5c79984a20a396e4fc13a32288840085a7d1a4e48cef5a5f312a57d464c", "crates": { "abnf 0.12.0": { "name": "abnf", @@ -4439,7 +4439,7 @@ "target": "hyper" }, { - "id": "hyper-util 0.1.9", + "id": "hyper-util 0.1.10", "target": "hyper_util" }, { @@ -4968,7 +4968,7 @@ "target": "hyper" }, { - "id": "hyper-util 0.1.9", + "id": "hyper-util 0.1.10", "target": "hyper_util" }, { @@ -17753,7 +17753,7 @@ "target": "hyper_socks2" }, { - "id": "hyper-util 0.1.9", + "id": "hyper-util 0.1.10", "target": "hyper_util" }, { @@ -27247,7 +27247,7 @@ "target": "hyper_rustls" }, { - "id": "hyper-util 0.1.9", + "id": "hyper-util 0.1.10", "target": "hyper_util" }, { @@ -27559,7 +27559,7 @@ "target": "hyper" }, { - "id": "hyper-util 0.1.9", + "id": "hyper-util 0.1.10", "target": "hyper_util" }, { @@ -27653,7 +27653,7 @@ "target": "hyper" }, { - "id": "hyper-util 0.1.9", + "id": "hyper-util 0.1.10", "target": "hyper_util" }, { @@ -27717,7 +27717,7 @@ "target": "hyper" }, { - "id": "hyper-util 0.1.9", + "id": "hyper-util 0.1.10", "target": "hyper_util" }, { @@ -27745,14 +27745,14 @@ ], "license_file": "LICENSE-APACHE" }, - "hyper-util 0.1.9": { + "hyper-util 0.1.10": { "name": "hyper-util", - "version": "0.1.9", + "version": "0.1.10", "package_url": "https://github.com/hyperium/hyper-util", "repository": { "Http": { - "url": "https://static.crates.io/crates/hyper-util/0.1.9/download", - "sha256": "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" + "url": "https://static.crates.io/crates/hyper-util/0.1.10/download", + "sha256": "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" } }, "targets": [ @@ -27840,7 +27840,7 @@ "selects": {} }, "edition": "2021", - "version": "0.1.9" + "version": "0.1.10" }, "license": "MIT", "license_ids": [ @@ -28187,7 +28187,7 @@ "target": "hyper_rustls" }, { - "id": "hyper-util 0.1.9", + "id": "hyper-util 0.1.10", "target": "hyper_util" }, { @@ -28329,7 +28329,7 @@ "target": "hyper" }, { - "id": "hyper-util 0.1.9", + "id": "hyper-util 0.1.10", "target": "hyper_util" }, { @@ -33004,7 +33004,7 @@ "target": "hyper_rustls" }, { - "id": "hyper-util 0.1.9", + "id": "hyper-util 0.1.10", "target": "hyper_util" }, { @@ -34497,7 +34497,7 @@ "target": "hyper_timeout" }, { - "id": "hyper-util 0.1.9", + "id": "hyper-util 0.1.10", "target": "hyper_util" }, { @@ -38465,7 +38465,7 @@ "target": "hyper_rustls" }, { - "id": "hyper-util 0.1.9", + "id": "hyper-util 0.1.10", "target": "hyper_util" }, { @@ -53019,7 +53019,7 @@ "target": "hyper_rustls" }, { - "id": "hyper-util 0.1.9", + "id": "hyper-util 0.1.10", "target": "hyper_util" }, { @@ -66563,7 +66563,7 @@ "target": "hyper_timeout" }, { - "id": "hyper-util 0.1.9", + "id": "hyper-util 0.1.10", "target": "hyper_util" }, { @@ -78524,7 +78524,7 @@ "hyper 1.5.0", "hyper-rustls 0.27.3", "hyper-socks2 0.9.1", - "hyper-util 0.1.9", + "hyper-util 0.1.10", "ic-agent 0.37.1", "ic-bn-lib 0.1.0", "ic-btc-interface 0.2.2", diff --git a/Cargo.Bazel.Fuzzing.toml.lock b/Cargo.Bazel.Fuzzing.toml.lock index 63c00153f21..a97a47b3639 100644 --- a/Cargo.Bazel.Fuzzing.toml.lock +++ b/Cargo.Bazel.Fuzzing.toml.lock @@ -4828,9 +4828,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", diff --git a/Cargo.Bazel.json.lock b/Cargo.Bazel.json.lock index 40c8a27f599..95a17e10162 100644 --- a/Cargo.Bazel.json.lock +++ b/Cargo.Bazel.json.lock @@ -1,5 +1,5 @@ { - "checksum": "064a13c0359982d947a7c1993ad892be8a541f816ab527f4c04db07118bb1530", + "checksum": "6ad69f549940b165880fbf28174e3a2436e16203ec2297f336bcbc7a1dabcdd5", "crates": { "abnf 0.12.0": { "name": "abnf", @@ -4443,7 +4443,7 @@ "target": "hyper" }, { - "id": "hyper-util 0.1.9", + "id": "hyper-util 0.1.10", "target": "hyper_util" }, { @@ -4972,7 +4972,7 @@ "target": "hyper" }, { - "id": "hyper-util 0.1.9", + "id": "hyper-util 0.1.10", "target": "hyper_util" }, { @@ -17576,7 +17576,7 @@ "target": "hyper_socks2" }, { - "id": "hyper-util 0.1.9", + "id": "hyper-util 0.1.10", "target": "hyper_util" }, { @@ -27094,7 +27094,7 @@ "target": "hyper_rustls" }, { - "id": "hyper-util 0.1.9", + "id": "hyper-util 0.1.10", "target": "hyper_util" }, { @@ -27406,7 +27406,7 @@ "target": "hyper" }, { - "id": "hyper-util 0.1.9", + "id": "hyper-util 0.1.10", "target": "hyper_util" }, { @@ -27500,7 +27500,7 @@ "target": "hyper" }, { - "id": "hyper-util 0.1.9", + "id": "hyper-util 0.1.10", "target": "hyper_util" }, { @@ -27564,7 +27564,7 @@ "target": "hyper" }, { - "id": "hyper-util 0.1.9", + "id": "hyper-util 0.1.10", "target": "hyper_util" }, { @@ -27592,14 +27592,14 @@ ], "license_file": "LICENSE-APACHE" }, - "hyper-util 0.1.9": { + "hyper-util 0.1.10": { "name": "hyper-util", - "version": "0.1.9", + "version": "0.1.10", "package_url": "https://github.com/hyperium/hyper-util", "repository": { "Http": { - "url": "https://static.crates.io/crates/hyper-util/0.1.9/download", - "sha256": "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" + "url": "https://static.crates.io/crates/hyper-util/0.1.10/download", + "sha256": "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" } }, "targets": [ @@ -27687,7 +27687,7 @@ "selects": {} }, "edition": "2021", - "version": "0.1.9" + "version": "0.1.10" }, "license": "MIT", "license_ids": [ @@ -28034,7 +28034,7 @@ "target": "hyper_rustls" }, { - "id": "hyper-util 0.1.9", + "id": "hyper-util 0.1.10", "target": "hyper_util" }, { @@ -28176,7 +28176,7 @@ "target": "hyper" }, { - "id": "hyper-util 0.1.9", + "id": "hyper-util 0.1.10", "target": "hyper_util" }, { @@ -32829,7 +32829,7 @@ "target": "hyper_rustls" }, { - "id": "hyper-util 0.1.9", + "id": "hyper-util 0.1.10", "target": "hyper_util" }, { @@ -34322,7 +34322,7 @@ "target": "hyper_timeout" }, { - "id": "hyper-util 0.1.9", + "id": "hyper-util 0.1.10", "target": "hyper_util" }, { @@ -38296,7 +38296,7 @@ "target": "hyper_rustls" }, { - "id": "hyper-util 0.1.9", + "id": "hyper-util 0.1.10", "target": "hyper_util" }, { @@ -52859,7 +52859,7 @@ "target": "hyper_rustls" }, { - "id": "hyper-util 0.1.9", + "id": "hyper-util 0.1.10", "target": "hyper_util" }, { @@ -66403,7 +66403,7 @@ "target": "hyper_timeout" }, { - "id": "hyper-util 0.1.9", + "id": "hyper-util 0.1.10", "target": "hyper_util" }, { @@ -78394,7 +78394,7 @@ "hyper 1.5.0", "hyper-rustls 0.27.3", "hyper-socks2 0.9.1", - "hyper-util 0.1.9", + "hyper-util 0.1.10", "ic-agent 0.37.1", "ic-bn-lib 0.1.0", "ic-btc-interface 0.2.2", diff --git a/Cargo.Bazel.toml.lock b/Cargo.Bazel.toml.lock index 9d621bac2d8..f02d4487923 100644 --- a/Cargo.Bazel.toml.lock +++ b/Cargo.Bazel.toml.lock @@ -4818,9 +4818,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", diff --git a/Cargo.lock b/Cargo.lock index a7628527777..4b4d6feda2b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -96,7 +96,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -214,7 +214,7 @@ dependencies = [ "actix-router", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -355,9 +355,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstream" -version = "0.6.15" +version = "0.6.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +checksum = "23a1e53f0f5d86382dafe1cf314783b2044280f406e7e1506368220ad11b1338" dependencies = [ "anstyle", "anstyle-parse", @@ -370,36 +370,36 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" +checksum = "8365de52b16c035ff4fcafe0092ba9390540e3e352870ac09933bebcaa2c8c56" [[package]] name = "anstyle-parse" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.4" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -472,7 +472,7 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -514,7 +514,7 @@ checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", "synstructure", ] @@ -526,7 +526,7 @@ checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -651,7 +651,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -694,7 +694,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -711,7 +711,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -757,7 +757,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -1056,7 +1056,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -1326,7 +1326,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", "syn_derive", ] @@ -1694,7 +1694,7 @@ dependencies = [ "lazy_static", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -2100,7 +2100,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -2202,9 +2202,9 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "colored" @@ -2867,7 +2867,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -2927,7 +2927,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -3064,7 +3064,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -3097,7 +3097,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core 0.20.10", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -3190,7 +3190,7 @@ checksum = "8034092389675178f570469e6c3b0465d3d30b4505c294a6550db47f3c17ad18" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -3211,7 +3211,7 @@ checksum = "d150dea618e920167e5973d70ae6ece4385b7164e0d799fe7c122dd0a5d912ad" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -3222,7 +3222,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -3235,7 +3235,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -3255,7 +3255,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -3462,7 +3462,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -3673,9 +3673,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if 1.0.0", ] @@ -3701,7 +3701,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -3714,7 +3714,7 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -4304,7 +4304,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -4314,7 +4314,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f2f12607f92c69b12ed746fabf9ca4f5c482cba46679c1a75b874ed7c26adb" dependencies = [ "futures-io", - "rustls 0.23.15", + "rustls 0.23.16", "rustls-pki-types", ] @@ -4943,7 +4943,7 @@ dependencies = [ "clap 4.5.20", "hyper 1.5.0", "hyper-util", - "rustls 0.23.15", + "rustls 0.23.16", "rustls-pemfile 2.2.0", "serde_json", "tokio", @@ -5072,7 +5072,7 @@ dependencies = [ "hyper 1.5.0", "hyper-util", "log", - "rustls 0.23.15", + "rustls 0.23.16", "rustls-native-certs 0.8.0", "rustls-pki-types", "tokio", @@ -5548,7 +5548,7 @@ dependencies = [ "rand 0.8.5", "rcgen", "reqwest 0.12.8", - "rustls 0.23.15", + "rustls 0.23.16", "rustls-acme", "rustls-pemfile 2.2.0", "serde_json", @@ -5627,7 +5627,7 @@ dependencies = [ "rcgen", "regex", "reqwest 0.12.8", - "rustls 0.23.15", + "rustls 0.23.16", "rustls-pemfile 2.2.0", "serde", "serde_bytes", @@ -5957,7 +5957,7 @@ dependencies = [ "prost 0.13.3", "rand 0.8.5", "rand_chacha 0.3.1", - "rustls 0.23.15", + "rustls 0.23.16", "serde", "serde_cbor", "tokio", @@ -6279,7 +6279,7 @@ dependencies = [ "quote", "serde", "serde_tokenstream 0.2.2", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -6293,7 +6293,7 @@ dependencies = [ "quote", "serde", "serde_tokenstream 0.2.2", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -6833,7 +6833,7 @@ dependencies = [ "rand 0.8.5", "rand_chacha 0.3.1", "rsa", - "rustls 0.23.15", + "rustls 0.23.16", "serde", "sha2 0.10.8", "simple_asn1", @@ -7587,7 +7587,7 @@ dependencies = [ "ic-types-test-utils", "rand 0.8.5", "rand_chacha 0.3.1", - "rustls 0.23.15", + "rustls 0.23.16", "tempfile", "tokio", ] @@ -7787,7 +7787,7 @@ dependencies = [ "ic-types", "pkcs8", "rand 0.8.5", - "rustls 0.23.15", + "rustls 0.23.16", "signature", "time", "tokio", @@ -7823,7 +7823,7 @@ dependencies = [ "ic-types", "json5", "maplit", - "rustls 0.23.15", + "rustls 0.23.16", "serde", "thiserror", "x509-parser", @@ -7836,7 +7836,7 @@ dependencies = [ "ic-base-types", "ic-crypto-tls-interfaces", "mockall 0.13.0", - "rustls 0.23.15", + "rustls 0.23.16", ] [[package]] @@ -8347,7 +8347,7 @@ dependencies = [ "rand 0.8.5", "reqwest 0.12.8", "rstest", - "rustls 0.23.15", + "rustls 0.23.16", "serde", "serde_bytes", "serde_cbor", @@ -8467,7 +8467,7 @@ dependencies = [ "prometheus", "rand 0.8.5", "rstest", - "rustls 0.23.15", + "rustls 0.23.16", "rustls-pemfile 2.2.0", "serde", "serde_json", @@ -10593,7 +10593,7 @@ dependencies = [ "quinn", "quinn-udp", "rcgen", - "rustls 0.23.15", + "rustls 0.23.16", "serde", "slog", "tempfile", @@ -10756,7 +10756,7 @@ dependencies = [ "prost 0.13.3", "quinn", "rstest", - "rustls 0.23.15", + "rustls 0.23.16", "slog", "socket2 0.5.7", "thiserror", @@ -13991,7 +13991,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -14199,9 +14199,9 @@ dependencies = [ [[package]] name = "insta" -version = "1.40.0" +version = "1.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6593a41c7a73841868772495db7dc1e8ecab43bb5c0b6da2059246c4b506ab60" +checksum = "a1f72d3e19488cf7d8ea52d2fc0f8754fc933398b337cd3cbdb28aaeb35159ef" dependencies = [ "console 0.15.8", "lazy_static", @@ -14220,12 +14220,12 @@ dependencies = [ [[package]] name = "instant-acme" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71bc444149bab1b339ba7e92e81d7615227feba7fd635b8551a3a170021598d0" +checksum = "37221e690dcc5d0ea7c1f70decda6ae3495e72e8af06bca15e982193ffdf4fc4" dependencies = [ "async-trait", - "base64 0.21.7", + "base64 0.22.1", "bytes", "http 1.1.0", "http-body 1.0.1", @@ -14492,7 +14492,7 @@ dependencies = [ "k8s-openapi", "kube-core", "pem 3.0.4", - "rustls 0.23.15", + "rustls 0.23.16", "rustls-pemfile 2.2.0", "secrecy", "serde", @@ -14792,9 +14792,9 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.8" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +checksum = "a00419de735aac21d53b0de5ce2c03bd3627277cf471300f27ebc89f7d828047" [[package]] name = "libnss" @@ -15019,7 +15019,7 @@ dependencies = [ "proc-macro2", "quote", "regex-syntax 0.6.29", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -15406,7 +15406,7 @@ dependencies = [ "cfg-if 1.0.0", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -15418,7 +15418,7 @@ dependencies = [ "cfg-if 1.0.0", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -15917,7 +15917,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -16549,7 +16549,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -16653,7 +16653,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -16682,29 +16682,29 @@ checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" [[package]] name = "pin-project" -version = "1.1.6" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf123a161dde1e524adf36f90bc5d8d3462824a9c43553ad07a8183161189ec" +checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.6" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4502d8515ca9f32f1fb543d987f63d95a14934883db45bdb48060b6b69257f8" +checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -17098,12 +17098,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.24" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "910d41a655dac3b764f1ade94821093d3610248694320cd072303a8eedcf221d" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" dependencies = [ "proc-macro2", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -17282,7 +17282,7 @@ checksum = "6ff7ff745a347b87471d859a377a9a404361e7efc2a971d73424a6d183c0fc77" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -17322,7 +17322,7 @@ dependencies = [ "prost 0.12.6", "prost-types 0.12.6", "regex", - "syn 2.0.82", + "syn 2.0.85", "tempfile", ] @@ -17343,7 +17343,7 @@ dependencies = [ "prost 0.13.3", "prost-types 0.13.3", "regex", - "syn 2.0.82", + "syn 2.0.85", "tempfile", ] @@ -17357,7 +17357,7 @@ dependencies = [ "itertools 0.12.1", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -17370,7 +17370,7 @@ dependencies = [ "itertools 0.13.0", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -17505,7 +17505,7 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash 2.0.0", - "rustls 0.23.15", + "rustls 0.23.16", "socket2 0.5.7", "thiserror", "tokio", @@ -17522,7 +17522,7 @@ dependencies = [ "rand 0.8.5", "ring 0.17.8", "rustc-hash 2.0.0", - "rustls 0.23.15", + "rustls 0.23.16", "slab", "thiserror", "tinyvec", @@ -17847,9 +17847,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -18082,7 +18082,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.15", + "rustls 0.23.16", "rustls-native-certs 0.8.0", "rustls-pemfile 2.2.0", "rustls-pki-types", @@ -18337,7 +18337,7 @@ dependencies = [ "regex", "relative-path", "rustc_version", - "syn 2.0.82", + "syn 2.0.85", "unicode-ident", ] @@ -18460,9 +18460,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.37" +version = "0.38.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +checksum = "aa260229e6538e52293eeb577aabd09945a09d6d9cc0fc550ed7529056c2e32a" dependencies = [ "bitflags 2.6.0", "errno 0.3.9", @@ -18499,9 +18499,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.15" +version = "0.23.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fbb44d7acc4e873d613422379f69f237a1b141928c02f6bc6ccfddddc2d7993" +checksum = "eee87ff5d9b36712a58574e12e9f0ea80f915a5b0ac518d322b24a465617925e" dependencies = [ "brotli 7.0.0", "brotli-decompressor", @@ -18646,9 +18646,9 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.11.4" +version = "2.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22760a375f81a31817aeaf6f5081e9ccb7ffd7f2da1809a6e3fc82b6656f10d5" +checksum = "1aa7ffc1c0ef49b0452c6e2986abf2b07743320641ffd5fc63d552458e3b779b" dependencies = [ "cfg-if 1.0.0", "derive_more 1.0.0", @@ -18658,14 +18658,14 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.11.4" +version = "2.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abc61ebe25a5c410c0e245028fc9934bf8fa4817199ef5a24a68092edfd34614" +checksum = "46385cc24172cf615450267463f937c10072516359b3ff1cb24228a4a08bf951" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.85", ] [[package]] @@ -18699,7 +18699,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -18972,7 +18972,7 @@ checksum = "7e85ad2009c50b58e87caa8cd6dac16bdf511bbfb7af6c33df902396aa480fa5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -18983,7 +18983,7 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -19039,7 +19039,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -19062,7 +19062,7 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -19124,7 +19124,7 @@ dependencies = [ "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -19666,7 +19666,7 @@ dependencies = [ "proc-macro2", "quote", "structmeta-derive 0.2.0", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -19678,7 +19678,7 @@ dependencies = [ "proc-macro2", "quote", "structmeta-derive 0.3.0", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -19689,7 +19689,7 @@ checksum = "a60bcaff7397072dca0017d1db428e30d5002e00b6847703e2e42005c95fbe00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -19700,7 +19700,7 @@ checksum = "152a0b65a590ff6c3da95cabe2353ee04e6167c896b28e3b14478c2636c922fc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -19722,7 +19722,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -19783,9 +19783,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.82" +version = "2.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83540f837a8afc019423a8edb95b52a8effe46957ee402287f4292fae35be021" +checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56" dependencies = [ "proc-macro2", "quote", @@ -19801,7 +19801,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -19849,7 +19849,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -20060,7 +20060,7 @@ dependencies = [ "proc-macro2", "quote", "structmeta 0.2.0", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -20072,7 +20072,7 @@ dependencies = [ "proc-macro2", "quote", "structmeta 0.3.0", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -20317,7 +20317,7 @@ checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -20492,7 +20492,7 @@ checksum = "8d9ef545650e79f30233c0003bcc2504d7efac6dad25fca40744de773fe2049c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -20531,7 +20531,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -20573,7 +20573,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.23.15", + "rustls 0.23.16", "rustls-pki-types", "tokio", ] @@ -20717,7 +20717,7 @@ dependencies = [ "prost-build 0.13.3", "prost-types 0.13.3", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -20868,7 +20868,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -21479,7 +21479,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", "wasm-bindgen-shared", ] @@ -21513,7 +21513,7 @@ checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -21555,9 +21555,9 @@ dependencies = [ [[package]] name = "wasm-streams" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e072d4e72f700fb3443d8fe94a39315df013eef1104903cdb0a2abd322bbecd" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" dependencies = [ "futures-util", "js-sys", @@ -21674,7 +21674,7 @@ dependencies = [ "anyhow", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", "wasmtime-component-util", "wasmtime-wit-bindgen", "wit-parser", @@ -21774,7 +21774,7 @@ checksum = "a4b0c1f76891f778db9602ee3fbb4eb7e9a3f511847d1fb1b69eddbcea28303c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -22323,7 +22323,7 @@ checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", "synstructure", ] @@ -22345,7 +22345,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -22365,7 +22365,7 @@ checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", "synstructure", ] @@ -22386,7 +22386,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -22408,7 +22408,7 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] From e124950ae703a254bcfdcc253d289ea3afac010e Mon Sep 17 00:00:00 2001 From: Daniel Sharifi Date: Mon, 28 Oct 2024 15:29:04 +0000 Subject: [PATCH 3/6] fix error message expectation --- rs/https_outcalls/adapter/tests/server_test.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/rs/https_outcalls/adapter/tests/server_test.rs b/rs/https_outcalls/adapter/tests/server_test.rs index 9dc09504791..b5e2b8ad066 100644 --- a/rs/https_outcalls/adapter/tests/server_test.rs +++ b/rs/https_outcalls/adapter/tests/server_test.rs @@ -402,10 +402,18 @@ MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgob29X4H4m2XOkSZE response.as_ref().unwrap_err().code(), tonic::Code::Unavailable ); - assert!(response - .unwrap_err() - .message() - .contains(&"client error (Connect)".to_string())); + + let response_error = response.unwrap_err(); + let actual_error_message = response_error.message(); + + let expected_error_message = "Error(Connect, ConnectError(\"tcp connect error\", Custom { kind: TimedOut, error: Elapsed(()) }))"; + + assert!( + actual_error_message.contains(expected_error_message), + "Expected error message to contain, {}, got: {}", + expected_error_message, + actual_error_message + ); } #[tokio::test] From 1640dd052a42d59f650bac0fc2bbd08c6dffcacf Mon Sep 17 00:00:00 2001 From: Daniel Sharifi Date: Mon, 28 Oct 2024 15:35:27 +0000 Subject: [PATCH 4/6] fix http correctness expectation --- rs/tests/networking/canister_http_correctness_test.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/rs/tests/networking/canister_http_correctness_test.rs b/rs/tests/networking/canister_http_correctness_test.rs index f706ba9b125..c60afe71a44 100644 --- a/rs/tests/networking/canister_http_correctness_test.rs +++ b/rs/tests/networking/canister_http_correctness_test.rs @@ -608,12 +608,15 @@ pub fn test_http_calls_to_ic_fails(env: TestEnv) { }, )); + let expected_error_message = "Error(Connect, ConnectError(\"tcp connect error\", Custom { kind: TimedOut, error: Elapsed(()) }))"; let err_response = response.clone().unwrap_err(); assert_matches!(err_response.0, RejectionCode::SysTransient); + assert!( - err_response.1.contains("client error (Connect)"), - "Response did not container client error: {}", - err_response.1 + err_response.1.contains(expected_error_message), + "Expected error message to contain, {}, got: {}", + expected_error_message, + actual_error_message ); } From 900c5e5ba0d139dd628c9de4302233d29aa18b26 Mon Sep 17 00:00:00 2001 From: Daniel Sharifi Date: Mon, 28 Oct 2024 15:36:57 +0000 Subject: [PATCH 5/6] . --- rs/tests/networking/canister_http_correctness_test.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rs/tests/networking/canister_http_correctness_test.rs b/rs/tests/networking/canister_http_correctness_test.rs index c60afe71a44..3227ae14f5a 100644 --- a/rs/tests/networking/canister_http_correctness_test.rs +++ b/rs/tests/networking/canister_http_correctness_test.rs @@ -616,7 +616,7 @@ pub fn test_http_calls_to_ic_fails(env: TestEnv) { err_response.1.contains(expected_error_message), "Expected error message to contain, {}, got: {}", expected_error_message, - actual_error_message + err_response.1 ); } From c20bda65a89e494f240f5bd52a9f5fdcd96e17b4 Mon Sep 17 00:00:00 2001 From: Daniel Sharifi Date: Mon, 28 Oct 2024 15:42:07 +0000 Subject: [PATCH 6/6] . --- rs/tests/networking/canister_http_correctness_test.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rs/tests/networking/canister_http_correctness_test.rs b/rs/tests/networking/canister_http_correctness_test.rs index 3227ae14f5a..b8efdabcdf0 100644 --- a/rs/tests/networking/canister_http_correctness_test.rs +++ b/rs/tests/networking/canister_http_correctness_test.rs @@ -608,7 +608,7 @@ pub fn test_http_calls_to_ic_fails(env: TestEnv) { }, )); - let expected_error_message = "Error(Connect, ConnectError(\"tcp connect error\", Custom { kind: TimedOut, error: Elapsed(()) }))"; + let expected_error_message = "Error(Connect, ConnectError(\"tcp connect error\", Os { code: 111, kind: ConnectionRefused, message: \"Connection refused\" }))"; let err_response = response.clone().unwrap_err(); assert_matches!(err_response.0, RejectionCode::SysTransient);