-
-
Notifications
You must be signed in to change notification settings - Fork 541
Closed
Labels
bug:minordoes not affect many people or has no big impactdoes not affect many people or has no big impacthelp:wantedIssues that have been acknowledged, a solution determined and a PR might likely be accepted.Issues that have been acknowledged, a solution determined and a PR might likely be accepted.
Description
Issue
Can not set number of worker processes for tox run-parallel command via --parallel option or TOX_PARALLEL environment variable if spinner is disabled via --parallel-no-spinner option or CI environment variable. Numeric value of --parallel option gets ignored and maximum number of workers is always used (which is probably equal to number of CPU cores). The issue results in OOM (out-of-memory) on build agents using run-parallel with CI environment variable set.
Environment
Tox 4.11.4 works as expected. Newer versions exhibit the issue. Git blame points to 7bbf89e#diff-40a5f9d4fad958c6e6fb3bd9cf117200f0b4a8a23284e850b38a80477f3b2d9dR86
Output of running tox
Actual behaviour (run-parallel in 2 jobs):
$ tox run-parallel --parallel 2 --parallel-no-spinner -x 'tox.envlist=job-{a,b,c,d,e}'
job-e: OK ✔ in 10.14 seconds
job-b: OK ✔ in 10.15 seconds
job-c: OK ✔ in 10.15 seconds
job-d: OK ✔ in 10.15 seconds
job-a: OK (10.15=setup[0.10]+cmd[10.03,0.02] seconds)
job-b: OK (10.15=setup[0.10]+cmd[10.03,0.02] seconds)
job-c: OK (10.15=setup[0.10]+cmd[10.04,0.02] seconds)
job-d: OK (10.15=setup[0.10]+cmd[10.03,0.02] seconds)
job-e: OK (10.14=setup[0.10]+cmd[10.02,0.02] seconds)
congratulations :) (10.22 seconds)Expected behavoiur:
$ tox run-parallel --parallel 2 --parallel-no-spinner -x 'tox.envlist=job-{a,b,c,d,e}'
job-b: OK ✔ in 10.09 seconds
job-a: OK ✔ in 10.1 seconds
job-c: OK ✔ in 10.06 seconds
job-d: OK ✔ in 10.06 seconds
job-a: OK (10.10=setup[0.06]+cmd[10.03,0.02] seconds)
job-b: OK (10.09=setup[0.06]+cmd[10.02,0.02] seconds)
job-c: OK (10.06=setup[0.02]+cmd[10.03,0.02] seconds)
job-d: OK (10.06=setup[0.02]+cmd[10.03,0.02] seconds)
job-e: OK (10.06=setup[0.01]+cmd[10.03,0.02] seconds)
congratulations :) (30.28 seconds)i.e. execution should took around 30 seconds, not 10.
Minimal example
[tox]
[testenv]
commands =
job: python -c 'import time;time.sleep(10)'
a,b,c,d,e: python -c 'print("ok")'Metadata
Metadata
Assignees
Labels
bug:minordoes not affect many people or has no big impactdoes not affect many people or has no big impacthelp:wantedIssues that have been acknowledged, a solution determined and a PR might likely be accepted.Issues that have been acknowledged, a solution determined and a PR might likely be accepted.
