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

pantsbuild / pants / 42560651623
93%

Build:
DEFAULT BRANCH: main
Ran 09 Nov 2026 04:26AM UTC
Jobs 11
Files 1800
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

09 Nov 2026 04:13AM UTC coverage: 93.099% (-0.001%) from 93.1%
42560651623

push

github

web-flow
Write file:// remote cache blobs atomically (#23728)

## Background

The `experimental-file` remote cache provider (`remote_store_address =
"file://..."`) builds opendal's `Fs` service without `atomic_write_dir`.
In that mode opendal opens each blob's final path with `O_TRUNC` and
writes into it in place (via `tokio::io::copy`, in 8 KiB chunks). If the
write is interrupted, for example because Pants is killed mid-upload, a
truncated blob is left under its digest's name:

- `list_missing_digests` reports the digest as present, so it is never
re-uploaded.
- `load` validates the digest and fails with `Remote CAS gave wrong
digest`, but never removes the blob, so the store stays broken until the
file is deleted by hand.
- `abort` is unsupported in this mode, so a failed upload can't be
cleaned up either.

We hit this in practice: every bad blob in our stores was truncated at
an 8 KiB boundary.

## Change

`Provider::fs` sets `atomic_write_dir` to a `.tmp` directory under the
store root. opendal then writes each blob to a temporary file and
renames it to its final path once complete, so readers see either the
whole blob or nothing. The directory is under the root so the rename
never crosses a filesystem boundary. opendal already called `sync_all`
on every write, so there is no extra fsync.

If a process dies mid-write, its temporary file is left in `.tmp`. That
is harmless, but nothing currently cleans it up. Blobs that are already
truncated are not repaired; the release note says to delete them.

## Tests

- `fs_partial_write_is_not_visible`: starts a write, stops partway, and
checks the blob is neither on disk under its final path nor loadable,
and is still reported missing. It then finishes the write and checks the
whole blob appears. This fails without the fix (`assertion failed:
!root.path().join(&path).exists()`).
- `fs_store_file_round_trip`: `store_file` against a real directory
succeeds and leaves no temporary files behind.
- `cargo test -p remote... (continued)

98078 of 105348 relevant lines covered (93.1%)

3.65 hits per line

Coverage Regressions

Lines Coverage ∆ File
1
96.15
-3.85% src/python/pants/backend/tools/preamble/subsystem.py
Jobs
ID Job ID Ran Files Coverage
1 test_python_linux_x86_64_3/10 - 42560651623.1 09 Nov 2026 04:35AM UTC 1223
51.86
GitHub Action Run
2 test_python_linux_x86_64_7/10 - 42560651623.2 09 Nov 2026 04:37AM UTC 1228
50.92
GitHub Action Run
3 test_python_linux_x86_64_8/10 - 42560651623.3 09 Nov 2026 04:37AM UTC 1228
53.17
GitHub Action Run
4 test_python_linux_x86_64_4/10 - 42560651623.4 09 Nov 2026 04:37AM UTC 1254
58.84
GitHub Action Run
5 test_python_linux_x86_64_9/10 - 42560651623.5 09 Nov 2026 04:31AM UTC 1235
54.38
GitHub Action Run
6 test_python_linux_x86_64_2/10 - 42560651623.6 09 Nov 2026 04:33AM UTC 1225
59.03
GitHub Action Run
7 test_python_linux_x86_64_1/10 - 42560651623.7 09 Nov 2026 04:32AM UTC 1224
48.7
GitHub Action Run
8 test_python_linux_x86_64_5/10 - 42560651623.8 09 Nov 2026 04:32AM UTC 1240
60.14
GitHub Action Run
9 test_python_linux_arm64 - 42560651623.9 09 Nov 2026 04:26AM UTC 1210
53.13
GitHub Action Run
10 test_python_linux_x86_64_6/10 - 42560651623.10 09 Nov 2026 04:31AM UTC 1221
49.77
GitHub Action Run
11 test_python_linux_x86_64_0/10 - 42560651623.11 09 Nov 2026 04:35AM UTC 1245
56.84
GitHub Action Run
Source Files on build 42560651623
  • Tree
  • List 1800
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #42560651623
  • 94f4527b on github
  • Prev Build on 2.34.x (#42507674700)
  • Next Build on main (#43074699566)
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