cockroachdb / cockroachdb/cockroach
roachtest/workload: use uint seeds
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
Roachtests typically use a in64 seed set[ here ](https://github.com/msbutler/cockroach/blob/butler-deflake-br-roundtrip/pkg/util/randutil/rand.go#L73), but workload can only [take](https://github.com/msbutler/cockroach/blob/butler-deflake-br-roundtrip/pkg/workload/random.go#L64) a uint seed. It would be nice if we used positive seeds everywhere in testing. I realize a simple workaround is to generate a random positive int to pass as a seed to the workload command, like in this [pr](https://github.com/cockroachdb/cockroach/pull/154154).
Jira issue: CRDB-54764
Contributor guide
Research direction
Start with pkg/util/randutil/rand.go around the seed definition and pkg/workload/random.go around workload seed handling. Compare the workaround in PR 154154, then trace roachtest and workload seed call sites to make seed types consistent; done means testing uses positive seeds without requiring ad hoc conversion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- testing-qa
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100