changeset 6750:d0e2b0101bfc stable

ci: limit maximum number of open file on python2 On the clever cloud runner, the number of maximum open files is 1 073 741 816. Since python 2 implementation of `subprocess.Popen(…, close_fds=True)` is quite stupid¹, this becomes a significant problem there. Spawning a subprocess with `close_fds=True` take 9 minutes (nine!). Since each test runs in a subprocess, this makes running the test suite with Python 2 on the Clever Cloud runner impossible. To fix this, we simply limit the maximum number of open file descriptors when running with Python2. [1] https://bugs.python.org/issue35757
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 09 Apr 2024 19:25:32 +0200
parents 107c5af631a7
children 21b51b2bbf09
files .gitlab-ci.yml
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/.gitlab-ci.yml	Fri Mar 29 15:02:02 2024 -0300
+++ b/.gitlab-ci.yml	Tue Apr 09 19:25:32 2024 +0200
@@ -27,8 +27,8 @@
         - (cd tests; ls -1 test-check-*.t > /tmp/check-tests.txt)
     script:
         - *prepare_hg
-        - ("$PYTHON" --version)
-        - (cd tests; set -x; HGMODULEPOLICY="$TEST_HGMODULEPOLICY" "$PYTHON" /ci/repos/mercurial/tests/run-tests.py --color=always $RUNTEST_ARGS)
+        - ($PYTHON --version)
+        - (cd tests; set -x; HGMODULEPOLICY="$TEST_HGMODULEPOLICY" $PYTHON /ci/repos/mercurial/tests/run-tests.py --color=always $RUNTEST_ARGS)
 
 checks-py3:
     <<: *runtests
@@ -51,7 +51,7 @@
     <<: *runtests
     variables:
         PY: py2
-        PYTHON: python2
+        PYTHON: prlimit --nofile=1024:1024 python2
         RUNTEST_ARGS: "--no-rust --blacklist /tmp/check-tests.txt"
         TEST_HGMODULEPOLICY: "c"
         HG_BRANCH: 'max(tag("re:^6\.1"))'