Open micric opened 1 year ago
its unclear if this is related to execnet or xdist itself, a test with multiple python, pytest , xdist and execnet versions seems necessary
This is really hard to pin down, unfortunately... you were using pytest-3.10? That's pretty old.
When upgrading, did you upgrade other libraries that might be causing this?
Things from the top of my head that might be affecting collection: recursive symlinks (we had fixes in pytest for that, might be a corner case causing a problem), new version of libraries doing stuff at importing time...
We cannot really guess much, as the pytest version upgrade has a huge gap. I suggest running some logging/profiling to see if something suspicious appears.
Yes, the pytest version we were using was really old, unfortunately. Other packages were upgraded as well, I will check if any of them in particular caused the slowdown. Thank you for the advices. Do you have any particular suggestion do collect logs during collection?
Sure, good luck.
Do you have any particular suggestion do collect logs during collection?
There's a bunch of Python profilers around that can be used. but I don't have one off the top of my head to recommend.
It's possible /think able that the execnet worker startup got a slowdown recently, unfortunately I'm unable to investigate within the next 6-12 months
it would be useful to benchmark test collection times (--co) alone (sans xdist or any plugins) on old env and new env just to sanity check where the issue is. independently, I've had some success moving data directories out of test collection, cause pytest itself started looking at all files due to the need for plugins to load from non python files.
Execnet currently lacks apis to do this nicely
Hello, I'm upgrading from Python 3.8 to Python 3.10. In my previous configuration, this was the pytest set up:
It's a test suite with several thousands of tests. Using -n auto, everything was working fine on 32 workers.
Because of the upgrade, I had to upgrade also pytest and pytest-xdist. I tested a few versions, but I get the same problem with all of them. The current set-up:
What happens is that between the pytest call and the start session message there is a gap of several minutes. Here's a list of minutes depending on the number of workers 1: 3:25 2: 5:48 3: 16:52 4: 17:27 8: 57:39
An example of the log:
(8 is the number of workers, it's written by the same script that runs pytest right before it, like
With the old version, there was absolutely no time gap, while now it takes almost an hour just to start
Any insight of what might be the problem?