Skip to content

fix(ci): read pip's indented ERROR line in util/pip_install.py (#2041) - #2042

Merged
JarryShaw merged 1 commit into
mainfrom
fix/2041-pip-install-indented-error
Oct 22, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
fix/2041-pip-install-indented-error

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

What is the purpose of your pull request?

  • fix — corrects a defect

Description of your pull request and other information

Closes #2041. reason() in util/pip_install.py only matched lines that start with ERROR: . When pip fails a wheel build it indents that line ( ERROR: Failed building wheel for cryptography), so the annotation fell back to "pip failed without an ERROR line".

  • reason() now strips each line's indent before matching and still takes the last match. Pip's closing Failed to build … and error: failed-wheel-build-for-install lines carry no ERROR: prefix and say less.
  • On run 39718608950's pypy3.10 log, the annotation now reads Failed building wheel for cryptography. The rest of this leg is skipped.
  • New tests use a fixture copied from that log, plus tab-indented, last-match and empty-ERROR: cases. A second test pins the deliberate departure from the old inline shell, which had the same gap.

The new tests fail without the fix (3 failed, 18 passed) and pass with it (19 passed). With test_python_matrix_tiers_1633: 45 passed. experimental.yml's inline copy of the old sed has the same gap; #2032 replaces it with this script.

- reason() strips each line's leading whitespace before matching the
  `ERROR: ` prefix, so a failed wheel build's indented
  `  ERROR: Failed building wheel for ...` names the annotation instead
  of the no-ERROR-line fallback
- tests: a fixture from the pypy3.10 (KTLO) failure log, its exact
  annotation, and the parity case where the former shell's `^ERROR: `
  now diverges on purpose
@JarryShaw JarryShaw added bug Issues reporting a defect (set by the bug report template; a default, not an assessment) 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 Oct 22, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

GOOD TO GO at 1db0f1057 (Sonnet cross-review). Fed the real pypy3.10 log (job 119628835034), reason() returns Failed building wheel for cryptography. The match is still case-sensitive, so the nested build's error:/Error: lines don't match, and %/, escaping still happens downstream. The "departs on purpose" test runs only on its own fixture, so every other parity case is unchanged.

@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 Oct 22, 2026
@JarryShaw JarryShaw moved this to In review in PyPCAPKit Oct 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Coverage: 91.54% (unit tier, Python 3.15, 1db0f1057, 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

Copy link
Copy Markdown
Owner Author

Ordering check on 1db0f1057: the project leg (util/run_unittest_leg.py project) ran 1724 tests, OK. CI: 64 checks green, 0 failing. KTLO 3.8, 3.9 and 3.10 legs: 0 failing tests. Ready to merge.

@JarryShaw
JarryShaw merged commit 3f67d9f into main Oct 22, 2026
65 checks passed
@JarryShaw
JarryShaw deleted the fix/2041-pip-install-indented-error branch October 22, 2026 18:56
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 22, 2026
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Oct 22, 2026
@JarryShaw JarryShaw added this to the PyPCAPKit v1.5 milestone Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issues reporting a defect (set by the bug report template; a default, not an assessment) 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: pip_install.py reason() misses pip's indented ERROR lines

1 participant