[8.8.0] Fix loading symlinked .bzl files from the remote repo contents cache - #30101
Merged
Conversation
fmeum
marked this pull request as ready for review
July 1, 2026 08:56
fmeum
marked this pull request as draft
July 2, 2026 11:25
fmeum
marked this pull request as ready for review
July 12, 2026 15:58
Collaborator
Author
|
Should pass CI and be merged after #30035 |
bazelbuild#30031) ### Description When a repo is restored from the remote repo contents cache, its files are injected into the in-memory overlay file system and `.bzl`/`REPO.bazel` files are additionally prefetched to the native file system as regular files. `RemoteExternalFileSystem#getInputStream` relies on this by redirecting reads of such files to the native file system, but didn't follow symlinks before doing so. ### Motivation Fixes bazelbuild#29656 (comment) ### Build API Changes No ### Checklist - [x] I have added tests for the new use cases (if any). - [ ] I have updated the documentation (if applicable). ### Release Notes RELNOTES: Fixed spurious "No such file" errors with the remote repo contents cache when a repo contains a symlink to a `.bzl` file. Closes bazelbuild#30031. PiperOrigin-RevId: 938614073 Change-Id: I1decc39029a973cf1984d7518242d0ffc56c0711 (cherry picked from commit ad1793f)
coeuvre
approved these changes
Jul 14, 2026
coeuvre
enabled auto-merge
July 14, 2026 09:52
Merged
via the queue into
bazelbuild:release-8.8.0
with commit Jul 14, 2026
da74246
46 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a repo is restored from the remote repo contents cache, its files are injected into the in-memory overlay file system and
.bzl/REPO.bazelfiles are additionally prefetched to the native file system as regular files.RemoteExternalFileSystem#getInputStreamrelies on this by redirecting reads of such files to the native file system, but didn't follow symlinks before doing so.Fixes #29656 (comment).
RELNOTES: Fixed spurious "No such file" errors with the remote repo contents cache when a repo contains a symlink to a
.bzlfile.Closes #30031.
PiperOrigin-RevId: 938614073
Change-Id: I1decc39029a973cf1984d7518242d0ffc56c0711
(cherry picked from commit ad1793f)