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

pantsbuild / pants / 24411696792
93%

Build:
DEFAULT BRANCH: main
Ran 14 Apr 2026 05:05PM UTC
Jobs 12
Files 1734
Run time 4min
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

14 Apr 2026 04:49PM UTC coverage: 92.91% (-0.004%) from 92.914%
24411696792

push

github

web-flow
fix: preserve workunit log level in local cache metadata update (#23251)

## Problem

When a process runs (e.g. `generate-lockfiles`), the local cache runner
updates the "Scheduling:" workunit metadata to attach cache digests. As
a side effect, it **overrides the workunit log level to `Info`**,
regardless of its original level. Since `ExecuteProcess` workunits
intentionally start at `Debug` (to avoid rendering until execution
actually begins), this promotion causes duplicate INFO-level output:

```
23:22:27.30 [INFO] Starting: Generate lockfile for pytest
23:22:53.66 [INFO] Completed: Generate lockfile for pytest (26.4s)
23:22:53.66 [INFO] Completed: Scheduling: Generate lockfile for pytest (26.4s)
```

The third line is redundant — the scheduling workunit is a wrapper whose
duration mirrors its child.

## Root Cause

This was inadvertently introduced in #22212, which added Action/Command
digest metadata to workunits. The `update_metadata` call needed to
attach `local_command` and `local_action` digests, but the closure also
hardcoded `Level::Info` as the new level — discarding the original. The
PR was focused on metadata, not log levels, and the level override was
not discussed in review.

## Solution

Preserve the workunit's original log level when updating cache metadata,
instead of unconditionally overriding it to `Level::Info`. The metadata
update only needs to set `local_command` and `local_action` — it has no
reason to change the log level.

## Result

Default (INFO-level) output is now clean:

```
23:22:27.30 [INFO] Starting: Generate lockfile for pytest
23:22:53.66 [INFO] Completed: Generate lockfile for pytest
```

The "Scheduling:" message remains visible at `-ldebug` for debugging
purposes.

## LLM Disclosure

This PR was written with Amp (Claude). The LLM diagnosed the root cause
by tracing the workunit level flow through the codebase, identified the
accidental `Level::Info` override in #22212, and wrote the one-line fix.
I reviewed the d... (continued)

91623 of 98615 relevant lines covered (92.91%)

4.04 hits per line

Coverage Regressions

Lines Coverage ∆ File
3
97.46
-0.63% src/python/pants/engine/internals/engine_test.py
1
79.7
-0.75% src/python/pants/engine/streaming_workunit_handler.py
Jobs
ID Job ID Ran Files Coverage
1 test_python_linux_x86_64_4/10 - 24411696792.1 14 Apr 2026 05:25PM UTC 1224
59.41
GitHub Action Run
2 test_python_linux_x86_64_7/10 - 24411696792.2 14 Apr 2026 05:23PM UTC 1195
51.3
GitHub Action Run
3 test_python_linux_arm64 - 24411696792.3 14 Apr 2026 05:19PM UTC 1173
52.37
GitHub Action Run
4 test_python_macos14_arm64 - 24411696792.4 14 Apr 2026 05:05PM UTC 1173
52.38
GitHub Action Run
5 test_python_linux_x86_64_6/10 - 24411696792.5 14 Apr 2026 05:14PM UTC 1185
49.55
GitHub Action Run
6 test_python_linux_x86_64_3/10 - 24411696792.6 14 Apr 2026 05:19PM UTC 1189
53.86
GitHub Action Run
7 test_python_linux_x86_64_0/10 - 24411696792.7 14 Apr 2026 05:19PM UTC 1209
56.8
GitHub Action Run
8 test_python_linux_x86_64_1/10 - 24411696792.8 14 Apr 2026 05:20PM UTC 1188
49.19
GitHub Action Run
9 test_python_linux_x86_64_5/10 - 24411696792.9 14 Apr 2026 05:13PM UTC 1204
59.72
GitHub Action Run
10 test_python_linux_x86_64_2/10 - 24411696792.10 14 Apr 2026 05:15PM UTC 1191
58.69
GitHub Action Run
11 test_python_linux_x86_64_9/10 - 24411696792.11 14 Apr 2026 05:22PM UTC 1200
53.91
GitHub Action Run
12 test_python_linux_x86_64_8/10 - 24411696792.12 14 Apr 2026 05:17PM UTC 1192
53.62
GitHub Action Run
Source Files on build 24411696792
  • Tree
  • List 1734
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24411696792
  • 18145318 on github
  • Prev Build on main (#24272305114)
  • Next Build on main (#24412209202)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc