Skip to content
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

Open
rcoh opened this issue Jul 19, 2021 · 2 comments
Open

1.5.0 changes random values with seeds #20

rcoh opened this issue Jul 19, 2021 · 2 comments

Comments

@rcoh
Copy link

rcoh commented Jul 19, 2021

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?

@jbr
Copy link

jbr commented Jul 20, 2021

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.

jbr added a commit to trillium-rs/trillium that referenced this issue Jul 20, 2021
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
@taiki-e
Copy link
Collaborator

taiki-e commented Jul 20, 2021

Sorry for the breakage!

As for this topic, I tend to follow rand's docs.

Any “value-breaking” changes to the generator should require bumping at least the minor version and documentation of the change.

https://docs.rs/rand/0.8.4/rand/trait.SeedableRng.html#tymethod.from_seed

github-merge-queue bot pushed a commit to smithy-lang/smithy-rs that referenced this issue Apr 29, 2024
## 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._
ogghead pushed a commit to ogghead/smithy-rs that referenced this issue May 5, 2024
)

## 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._
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants