Skip to content

ci: run the curated ALL tier on PyPy, split into separate pytest runs (#1958, #2005) - #2006

Open
JarryShaw wants to merge 2 commits into
mainfrom
ci/1958-pypy-all-tier
Open

JarryShaw wants to merge 2 commits into
mainfrom
ci/1958-pypy-all-tier

Conversation

@JarryShaw

@JarryShaw JarryShaw commented Oct 20, 2026 •

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

Draft. This is #1958 phase 3. The blocking pypy3.11 leg stays red until #2003 and #2004 land.

PyPy now runs the curated ALL tier from the matrix that util/python_versions.py builds:

  • test and integration gain a pypy3.11 leg, which blocks through Required checks passed, so no ruleset change is needed.
  • test-ktlo and integration-ktlo gain a pypy3.10 leg.

The legs use the same steps, caps and selection as the other non-latest legs.

Needed to run at all:

PyPy 8.0.1 results, run in an Ubuntu 24.04 container:

Part of #1958. Closes #2005

@JarryShaw JarryShaw added ci Pull requests that change CI or workflow configuration (ci: subject prefix) review: pending No verdict for the current head - never reviewed, or the head moved since the last one labels Oct 20, 2026
@JarryShaw JarryShaw moved this to In review in PyPCAPKit Oct 20, 2026
@JarryShaw
JarryShaw force-pushed the ci/1958-pypy-all-tier branch from b5e232d to ecfb053 Compare October 20, 2026 23:16
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Coverage: 91.54% (unit tier, Python 3.15, f24c1b16e, Unit Tests run success)

Package Statements Missed Branches Partial Cover
pcapkit (top level) 104 4 20 2 95.16%
pcapkit/const 19597 881 2618 867 92.11%
pcapkit/corekit 2567 71 816 37 96.57%
pcapkit/dumpkit 282 3 102 3 98.44%
pcapkit/foundation 2930 23 1022 25 98.79%
pcapkit/interface 138 4 52 3 96.32%
pcapkit/protocols 17436 219 4582 185 98.15%
pcapkit/toolkit 872 36 298 10 95.21%
pcapkit/utilities 529 7 160 5 98.26%
pcapkit/vendor 4431 1995 1018 167 51.73%

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

@JarryShaw
JarryShaw force-pushed the ci/1958-pypy-all-tier branch from ecfb053 to d4db362 Compare October 20, 2026 23:54
@JarryShaw JarryShaw changed the title ci: run the curated ALL tier on PyPy (#1958) ci: run the curated ALL tier on PyPy, split into separate pytest runs (#1958, #2005) Oct 20, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

First CI run at d4db362e0: the pypy3.11 leg runs the tier in three pytest invocations, with no OOM and no lost workers on the runner. They finished in 229 s, 161 s and 276 s.

All 13 failures are the known ones:

This stays a draft until both land.

@JarryShaw

Copy link
Copy Markdown
Owner Author

resolve conflicts. Unit tests failed.

@JarryShaw
JarryShaw force-pushed the ci/1958-pypy-all-tier branch from d4db362 to 4aa36ad Compare October 21, 2026 04:18
@JarryShaw

Copy link
Copy Markdown
Owner Author

Rebased onto main as 4aa36adcc. The conflict was #2010's collect_until in test_extraction_ownership.py. I kept it and gave PyPy a 1 s grace, because PyPy runs that finaliser one collection later than CPython.

The failing unit test is the pypy3.11 leg itself. Its remaining failures are #2003's rebuilds, which depend on Info key order. The fix you ruled on, looking up the payload by protocol name, is being worked on now. This PR stays a draft until that lands.

@JarryShaw

Copy link
Copy Markdown
Owner Author

Rebased onto main d419d8c39. The new head is 2df292ea7, and the PR is mergeable again.

I'll take this out of draft once the PyPy legs are green on this head. Their run is the first real check of pytest_shards.py on PyPy.

@JarryShaw

Copy link
Copy Markdown
Owner Author

what's it's waiting for to publish? and resolve conflicts

@JarryShaw

Copy link
Copy Markdown
Owner Author

It was waiting on the Ubuntu 26.04 runner failures. All four of this PR's own PyPy legs were already green at 2df292ea7: pypy3.11 and pypy3.10, unit and integration. Its red checks were the two runner bugs:

I'm rebasing onto main, which now includes #2021, to resolve the conflicts, and taking this out of draft once that is pushed. Until #2022 lands, Project tests stays red here, as it does on main.

@JarryShaw
JarryShaw force-pushed the ci/1958-pypy-all-tier branch from 2df292e to bc4bb35 Compare October 21, 2026 21:48
@JarryShaw
JarryShaw marked this pull request as ready for review October 21, 2026 21:49
@JarryShaw

Copy link
Copy Markdown
Owner Author

Rebased onto main dbfa54b20 and conflicts resolved. The new head is bc4bb3579 (2e735e174 + bc4bb3579), and it is out of draft.

Git reported a clean rebase, but it had applied the +33 unit-tests.yml:N citation shift only once, though both this PR and #2021 had moved the same citations. All 9 are re-derived against the rebased file; for example :1964 is name: Required checks passed. Apart from those citation lines, the range-diff is unchanged. #2021's AppArmor step is untouched (test_tshark_apparmor_2019.py passes), and the local pins give 258 passed. A Sonnet review is running. Project tests stays red here until #2022 lands.

@JarryShaw

Copy link
Copy Markdown
Owner Author

GOOD TO GO at bc4bb3579 on the diff. CI is still queued.

A Sonnet cross-review confirmed:

  • aenum shim: it is gated on sys.implementation.name == 'pypy' in compat.py and is a no-op on CPython. TheAenumPremiseTests fails once aenum no longer needs it.
  • lxml: pcapkit/ never imports it. It is marked == 'CPython' in pyproject.toml and Pipfile, and its tests skip with a reason.
  • Sharding: util/pytest_shards.py runs each tier test exactly once: tests/protocols, then tests/corekit, then the rest. The JUnit names match the upload glob, and the exit status is that of the last failing run.
  • Citations: 14 of the 15 re-derived lines checked land on the intended line.
  • Tests: the related pins give 148 passed.

I corrected three stale points in the review:

The only expected conflict is the workflows.rst citations against #2023, re-derived by whichever PR lands second.

Not yet verified:

  • the PyPy legs on this head, including the FAILED ids on the non-blocking pypy3.10 legs, which I'll check before calling it ready;
  • aenum's upstream PyPy issue.

@JarryShaw JarryShaw removed the review: pending No verdict for the current head - never reviewed, or the head moved since the last one label Oct 21, 2026
@JarryShaw JarryShaw added the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 21, 2026
…#1958, #2005)

- `test`/`integration` gain a blocking `pypy3.11` leg and the KTLO jobs a
  `pypy3.10` leg, from the matrix util/python_versions.py builds; they run
  the same ALL selection, caps and timeouts as the other non-latest legs.
- PyPy workers grow steadily to about 5.8 GB each, so a PyPy leg runs the
  tier as several pytest invocations (`SHARDS`: tests/protocols,
  tests/corekit, then the rest), each starting fresh workers.
- pcapkit imports on PyPy 8.0: a PyPy-gated aenum workaround for the
  builtin `NoneType` in pcapkit/utilities/compat.py.
- `lxml` is CPython-only in the test extra and Pipfile; it has no PyPy
  wheel and only LATEST modules use it.
- Interpreter-limit failures gated on `sys.implementation.name`.

Project pins and docs updated; the touched pins pass.
- unit-tests.yml `test` / `Run unit tests`: the PyPy leg's inline shard
  loop becomes `python util/cap_file_size.py python util/pytest_shards.py
  "$SHARDS" -- python -m pytest "$@"`, #1963's script, on the leg's own
  interpreter (the #1969 pin requires the cap to exec `python`). Same
  runs, JUnit names and exit status; later shards also ignore earlier
  ones, and no run starts after SIGINT.
- Pins: 1732's STUB runs the script on the real interpreter and
  `unsharded` accepts the earlier-shard ignores; 2005's test checks the
  invocation and each run's JUnit file.
- workflows.rst: the PyPy paragraph and the Workflow Scripts row name
  the script; the `unit-tests.yml:NNNN` citations move 6 lines up
  (checked by content), here and in releasing.rst.
@JarryShaw
JarryShaw force-pushed the ci/1958-pypy-all-tier branch from bc4bb35 to f24c1b1 Compare October 21, 2026 22:06
@JarryShaw

Copy link
Copy Markdown
Owner Author

Rebased onto main 185b3176f, which now includes #2022's GNU timeout fix. The new head is 78ee03a59 + f24c1b16e. git patch-id is unchanged for both commits, so GOOD TO GO carries over. #2022 left unit-tests.yml alone, so the citations stand. Locally the pins pass (129 passed), including #2022's test_gnu_timeout_2020 and the timeout tests. The previous head's Project tests would have failed on 26.04 without that fix; this head shouldn't.

@JarryShaw

Copy link
Copy Markdown
Owner Author

Ordering check, since the "Plain unittest ordering" job is skipped on PRs. I ran every leg of it, sequentially and with CI's own command, on main 185b3176f + #2024 (which contains this PR's two commits).

The KTLO legs report 0 failing test ids across 15 legs.

This branch has not been deployed

No deployments
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) review: good-to-go Cross-review at the current head says ready; CI state is separate

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

ci: PyPy workers on the ALL tier grow until they are OOM-killed

1 participant