Skip to content

ci(unit-tests): split the PyPy protocols shard so its tail stops stalling - #2604

Merged
JarryShaw merged 1 commit into
mainfrom
ci/2600-pypy-shards
Nov 2, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
ci/2600-pypy-shards

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

What is the purpose of your pull request?

  • ci — workflows or build tooling

Description of your pull request and other information

The PyPy legs' SHARDS becomes tests/protocols/internet tests/protocols/application tests/protocols/misc tests/protocols tests/corekit. util/pytest_shards.py ignores the earlier subpackages when it runs tests/protocols, so the remainder covers its top-level modules plus link, schema and transport. The pypy3.10 KTLO leg shares the same steps through the YAML alias.

Measured on PyPy 7.3.19 at -n 4:

  • Same tests: --collect-only gives the same 2,717 test ids, with no duplicates. The protocols tests split 300, 177, 185 and 382 out of 1,044.
  • Memory: the protocols peak RSS drops from 17.7 GiB to at most 5.7 GiB, on a 16 GB runner.
  • Speed: the slowest test drops from 16.4 s to 11.9 s, and the protocols part from 267 s to 224 s. The protocols results are identical: 1,033 passed and 11 skipped.

test_pypy_worker_memory_2005 pins the new list, and it now also requires every shard to keep a unit-tier module that no earlier shard took. The PyPy paragraph in workflows.rst describes the split.

Closes #2600

…ling (#2600)

- unit-tests.yml: a PyPy leg's SHARDS runs tests/protocols/internet,
  application and misc on their own ahead of tests/protocols, which then
  takes the remainder; test-ktlo shares the step by YAML alias. Run whole,
  tests/protocols peaked at 17.7 GiB at -n 4 against the runner's 16 GB.
- test_pypy_worker_memory_2005: pin the new SHARDS, and require each shard
  to keep unit-tier modules no earlier shard took.
- workflows.rst: name the shards and record the measurement.

Collect-only on PyPy 7.3.19: same 2717 ids, none duplicated; the split
protocols runs peak at 5.7 GiB and take 224 s against 267 s.
@JarryShaw JarryShaw added ci Pull requests that change CI or workflow configuration (ci: subject prefix) review: running A cross-review is in flight against the current head - no verdict yet labels Nov 1, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

GOOD TO GO at ec8400fa9 (Sonnet review).

  • runs() ignores each earlier shard, so the old and new shard sets collect the same 2,717 ids, with no duplicates. The protocols results are the same: 1,042 passed and 1 skipped either way.
  • Only the PyPy legs' SHARDS changes, including the KTLO pypy3.10 leg via its YAML alias. Job and step names are unchanged.
  • The stricter shard check fails on every shard set that leaves a shard with nothing to collect, which a mutation run confirmed.
  • Figures: the issue's figures come from the investigation run, and this PR's (17.7 → 5.7 GiB peak, slowest test 16.4 → 11.9 s) from the fix's own run on PyPy 7.3.19. The PyPy CI legs on this PR are the measurement on 8.0.

@JarryShaw JarryShaw added review: good-to-go Cross-review at the current head says ready; CI state is separate and removed review: running A cross-review is in flight against the current head - no verdict yet labels Nov 1, 2026
@JarryShaw JarryShaw moved this to In review in PyPCAPKit Nov 1, 2026
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Coverage: 94.03% (unit tier, Python 3.15, ec8400fa9, Unit Tests run success)

Package Statements Missed Branches Partial Cover
pcapkit (top level) 104 4 20 2 95.16%
pcapkit/const 20093 144 2712 125 98.78%
pcapkit/corekit 2605 74 818 37 96.52%
pcapkit/dumpkit 281 3 100 3 98.43%
pcapkit/foundation 3360 27 1186 32 98.70%
pcapkit/interface 138 4 52 3 96.32%
pcapkit/protocols 20346 220 5370 204 98.34%
pcapkit/toolkit 961 28 342 10 96.32%
pcapkit/utilities 506 7 144 5 98.15%
pcapkit/vendor 5009 2222 1148 182 52.31%

Per-file detail: the coverage-html artifact of this run.

@JarryShaw

Copy link
Copy Markdown
Owner Author

The PyPy legs on this PR pass with the split shards. "Python pypy3.11" took 11 m 34 s and "Python pypy3.10 (KTLO)" 17 m 16 s, with no TimeoutError. Merging this first should let #2593 and #2601's PyPy legs pass on a re-run.

@github-actions github-actions Bot added this to the PyPCAPKit v1.6 milestone Nov 2, 2026
@JarryShaw
JarryShaw merged commit 8997b44 into main Nov 2, 2026
69 checks passed
@JarryShaw
JarryShaw deleted the ci/2600-pypy-shards branch November 2, 2026 02:23
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Nov 2, 2026
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Nov 2, 2026
JarryShaw added a commit that referenced this pull request Nov 2, 2026
…1.6.0 (#2449)

- Added: DCCP, its checksum over the IP pseudo-header, register_dccp and
  register_dccp_option, and the pcapkit.const.dccp registries (#2593).
- Folded into unreleased entries: LinuxSLL's stop on its ARPHRD path
  (#2587) and ARPHRD's __proto_dest__ (#2598), SSLv2 records chained in a
  segment (#2585), the checksum's move to pcapkit.corekit.checksum.internet
  (#2586), and IGMPv2's and IGMPv3's versioned name (#2590).
- Breaking: InARP moves to pcapkit.protocols.link.inarp with no re-export,
  joining the DRARP entry (#2596).
- Changed: the conventions' new rulings (#2599), the milestone workflow's
  next-open-milestone lookup (#2591), the PyPy protocols shards (#2604).
  Fixed: a handled next-layer refusal is quiet under beholder (#2597); the
  IPX crawlers restore sys.path (#2601).
- CHANGELOG.md regenerated; util/changelog_md.py --check passes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Pull requests that change CI or workflow configuration (ci: subject prefix)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

ci: the PyPy protocols shard stalls past the 30s case timeout since the checksum wave

1 participant