Skip to content

Conversation

@Wyverald
Copy link
Member

@Wyverald Wyverald commented Jan 8, 2026

Ensures that files under repo contents cache entries are not reported as missing after the cache has been deleted while the Bazel server is running. See the long comment in RepositoryFetchFunction for why this happens and how it is fixed.

Fixes #26450

Closes #28147.

PiperOrigin-RevId: 853622194
Change-Id: Ifba953b72258030e0a640ac49947ac5c5fc7620a

Ensures that files under repo contents cache entries are not reported as missing after the cache has been deleted while the Bazel server is running. See the long comment in `RepositoryFetchFunction` for why this happens and how it is fixed.

Fixes #26450

Closes #28147.

PiperOrigin-RevId: 853622194
Change-Id: Ifba953b72258030e0a640ac49947ac5c5fc7620a
@Wyverald Wyverald requested a review from a team as a code owner January 8, 2026 16:20
@github-actions github-actions bot added team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. awaiting-review PR is awaiting review from an assigned reviewer labels Jan 8, 2026
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a crucial fix for FileValue staleness in the repo contents cache, particularly when the cache is deleted while the Bazel server is running. The changes involve transitioning from FileValue to FileStateValue for cache entries and introducing a new REPO_CONTENTS_CACHE_DIRS file type to correctly handle the lifecycle of these directories within Skyframe. The propagation of the repoContentsCachePathSupplier across various components is well-implemented, ensuring the new logic is consistently applied. The detailed comments in RepositoryFetchFunction and ExternalFilesHelper provide excellent context and justification for the technical decisions made. New Python tests have been added to specifically validate the cache deletion scenario, which is a strong point of this PR. However, there is a TODO in one of the Python tests indicating an unintended behavior related to a Skyframe cycle, which needs to be addressed.

@iancha1992 iancha1992 added this pull request to the merge queue Jan 8, 2026
Merged via the queue into release-9.0.0 with commit af0a432 Jan 8, 2026
49 checks passed
@github-actions github-actions bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Jan 8, 2026
@Wyverald Wyverald deleted the wyv-900-7019132 branch January 8, 2026 19:51
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants