From 58b6d1b2d781a7f21cf8d0798597d8ab44be02f2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 23 Apr 2026 01:28:30 +0000 Subject: [PATCH 1/2] Bump rand from 0.8.5 to 0.8.6 Bumps [rand](https://github.com/rust-random/rand) from 0.8.5 to 0.8.6. - [Release notes](https://github.com/rust-random/rand/releases) - [Changelog](https://github.com/rust-random/rand/blob/0.8.6/CHANGELOG.md) - [Commits](https://github.com/rust-random/rand/compare/0.8.5...0.8.6) --- updated-dependencies: - dependency-name: rand dependency-version: 0.8.6 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3953ab0..9249bb0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1528,9 +1528,9 @@ checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" [[package]] name = "rand" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" dependencies = [ "libc", "rand_chacha", From b64fd90af907fccc2c5f8f20fe230781b1bc2c94 Mon Sep 17 00:00:00 2001 From: Adam Petro Date: Fri, 24 Apr 2026 16:05:06 -0400 Subject: [PATCH 2/2] Update expected fuel in tests --- dev.yml | 2 ++ integration_tests/tests/integration_test.rs | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/dev.yml b/dev.yml index 34975ca..d018a63 100644 --- a/dev.yml +++ b/dev.yml @@ -2,6 +2,8 @@ name: shopify-function-wasm-api type: rust +nix: true + up: - rust - custom: diff --git a/integration_tests/tests/integration_test.rs b/integration_tests/tests/integration_test.rs index 0153b36..401ff53 100644 --- a/integration_tests/tests/integration_test.rs +++ b/integration_tests/tests/integration_test.rs @@ -330,7 +330,7 @@ fn test_fuel_consumption_within_threshold() -> Result<()> { let (_, _, wasm_api_fuel) = run_example("cart-checkout-validation-wasm-api", wasm_api_input)?; eprintln!("WASM API fuel: {}", wasm_api_fuel); // Using a target fuel value as reference similar to the Javy example - assert_fuel_consumed_within_threshold(10561, wasm_api_fuel); + assert_fuel_consumed_within_threshold(9637, wasm_api_fuel); Ok(()) } @@ -345,7 +345,7 @@ fn test_benchmark_with_input() -> Result<()> { let wasm_api_input = prepare_wasm_api_input(input.clone())?; let (_, _, wasm_api_fuel) = run_example("cart-checkout-validation-wasm-api", wasm_api_input)?; - assert_fuel_consumed_within_threshold(10_561, wasm_api_fuel); + assert_fuel_consumed_within_threshold(9_637, wasm_api_fuel); Ok(()) } @@ -361,7 +361,7 @@ fn test_benchmark_with_input_early_exit() -> Result<()> { let wasm_api_input = prepare_wasm_api_input(input.clone())?; let (_, _, wasm_api_fuel) = run_example("cart-checkout-validation-wasm-api", wasm_api_input)?; - assert_fuel_consumed_within_threshold(9_738, wasm_api_fuel); + assert_fuel_consumed_within_threshold(9_017, wasm_api_fuel); Ok(()) } @@ -386,17 +386,17 @@ fn test_log_len() -> Result<()> { Ok(run_example("log-len", prepare_wasm_api_input(serde_json::json!(len))?)?.2) }; let fuel = run(1)?; - assert_fuel_consumed_within_threshold(777, fuel); + assert_fuel_consumed_within_threshold(744, fuel); let fuel = run(500)?; - assert_fuel_consumed_within_threshold(2_883, fuel); + assert_fuel_consumed_within_threshold(2_750, fuel); let fuel = run(1_000)?; - assert_fuel_consumed_within_threshold(4_608, fuel); + assert_fuel_consumed_within_threshold(4_375, fuel); let fuel = run(5_000)?; - assert_fuel_consumed_within_threshold(18_444, fuel); + assert_fuel_consumed_within_threshold(17_411, fuel); let fuel = run(10_000)?; - assert_fuel_consumed_within_threshold(35_739, fuel); + assert_fuel_consumed_within_threshold(33_706, fuel); let fuel = run(100_000)?; - assert_fuel_consumed_within_threshold(352_498, fuel); + assert_fuel_consumed_within_threshold(327_055, fuel); Ok(()) } @@ -407,7 +407,7 @@ fn test_log_past_capacity() -> Result<()> { .map_err(|e| anyhow::anyhow!("Failed to prepare example: {e}"))?; let (_, logs, fuel) = run_example("log-past-capacity", vec![])?; assert_eq!(logs, format!("{}{}", "a".repeat(991), "b".repeat(10))); - assert_fuel_consumed_within_threshold(964, fuel); + assert_fuel_consumed_within_threshold(928, fuel); Ok(()) }