-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.5.0 changes random values with seeds #20
Comments
I came here to post exactly this, including the "I'm not sure if I should be relying on this being stable" but it broke my tests on CI but not locally and was very confusing. |
the issue wasn't actually some sort of os-based or multithreading issue, but that fastrand changed the random generation behavior on a post 1.0 semver-minor release, so CI updated to a version I was not using locally. smol-rs/fastrand#20
Sorry for the breakage! As for this topic, I tend to follow rand's docs.
https://docs.rs/rand/0.8.4/rand/trait.SeedableRng.html#tymethod.from_seed |
## 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._
) ## 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._
I'm not sure if this is considered a breaking change, but all my tests started failing because my seeded generators started returning different values. I suspect this will also impact a lot of other folks.
What do you think about yanking 1.5 and releasing 2.0 instead with the new algorithm?
The text was updated successfully, but these errors were encountered: