Skip to content

Pytest 7.0 increases runtime significantly in Github Actions on Linux #9652

@DanielNoord

Description

@DanielNoord

Bug
I don't have much information as of yet so sorry for the bare report, but I thought others might be running into similar issues and I couldn't find an opened issue yet.
We got a dependabot PR on pylint to update to 7.0: pylint-dev/pylint#5778.
However, the tests keep getting canceled after they hit our 30 minutes cut-off point. This only happens on Linux with Python 3.8, 3.9 and 3.10. In the first try 3.10 did manage to pass in about 3 minutes, but on try 2 and 3 it is also taking more than 30 minutes. The PR doesn't really change anything other than the version number and test are passing on main for these environments.
Other environments take between 3-6 minutes to run the full test suite, so taking longer than 30 minutes seems to be a real regression.

I can't reproduce this locally (yet) on my Mac.

TDLR: pytest 7.0 makes a test suite that normally takes about 5 minutes take more than 30 minutes on Linux with Python 3.8, 3.9 and 3.10. This is not consistent, as 3.10 has passed once.

Let me know if I can provide any other information!

Pip list
Locally I have used the following pip list and test pass in the expected time.
Note this is on Mac OS 12.1.

alabaster                         0.7.12
appdirs                           1.4.4
appnope                           0.1.2
asgiref                           3.4.1
astor                             0.8.1
astroid                           2.10.0.dev0 /Users/daniel/DocumentenLaptop/Programming/Github/astroid
attrs                             21.2.0
Babel                             2.9.1
backcall                          0.2.0
backports.entry-points-selectable 1.1.0
black                             21.12b0
bottle                            0.12.19
bytecode                          0.12.0
CD                                1.1.0
certifi                           2021.5.30
cfgv                              3.3.0
charset-normalizer                2.0.4
cli-ui                            0.10.3
click                             8.0.1
colorama                          0.4.4
contextlib2                       21.6.0
coverage                          6.2
coveralls                         3.3.1
debugpy                           1.4.1
decorator                         5.0.9
deepdiff                          5.5.0
dill                              0.3.4
distlib                           0.3.2
Django                            3.2.7
dnspython                         2.1.0
docopt                            0.6.2
docutils                          0.17.1
entrypoints                       0.3
execnet                           1.9.0
fett                              0.3.2
filelock                          3.0.12
flake8                            4.0.1
flake8-typing-imports             1.12.0
flynt                             0.66
gitdb                             4.0.9
GitPython                         3.1.24
gprof2dot                         2021.2.21
graphviz                          0.17
identify                          2.2.11
idna                              3.2
imagesize                         1.3.0
iniconfig                         1.1.1
ipykernel                         6.3.1
ipython                           7.27.0
ipython-genutils                  0.2.0
isort                             5.10.1
jedi                              0.18.0
Jinja2                            3.0.3
jupyter-client                    7.0.2
jupyter-core                      4.7.1
lazy-object-proxy                 1.6.0
libcst                            0.3.20
MarkupSafe                        2.0.1
matplotlib-inline                 0.1.2
mccabe                            0.6.1
MonkeyType                        21.5.0
mypy                              0.931
mypy-extensions                   0.4.3
nest-asyncio                      1.5.1
networkx                          2.6.3
nodeenv                           1.6.0
numpy                             1.21.1
ordered-set                       4.0.2
packaging                         21.0
parso                             0.8.2
pathspec                          0.9.0
pexpect                           4.8.0
pickleshare                       0.7.5
Pillow                            9.0.0
pip                               21.2.3
platformdirs                      2.2.0
pluggy                            0.13.1
pre-commit                        2.16.0
prompt-toolkit                    3.0.20
ptyprocess                        0.7.0
py                                1.10.0
py-cpuinfo                        8.0.0
pyannotate                        1.2.0
pycodestyle                       2.8.0
pydocstringformatter              0.3.0+dev   /Users/daniel/DocumentenLaptop/Programming/Github/DanielNoord/docstringformatter
pyenchant                         3.2.2
pyflakes                          2.4.0
Pygments                          2.10.0
pylint                            2.13.0.dev0 /Users/daniel/DocumentenLaptop/Programming/Github/pylint
pymongo                           3.12.1
pyparsing                         2.4.7
pyprof2calltree                   1.4.5
pytest                            7.0.0
pytest-benchmark                  3.4.1
pytest-cov                        3.0.0
pytest-forked                     1.3.0
pytest-profiling                  1.7.0
pytest-xdist                      2.5.0
python-dateutil                   2.8.2
python-docs-theme                 2021.11.1
python-jsonrpc-server             0.3.4
pytz                              2021.3
pyupgrade                         2.23.3
PyYAML                            5.4.1
pyzmq                             22.2.1
regex                             2021.7.6
requests                          2.26.0
rstcheck                          3.3.1
schema                            0.7.4
setuptools                        60.5.0
six                               1.16.0
smmap                             5.0.0
snakeviz                          2.1.0
snooty-lextudio                   1.11.6
snowballstemmer                   2.2.0
Sphinx                            4.3.0
sphinxcontrib-applehelp           1.0.2
sphinxcontrib-devhelp             1.0.2
sphinxcontrib-htmlhelp            2.0.0
sphinxcontrib-jsmath              1.0.1
sphinxcontrib-qthelp              1.0.3
sphinxcontrib-serializinghtml     1.1.5
sqlparse                          0.4.2
tabulate                          0.8.9
tbump                             6.6.1
tokenize-rt                       4.1.0
toml                              0.10.2
tomli                             1.2.0
tomlkit                           0.7.2
tornado                           6.1
tox                               3.24.1
traitlets                         5.1.0
types-pkg-resources               0.1.3
types-toml                        0.10.1
typing-extensions                 3.10.0.0
typing-inspect                    0.7.1
ujson                             1.35
Unidecode                         1.2.0
urllib3                           1.26.6
virtualenv                        20.7.0
watchdog                          1.0.2
wcwidth                           0.2.5
wrapt                             1.12.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: performanceperformance or memory problem/improvement

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions