• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 46211799751
93%

Build:
DEFAULT BRANCH: main
Ran 29 Nov 2026 01:44AM UTC
Jobs 11
Files 1801
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Nov 2026 01:34AM UTC coverage: 93.109% (+0.003%) from 93.106%
46211799751

push

github

web-flow
Stop re-parsing every BUILD file on warm pantsd runs (#23797)

Fixes #23782.

Since #17652 (2.16), `parse_address_family` has taken `SessionValues` as
a parameter so it can resolve `env()` calls in BUILD files.
`SessionValues` differ on every run: the client environment contains
`PANTSD_RUNTRACKER_CLIENT_START_TIME`, and `OptionsBootstrapper` carries
the command line. So with pantsd warm and nothing changed, every
`parse_address_family` node was invalidated and every BUILD file was
re-parsed.

The env var lookup is now its own rule, `get_build_file_env_vars`, keyed
on the variable names a BUILD file (and the prelude) reads.
`parse_address_family` no longer takes `SessionValues`, and it only
requests that rule for BUILD files that read env vars.

Changing a variable a BUILD file reads still invalidates it:
`get_build_file_env_vars` re-runs on every run, but when its result is
unchanged its generation stays the same (`src/rust/graph/src/entry.rs`,
`Entry::complete`), so the dependent `parse_address_family` is cleaned
rather than re-run (`src/rust/graph/src/lib.rs`, `attempt_cleaning`).
When the value does change, only the BUILD files reading that variable
are re-parsed. BUILD files that read no env vars no longer depend on the
session at all.

With the reproduction from the issue (2,000 BUILD files, median of 9
warm runs of `pants dependencies pkg0/mod1/lib.py`, Pants from sources
on macOS arm64):

| | warm run | `parse_address_family` lines in `-ldebug` |
|---|---|---|
| main | 0.67 - 0.77 s | 2,041 |
| this branch | 0.32 - 0.34 s | 0 |

Two tests are added next to `test_each_build_file_parsed_once`: one
showing a new session with unrelated env changes doesn't re-parse BUILD
files, and one showing a change to a variable read via `env()` re-parses
only that BUILD file and picks up the new value.

Disclosure: the investigation, code, tests, release note, and this
description were generated with Claude (Claude Code). I identified the
issue's likely cause ... (continued)

49 of 49 new or added lines in 2 files covered. (100.0%)

98265 of 105538 relevant lines covered (93.11%)

3.66 hits per line

Jobs
ID Job ID Ran Files Coverage
1 test_python_linux_x86_64_3/10 - 46211799751.1 29 Nov 2026 01:50AM UTC 1223
51.91
GitHub Action Run
2 test_python_linux_x86_64_7/10 - 46211799751.2 29 Nov 2026 01:51AM UTC 1228
51.2
GitHub Action Run
3 test_python_linux_x86_64_8/10 - 46211799751.3 29 Nov 2026 01:49AM UTC 1228
53.43
GitHub Action Run
4 test_python_linux_x86_64_0/10 - 46211799751.4 29 Nov 2026 01:48AM UTC 1245
56.84
GitHub Action Run
5 test_python_linux_x86_64_4/10 - 46211799751.5 29 Nov 2026 01:51AM UTC 1254
59.01
GitHub Action Run
6 test_python_linux_x86_64_1/10 - 46211799751.6 29 Nov 2026 01:47AM UTC 1224
48.95
GitHub Action Run
7 test_python_linux_x86_64_5/10 - 46211799751.7 29 Nov 2026 01:45AM UTC 1240
60.44
GitHub Action Run
8 test_python_linux_arm64 - 46211799751.8 29 Nov 2026 01:44AM UTC 1210
53.14
GitHub Action Run
9 test_python_linux_x86_64_6/10 - 46211799751.9 29 Nov 2026 01:44AM UTC 1222
49.86
GitHub Action Run
10 test_python_linux_x86_64_2/10 - 46211799751.10 29 Nov 2026 01:48AM UTC 1225
59.28
GitHub Action Run
11 test_python_linux_x86_64_9/10 - 46211799751.11 29 Nov 2026 01:46AM UTC 1235
54.69
GitHub Action Run
Source Files on build 46211799751
  • Tree
  • List 1801
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #46211799751
  • 8adc1cb5 on github
  • Prev Build on main (#46211007581)
  • Next Build on main (#46482697936)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc