Skip to content

Exclude repos with cross-repo symlinks from the remote repo contents cache - #30161

Closed
fmeum wants to merge 1 commit into
bazelbuild:masterfrom
fmeum:fix-30149-exclude-external-symlinks
Closed

fmeum wants to merge 1 commit into
bazelbuild:masterfrom
fmeum:fix-30149-exclude-external-symlinks

Conversation

@fmeum

@fmeum fmeum commented Jul 7, 2026 •

Copy link
Copy Markdown
Collaborator

Description

This is meant as a temporary stopgap for the many symlink-related issues found with the remote repo contents cache and includes tests found while debugging #30149.

The new and old tests are parameterized in a test suite variable to keep the diff small and enable future experimentation with improved symlink support. As part of #30160, I'll investigate a more conceptual approach to symlink resolution that unifies the logic with that in RemoteActionFileSystem.

Motivation

Fixes #30149

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: The remote repo contents cache no longer caches or restores repos with cross-repo symlinks, thus avoiding a large surface area for bugs. The effort to reenable this support is tracked by #30160.

@fmeum
fmeum requested review from a team, Wyverald and meteorcloudy as code owners July 7, 2026 16:07
@fmeum
fmeum marked this pull request as draft July 7, 2026 16:07
@github-actions github-actions Bot 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 Jul 7, 2026
@fmeum
fmeum force-pushed the fix-30149-exclude-external-symlinks branch from 5cd69bf to 524ce68 Compare July 7, 2026 17:05
@fmeum
fmeum marked this pull request as ready for review July 7, 2026 17:51
@iancha1992

Copy link
Copy Markdown
Contributor

@fmeum Can you please rebase?

@Wyverald

Wyverald commented Jul 7, 2026

Copy link
Copy Markdown
Member

@iancha1992 This is a legit Windows failure, not one of the previous ones that requried retrying/rebasing.

@fmeum
fmeum force-pushed the fix-30149-exclude-external-symlinks branch from 524ce68 to 07630cf Compare July 7, 2026 19:20
…cache

This is meant as a temporary stopgap for the many symlink-related issues found with the remote repo contents cache and includes tests found while debugging bazelbuild#30149.

The new and old tests are parameterized in a test suite variable to keep the diff small and enable future experimentation with improved symlink support. As part of bazelbuild#30160, I'll investigate a more conceptual approach to symlink resolution that unifies the logic with that in RemoteActionFileSystem.
Fixes bazelbuild#30149
@fmeum
fmeum force-pushed the fix-30149-exclude-external-symlinks branch from 07630cf to f4d7fcd Compare July 7, 2026 19:20
@Wyverald Wyverald added awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally and removed awaiting-review PR is awaiting review from an assigned reviewer labels Jul 7, 2026
@copybara-service copybara-service Bot closed this in e65fe06 Jul 8, 2026
@github-actions github-actions Bot removed the awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally label Jul 8, 2026
bazel-io added a commit to bazel-io/bazel that referenced this pull request Jul 9, 2026
…ontents cache (bazelbuild#30161) (bazelbuild#30190)

### Description
This is meant as a temporary stopgap for the many symlink-related issues
found with the remote repo contents cache and includes tests found while
debugging bazelbuild#30149.

The new and old tests are parameterized in a test suite variable to keep
the diff small and enable future experimentation with improved symlink
support. As part of bazelbuild#30160, I'll investigate a more conceptual approach
to symlink resolution that unifies the logic with that in
RemoteActionFileSystem.

### Motivation

Fixes bazelbuild#30149

### 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: The remote repo contents cache no longer caches or restores
repos with cross-repo symlinks, thus avoiding a large surface area for
bugs. The effort to reenable this support is tracked by
bazelbuild#30160.

Closes bazelbuild#30161.

PiperOrigin-RevId: 944468477
Change-Id: I4a435beaadb7c2df3e11acd910814736d2fb32c0

Commit
bazelbuild@e65fe06

Co-authored-by: Fabian Meumertzheim <[email protected]>
fmeum added a commit to fmeum/bazel that referenced this pull request Jul 14, 2026
…cache (bazelbuild#30161)

This is meant as a temporary stopgap for the many symlink-related issues found with the remote repo contents cache and includes tests found while debugging bazelbuild#30149.

The new and old tests are parameterized in a test suite variable to keep the diff small and enable future experimentation with improved symlink support. As part of bazelbuild#30160, I'll investigate a more conceptual approach to symlink resolution that unifies the logic with that in RemoteActionFileSystem.

Fixes bazelbuild#30149

No

- [x] I have added tests for the new use cases (if any).
- [ ] I have updated the documentation (if applicable).

RELNOTES: The remote repo contents cache no longer caches or restores repos with cross-repo symlinks, thus avoiding a large surface area for bugs. The effort to reenable this support is tracked by bazelbuild#30160.

Closes bazelbuild#30161.

PiperOrigin-RevId: 944468477
Change-Id: I4a435beaadb7c2df3e11acd910814736d2fb32c0
iancha1992 pushed a commit to iancha1992/bazel that referenced this pull request Jul 14, 2026
…ontents cache (bazelbuild#30252)

This is meant as a temporary stopgap for the many symlink-related issues
found with the remote repo contents cache and includes tests found while
debugging bazelbuild#30149.

The new and old tests are parameterized in a test suite variable to keep
the diff small and enable future experimentation with improved symlink
support. As part of bazelbuild#30160, I'll investigate a more conceptual approach
to symlink resolution that unifies the logic with that in
RemoteActionFileSystem.

8.x adaptation: `RepositoryUtils` doesn't exist on 8.x, so the
`replantSymlinks` changes are applied to
`RepositoryFunction#replantSymlinks`, where this method lives on the
release branch (see bazelbuild#30034). All other changes apply as is.

Fixes bazelbuild#30149.

RELNOTES: The remote repo contents cache no longer caches or restores
repos with cross-repo symlinks, thus avoiding a large surface area for
bugs. The effort to reenable this support is tracked by
bazelbuild#30160.

Closes bazelbuild#30161.

PiperOrigin-RevId: 944468477
Change-Id: I4a435beaadb7c2df3e11acd910814736d2fb32c0
(cherry picked from commit e65fe06)
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.

Remote repo contents cache fails on symlinks into materialized repositories

3 participants