Repository navigation
ci: run the GraalPy leg's tier in shards so no worker outlives its heap (#1963) - #2012
Merged
Merged
Conversation
…ts heap (#1963) - util/pytest_shards.py: runs a pytest command once per shard, a directory or a glob of one directory's entries, then once over the rest; each run ignores what earlier shards took and starts fresh xdist workers, writes its own JUnit file, and no later run starts after SIGINT. Standard library only, on /usr/bin/python3. - experimental.yml `experimental` / `Run unit tests`: GraalPy's leg sets SHARDS and hands its pytest command to the script inside the one timeout, file-size cap, scope and watcher; 3.14t runs pytest once, as before. `Upload test timings` takes junit*.xml. - Pins follow the step; tests/project/test_graalpy_shards_1963.py runs the step and the script, and checks the shards partition the tier. - workflows.rst: the shard bullet and the Workflow Scripts row. Local GraalPy 25.4.4 at -n 3: whole tier 3559 s, 8 workers down, heap at the 2 GiB cap; sharded 1879 s, none down, largest heap 1303 MB.
Owner
Author
|
GOOD TO GO at
One residual risk: a SIGINT landing between two shards is honoured only after the next shard starts, so that shard would run until the SIGKILL. The window is tiny. |
Contributor
|
Coverage: 91.55% (unit tier, Python 3.15,
Per-file detail: the |
5 tasks done
This was referenced Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
ci— workflows or build toolingDescription of your pull request and other information
On
main's GraalPy leg (job 118912680486), nine workers went down. Each one's Java heap grew across tests until it reached the--vm.Xmx2gcap (#1753). This PR runs the leg's tier as a series of pytest invocations, each with fresh workers.The shard boundaries are chosen so that no shard's heap gets near the cap. A shard is a directory or a glob of one directory's entries, and every later run ignores what earlier runs took. A whole-directory split was not enough:
tests/corekitalone reached 2028 MB.Measured locally on GraalPy 25.4.4 (
-n 3, Xmx2g):How it runs.
util/pytest_shards.pyruns inside the step's existingtimeout,prlimit, scope and watcher, so those caps still cover the whole tier. On SIGINT it lets the current run write its JUnit file and starts no further runs. Each shard writes its ownjunit-<shard>.xml.Unchanged:
-n, the summaries andcontinue-on-error;Tests.
tests/project/test_graalpy_shards_1963.pychecks, through real pytest collection, that the shards cover every test of the tier exactly once. It fails againstmain(6 failed).Part of #1963.