-
-
Notifications
You must be signed in to change notification settings - Fork 766
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
--bisect failed due to inconsistent ordering after 6 rounds #2696
Comments
Seems similar to #2489, can you please check if it's not a duplicate? |
I don't think it is - OP in that issue did use random ordering, and it failed in round 1. We don't, and it went quite a few rounds before failing. |
What ordering are you using? The bisect relies on consistent ordering and the check is quite basic, it just checks that the bisects sub ordering is the same as it was when it was first run. |
We didn't configure any ordering, and none of the tests have any ordering specified, so it defaults to defined. The only thing I'm confused by is why it went multiple rounds before it picked up on inconsistent ordering, as if the ordering was unstable it should've been caught in any of the six preceding rounds. |
What OS / filesystem are you using? What filters if any are you applying? You haven't provided any steps to reproduce this so its a bit hard to determine what is interacting with the ordering here. Check that you don't have a The number of steps is irrelevant, the bisector is essentially creating a new spec run each time with a subset of specs, so they are loaded again and rerun, what the bisector does to check the ordering is use the full set of example ids and intersect them with this specific runs ordering, then compares it back to the runs ordering. E.g. Edit: this is an oversimplified example, and isn't actually executable, but the gist remains the same. So the ordering is changing, we just need to figure out why. |
I'm on macOS Mojave. I've checked my .rspec and spec_helper files, and there's no ordering defined in the .rspec and the |
Are you comfortable monkey patching? The easiest way would be to apply this patch to see why the output is changing:
|
If you put that in a file in your directory and require it in your spec_helper it should run with the bisector and output the ordering. |
Thanks - I just got off work, so I'll apply it on Monday and get back with the results. |
Due to deadlines I fixed the order-dependent failure manually, but I took a backup copy of the codebase before I fixed it, so I'll run the monkey patched bisect when I have some time and put the results here. |
CC @JonRowe It seems there is a bug in how bisect groups examples that are spread across different files. Here is a branch on my fork of There I added some specs as a showcase for the bug. When I call bisect with correct specs in front it finishes correctly and finds the reproduction command:
But when I call bisect with the order dependent spec in the beginning it fails with the "order inconsistent" erro:
|
The irony here is that rspec bisect seems to fail because of the order dependency bug |
Do those specs fail when you run it without |
This command
does fail, yes.
|
It seems that bisect only reliably works when you put the failing spec at the very end of the command line (no matter how many files you add before). But if there are some specs after the failing one - then it's a lottery. |
Subject of the issue
Hey. I found an ordering based test issue and promptly started a bisect. We don't use random ordering, so I didn't run with --seed.
Your environment
Expected behavior
Since the ordering is constant, it shouldn't fail in the first place, but even if it does, it should've failed much earlier.
Actual behavior
Here's the output:
The text was updated successfully, but these errors were encountered: