-
-
Notifications
You must be signed in to change notification settings - Fork 729
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
Adds rspec.config randomize spec order #8461
base: master
Are you sure you want to change the base?
Adds rspec.config randomize spec order #8461
Conversation
Yay, you found a random test failure this way! The error message looks familiar. Last time, the problem was that a spec set up Stripe and part of that setup leaked into other specs which then failed to load Stripe code. Here was the solution: #8361 |
I have to say, I'm not sure this approach is working. The build fails consistently, with different seeds. I don't think this is usable in master right now, there must be some fine tuning around settings, not sure. For documentations sake, adding below an attempt to debug one of the failures locally, using bisect, with:
|
Yikes. That demonstrates that we have a lot of order dependent failures which need sorting out. I agree that we can't merge this yet. We need to fix all the failures first. And that could take a while because we will discover them randomly. Or is there a way to bisect the whole test suite with all possible seeds? Maybe something to run on CI... You could generate a lot of commits with different seeds and push them on separate branches so that CI shows you which ones fail. |
0b593b9
to
5f16a84
Compare
6002333
to
6339865
Compare
The randomization of specs seems to play a role in pass rate, when the build runs may parallel jobs - like we're currently attempting to make use of out current plan GH-Actions (max. 60 parallel jobs). So I felt it is the right time to revive this previous PR. |
Hum, interesting results:
(+ a flaky spec on bulk order managenent) |
Yes, the randomisation can help discover more flaky specs. But we should probably try to stabilise the current build before we probe for more flakiness. |
What? Why?
Sometimes specs fail because they are ran in a specific order. This PR adds a randomization config to Rspec, which also outputs which seed was used - this was found here. This can be useful in reproducing the error locally with the
bisect
option.Adds a randomization config to Rspec
What should we test?
Green build.
After each build is complete a line stating which seed was used for the build should appear as an output, something like this:
Randomized with seed 61761
Release notes
Changelog Category: Technical changes
Dependencies
Documentation updates