Skip to content

Commit 2c5e37e

Browse files
authored
Allow only patch-level bumps for fastrand in testing (#3612)
## Motivation and Context Pins major and minor versions for `fastrand` during testing in `aws-smithy-runtime` ## Description `aws-smithy-runtime` uses the `fastrand` crate in a waiters' [unit test](https://github.com/smithy-lang/smithy-rs/blob/eac52eb69c89d78c1844e9e2b0f0c3413031fc58/rust-runtime/aws-smithy-runtime/src/client/waiters/backoff.rs#L137). Two days ago, `fastrand` of version 2.1.0 got released (previously 2.0.2). According to [this PR](smol-rs/fastrand#20), a minor version bump can cause seed-value-breaking changes. This PR will only allow patch-level bumps for `fastrand` in `[dev-dependencies]`. ## Testing Relies on testing in CI (since CI in the main branch currently fails, if CI passes in this PR we're good). ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
1 parent eac52eb commit 2c5e37e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

rust-runtime/aws-smithy-runtime/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ aws-smithy-protocol-test = { path = "../aws-smithy-protocol-test", optional = tr
2727
aws-smithy-runtime-api = { path = "../aws-smithy-runtime-api" }
2828
aws-smithy-types = { path = "../aws-smithy-types", features = ["http-body-0-4-x"] }
2929
bytes = "1"
30+
# Make sure to update `fastrand` in [dev-dependencies] if we bump the major version
31+
# We probably need to update unit tests using the `fastrand` crate when that happens
3032
fastrand = "2.0.0"
3133
h2 = { version = "0.3", default-features = false, optional = true }
3234
http = { version = "0.2.8" }
@@ -50,6 +52,9 @@ approx = "0.5.1"
5052
aws-smithy-async = { path = "../aws-smithy-async", features = ["rt-tokio", "test-util"] }
5153
aws-smithy-runtime-api = { path = "../aws-smithy-runtime-api", features = ["test-util"] }
5254
aws-smithy-types = { path = "../aws-smithy-types", features = ["test-util"] }
55+
# Allow only patch-level bumps since major-level or minor-level bumps can cause seed-value-breaking changes
56+
# https://github.com/smol-rs/fastrand/issues/20
57+
fastrand = "~2.0.0"
5358
futures-util = "0.3.29"
5459
pretty_assertions = "1.4.0"
5560
tokio = { version = "1.25", features = ["macros", "rt", "rt-multi-thread", "test-util", "full"] }

0 commit comments

Comments
 (0)