-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Parallel cypress test run failures now much more often #24514
Comments
I've run into this issue before. Your failures are caused by this change: actions/runner-images@0c8b93e GitHub periodically updates Chrome to the latest version on their action runners. The runners aren't all updated at the same time. They are upgraded over a period of a few days. You can't control which action runner versions your workflow uses. If you're running Cypress tests in parallel on multiple runners during such an upgrade phase, you can end up with different runners using different Chrome versions. This is the error you get when that happens. However, when Cypress fails like this, the tests simply do not get run on that runner. What happens instead is that they remain in the queue and end up being picked up later by another runner. That's why your dashboard is still green. |
I see! That's very good to know. Thank you kindly @gofr. |
This seems to be an outside issue causing your problems. I am going to close this issue. If new information comes to light that suggests something on the Cypress end feel free to comment on this issue and we can reopen. |
Is there a way to force a specific version of Chrome to be run? I think this is a very hard issue for cypress users to debug as is. I googled for a while before finding this thread. |
Some additional debug in case anyone hits this issue in the future. As @gofr mentioned the Github hosted runners apparently do not get updated at the same time. I hit the failed parallelization error logged here and it took me a lot of digging and logging support requests to figure out why. My setup:
In my case all of my runners are definitely using the same browser version as we're literally installing the latest and there's plenty of debug for that workflow step to confirm that.
However, while the runners are all using the same reported version of Linux the runner versions are definitely not the same. It's super hard to miss, and the Cypress debug does not current provide enough detail to figure this out on your own. Runner that failed to execute Cypress parallelized:
Runner that could successfully execute Cypress parallelized.
Looking into the runners more: Runner that failed to execute Cypress parallelized:
Runner that could successfully execute Cypress parallelized.
Note the runner images are different: Eventually the parallelization failure stoped on its own. As best I can tell it was fixed once all of the runners started using the same Runner Image |
@cgraham-rs You may definitely be installing the latest version of Chromium (109 there), but are you sure Cypress is actually using it? Because your Cypress logs still show your tests using Chrome 106 and 107. Don't you need to specify your browser to be One way of working around this problem is to not let your CI depend on the results of your individual parallel runners. Aggregate the results of the parallel runners in a separate step and pass/fail based on that. Individual runners can still fail, but Cypress will eventually run all your tests. At worst, you end up in a situation where the first runner that started is the only runner on the old/new Chrome and it ends up having to run all your tests because none of the other runner environments match. |
@gofr Thank you for QA'ing my workflow. 🥇 Off to fix stuff... |
Current behavior
We have configured our cypress/react tests setup to run parallel in github actions across 6 different machines.
Just recently (after upgrading to 10.10.0) - we are now often seeing our test runs in cicd fail with the following response (> 50% of the time):
Until 10.10 - all of these tests were passing 100% in parallel in cicd. We are also seeing the same thing happen in 10.11.0
Meanwhile, we if view this above cicd test run in cypress dashboard, all tests are shown as passing! 🤪
Desired behavior
All tests should run and pass if they are valid, in parallel in cicd
Test code to reproduce
n/a
Cypress Version
10.11.0
Node version
16.18.0
Operating System
"ubuntu-latest"
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered: