Skip to content

[9.2.0] Fix loading symlinked .bzl files from the remote repo contents cache (https://github.com/bazelbuild/bazel/pull/30031) - #30037

Merged
Wyverald merged 1 commit into
bazelbuild:release-9.2.0from
bazel-io:cp30031-9.2.0-155344
Jun 26, 2026

Conversation

@bazel-io

Copy link
Copy Markdown
Member

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 #29656 (comment)

Build API Changes

No

Checklist

  • 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 #30031.

PiperOrigin-RevId: 938614073
Change-Id: I1decc39029a973cf1984d7518242d0ffc56c0711

Commit ad1793f

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
@bazel-io
bazel-io requested a review from a team as a code owner June 26, 2026 15:54
@bazel-io bazel-io added team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. team-Remote-Exec Issues and PRs for the Execution (Remote) team awaiting-review PR is awaiting review from an assigned reviewer labels Jun 26, 2026
@bazel-io
bazel-io requested a review from coeuvre June 26, 2026 15:54
@bazel-io bazel-io added the awaiting-review PR is awaiting review from an assigned reviewer label Jun 26, 2026
@Wyverald
Wyverald added this pull request to the merge queue Jun 26, 2026
Merged via the queue into bazelbuild:release-9.2.0 with commit abbdfd4 Jun 26, 2026
46 checks passed
@github-actions github-actions Bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. team-Remote-Exec Issues and PRs for the Execution (Remote) team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants