Skip to content

ci: Port the Tier 2 build-error reporter to Python (#962) - #2599

Merged
zackees merged 2 commits into
masterfrom
infra/962-gen-005-build-errors-python
Oct 27, 2026
Merged

zackees merged 2 commits into
masterfrom
infra/962-gen-005-build-errors-python

Conversation

@zackees

@zackees zackees commented Oct 27, 2026

Copy link
Copy Markdown
Member

Ports rust/tools/linux-validate/build-errors.sh (36 lines) to Python, per the GEN-005 burn-down in #962. Clean single-unit port: its only caller is validate.sh, which runs with uv mounted into the Tier 2 container (ci.yml: --mount ...$(command -v uv),dst=/usr/local/bin/uv) and already runs other ported helpers through uv run --no-project.

RED

ci/test_tier2_build_errors.py now drives the port (rust/tools/linux-validate/build_errors.py) instead of bash build-errors.sh, loading it by path the way the other ci/test_*.py suites load their modules. On the unfixed tree the module does not exist, so every case errors (458813719): 10 errors, FileNotFoundError: .../build_errors.py.

GREEN (cd21f7aff)

  • rust/tools/linux-validate/build_errors.py — the port, shebang #!/usr/bin/env -S uv run --script.
  • validate.sh calls it through uv run --no-project at all three call sites.
  • build-errors.sh deleted; the ci.toml GEN-005 exception for it removed.
  • The recovery test's extracted block runs the ported helper through this suite's interpreter, since validate.sh reaches it via uv run --no-project.

The port keeps every section the shell printed, in the same order and with the same limits:

  • the zccache cache-infrastructure reasons (grep -E '^zccache(\[|:)', deduplicated, first 40) — printed first so hundreds of FAILED edges cannot crowd them out (mac-capture: Wait for SCK stop and fence callbacks before free #125);
  • the C/C++ : error / : fatal error / FAILED: lines (deduplicated, first 80);
  • the rustc error and build-script panic blocks with their --> location and code excerpt, by the awk rule: a block ends at a blank line, the next FAILED:, a Compiling/Checking/Finished line, a warning: line, a [i/n] progress line, or 12 lines, whichever comes first (first 200 lines).

Validation

  • uv run python -m unittest ci/test_tier2_build_errors.py — 10 tests pass (RED: 10 errors before the module existed).
  • uv run python -m unittest ci.test_ci_toml ci.test_uv_run ci.test_ci_tests_stdlib_only ci.test_no_sys_path_edits — 28 pass.
  • ruff check on both files: clean.
  • ./lint's rust lane: the only failure is ci/test_local_gate_probe.py, the environmental soldr-version probe on this host, unrelated to these files.

Refs #962

@zackees

zackees commented Oct 27, 2026

Copy link
Copy Markdown
Member Author

Handed off to the coordinator.

  • Branch based on origin/master 8494808d6 (0 behind).
  • Focused local checks green: ci/test_tier2_build_errors.py (10), ci.test_ci_toml/ci.test_uv_run/ci.test_ci_tests_stdlib_only/ci.test_no_sys_path_edits (28), ruff check clean.
  • ./lint's rust lane: only ci/test_local_gate_probe.py fails on this host (soldr older than the repo pin), so HEAD could not be stamped with the local gate — letting PR CI run the full suite.
  • PR marked ready; auto-merge enabled (gh pr merge 2599 --auto).

@zackees
zackees added this pull request to the merge queue Oct 27, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 27, 2026
…he shell script (#962)

ci/test_tier2_build_errors.py drove bash build-errors.sh. Point it at the
ported rust/tools/linux-validate/build_errors.py and load it by path (the
suite already loads ci/ modules that way). The extracted recovery block runs
the ported helper through this suite's interpreter. RED: the module does not
exist yet, so every case errors with FileNotFoundError.
rust/tools/linux-validate/build_errors.py reproduces every section the shell
script printed, in the same order and with the same limits: the zccache
cache-infrastructure reasons (grep -E '^zccache(\[|:)'), the C/C++ ": error"
and "FAILED:" lines (deduplicated, first 80), then the rustc error and
build-script panic blocks with their "--> " location (the awk rule: a block
ends at a blank line, the next FAILED:, a Compiling/Checking/Finished line, a
warning, a progress line, or 12 lines).

validate.sh runs it through `uv run --no-project`, the same call it already
makes for serial-tests.py and check-plan.py; build-errors.sh is deleted and
its ci.toml GEN-005 exception removed. No user-visible change.
@zackees
zackees force-pushed the infra/962-gen-005-build-errors-python branch from cd21f7a to 975e5b9 Compare October 27, 2026 10:59
@zackees
zackees enabled auto-merge October 27, 2026 10:59
@zackees
zackees added this pull request to the merge queue Oct 27, 2026
Merged via the queue into master with commit 0242a8c Oct 27, 2026
36 checks passed
@zackees
zackees deleted the infra/962-gen-005-build-errors-python branch October 27, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant