Conversation
|
@tjgq, this is an alternative to #30316. It handles missing input parents during filesystem path resolution, leaving SymlinkAction's executable checks unchanged and avoiding physical input-directory creation.
Update (2026-09-29): #30926 now contains one commit, 11d1eb4, directly on master. #31311 has merged. The revised fix supersedes #31313 by exposing the input’s implied parents and repairing stale physical paths when materializing contents or preparing outputs. — Codex, on behalf of @tamird. |
|
✅ Bazel docs preview is ready! Updated pages
Preview URL: https://bazel-pr-30926.mintlify.app/ Updated for |
85c65d3 to
b675261
Compare
b675261 to
43a9038
Compare
a9bc8af to
14de419
Compare
Remote input metadata remains valid when its local parents are absent or replaced by stale files, but canonicalization then hides the input from in-process actions. Infer parent directories from checked inputs and use that namespace for traversal, listing, and virtual permissions, refreshing it after input discovery. Preserve physical symlink traversal, and repair host output directories before updating the action filesystem so output preparation also handles stale parents.
14de419 to
11d1eb4
Compare
With minimal downloads, input metadata can outlive its local parent directories. A later build can also leave a regular file at a parent path: cache reuse still supplies valid remote metadata, but canonicalization rejects the input before template expansion or executable-symlink actions can use it. Expose directories implied by checked inputs in the action filesystem, including directory listings and virtual permissions, so these consumers can reach the same inputs as spawn actions. Materialization repairs disk when bytes are needed; output-directory preparation repairs the host path before populating the action filesystem's overlay.
The directory index is built lazily and refreshed between discovery and execution. Physical symlinks continue to redirect traversal, so inferred directory nodes are revalidated while retaining their cached children. Inputs with traversable physical parents, physical directory lookups, and checks of declared output files with existing parents avoid the index. An ambiguous physical-file lookup must establish whether declared descendants exist; with 250,000 inputs, this first lookup takes roughly 5–6 ms and allocates 5.9 MB on macOS arm64. Warm local-file fast-digest lookups remain below 1 µs in the included benchmark.
Fixes #26877.
— Codex, on behalf of @tamird.
RELNOTES: None