Skip to content

Conversation

@fmeum
Copy link
Collaborator

@fmeum fmeum commented Jan 9, 2026

Fixes #27517 by checking Skyframe deps in batches that stop right before any dep that may cause a cycle if checked while previous deps are out-of-date. The same batching is applied to module extensions, which suffer from the same issue as demonstrated with a new test.

This is accompanied by a restructuring of RepoRecordedInput that consolidates all Skyframe logic associated with the computation of the corresponding value exclusively within that class. This will also be helpful in adding support for dynamic inputs to the remote repo contents cache in future work.

Also made the entirety of RepositoryFetchFunction use skyframe workers, so that checking the up-to-dateness of local repo contents cache entries isn't quadratic.

@fmeum fmeum force-pushed the local-repo-cache-fix branch from 71336e0 to 7c17c93 Compare January 9, 2026 22:29
@fmeum fmeum requested a review from Wyverald January 9, 2026 22:40
@fmeum fmeum changed the title WIP Fix cycles when checking the local repo contents cache Jan 10, 2026
@fmeum fmeum marked this pull request as ready for review January 10, 2026 06:25
@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 10, 2026
@fmeum
Copy link
Collaborator Author

fmeum commented Jan 10, 2026

@bazel-io fork 9.0.0

@fmeum fmeum requested a review from Wyverald January 11, 2026 18:13
@fmeum fmeum requested a review from Wyverald January 12, 2026 05:10
@fmeum
Copy link
Collaborator Author

fmeum commented Jan 12, 2026

@meteorcloudy I noticed that module extensions are affected as well after @Wyverald's review and import and pushed the analogous test and fix. Feel free to ignore and work with the imported CL if those changes come too late.

@github-actions github-actions bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Jan 12, 2026
bazel-io pushed a commit to bazel-io/bazel that referenced this pull request Jan 12, 2026
Fixes bazelbuild#27517 by checking Skyframe deps in batches that stop right before any dep that may cause a cycle if checked while previous deps are out-of-date.

This is accompanied by a restructuring of `RepoRecordedInput` that consolidates all Skyframe logic associated with the computation of the corresponding value exclusively within that class. This will also be helpful in adding support for dynamic inputs to the remote repo contents cache in future work.

Also made the entirety of `RepositoryFetchFunction` use skyframe workers, so that checking the up-to-dateness of local repo contents cache entries isn't quadratic.

Closes bazelbuild#28206.

Co-authored-by: Xudong Yang <[email protected]>
PiperOrigin-RevId: 855252657
Change-Id: Ica18760ae79da5155fc0f3d8cd4f24c52a034c86
github-merge-queue bot pushed a commit that referenced this pull request Jan 12, 2026
Fixes #27517 by checking Skyframe deps in batches that stop right before
any dep that may cause a cycle if checked while previous deps are
out-of-date.

This is accompanied by a restructuring of `RepoRecordedInput` that
consolidates all Skyframe logic associated with the computation of the
corresponding value exclusively within that class. This will also be
helpful in adding support for dynamic inputs to the remote repo contents
cache in future work.

Also made the entirety of `RepositoryFetchFunction` use skyframe
workers, so that checking the up-to-dateness of local repo contents
cache entries isn't quadratic.

Closes #28206.

Co-authored-by: Xudong Yang <[email protected]>
PiperOrigin-RevId: 855252657
Change-Id: Ica18760ae79da5155fc0f3d8cd4f24c52a034c86

Commit
72a25a9

Co-authored-by: Fabian Meumertzheim <[email protected]>
Co-authored-by: Xudong Yang <[email protected]>
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.

Repository up-to-dateness checks can result in Skyframe cycles

2 participants