Skip to content

[9.1.0] Support dynamic inputs with the remote repo contents cache#29225

Merged
iancha1992 merged 1 commit intobazelbuild:release-9.1.0from
fmeum:28962-cherry
Apr 7, 2026
Merged

[9.1.0] Support dynamic inputs with the remote repo contents cache#29225
iancha1992 merged 1 commit intobazelbuild:release-9.1.0from
fmeum:28962-cherry

Conversation

@fmeum
Copy link
Copy Markdown
Collaborator

@fmeum fmeum commented Apr 3, 2026

With this change, all reproducible repository rules can now be cached in a disk or remote cache, including those with dependencies recorded dynamically during evaluation.

This is made possible by introducing a new intermediate type of synthetic AC entries. When looking up the predeclared inputs hash for a repo rule with dynamic dependencies, the action result for such an intermediate entry lists one or more sets of inputs (e.g. a particular file in another repo or an environment variable name). These inputs are then requested from Skyframe and their current values are hashed to obtain the key of the next AC entry, which is again either an intermediate entry or a final entry containing the contents of the repository.

RELNOTES: The remote repo contents cache now supports all reproducible repo rules.

Closes #27634.

PiperOrigin-RevId: 889750228
Change-Id: I9c7e4fed9d86432a85a96b3318f6eccc9c0558eb
(cherry picked from commit ffebc5b)

Fixes #28962

With this change, all reproducible repository rules can now be cached in a disk or remote cache, including those with dependencies recorded dynamically during evaluation.

This is made possible by introducing a new intermediate type of synthetic AC entries. When looking up the predeclared inputs hash for a repo rule with dynamic dependencies, the action result for such an intermediate entry lists one or more sets of inputs (e.g. a particular file in another repo or an environment variable name). These inputs are then requested from Skyframe and their current values are hashed to obtain the key of the next AC entry, which is again either an intermediate entry or a final entry containing the contents of the repository.

RELNOTES: The remote repo contents cache now supports all reproducible repo rules.

Closes bazelbuild#27634.

PiperOrigin-RevId: 889750228
Change-Id: I9c7e4fed9d86432a85a96b3318f6eccc9c0558eb
(cherry picked from commit ffebc5b)
@fmeum fmeum marked this pull request as ready for review April 3, 2026 20:24
@fmeum fmeum requested a review from a team as a code owner April 3, 2026 20:24
@github-actions github-actions Bot added team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. team-Rules-Server Issues for serverside rules included with Bazel team-Remote-Exec Issues and PRs for the Execution (Remote) team awaiting-review PR is awaiting review from an assigned reviewer labels Apr 3, 2026
@iancha1992 iancha1992 enabled auto-merge April 3, 2026 20:59
@iancha1992 iancha1992 requested review from Wyverald and tjgq April 3, 2026 20:59
@iancha1992 iancha1992 added this pull request to the merge queue Apr 7, 2026
Merged via the queue into bazelbuild:release-9.1.0 with commit ff56bc1 Apr 7, 2026
47 checks passed
@github-actions github-actions Bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Apr 7, 2026
@fmeum fmeum deleted the 28962-cherry branch April 8, 2026 16:30
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 team-Rules-Server Issues for serverside rules included with Bazel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants