Skip to content

[9.0.1] Introduce RunfilesProxyArtifactValue.#28516

Merged
iancha1992 merged 1 commit intobazelbuild:release-9.0.1from
bazel-io:cp28330-9.0.1
Feb 4, 2026
Merged

[9.0.1] Introduce RunfilesProxyArtifactValue.#28516
iancha1992 merged 1 commit intobazelbuild:release-9.0.1from
bazel-io:cp28330-9.0.1

Conversation

@bazel-io
Copy link
Member

@bazel-io bazel-io commented Feb 4, 2026

This specialization of FileArtifactValue is now returned by RunfilesArtifactValue.getMetadata(), thereby ensuring that the metadata is of directory type. This is required for it to be handled correctly by the BEP.

This is intended to be a low-risk targeted fix to be cherry-picked into 9.x. It leaves a couple of open questions to be addressed:

  • Should RunfilesArtifactValue itself implement FileArtifactValue and avoid the extra indirection? (The impact on memory usage is unclear.)

  • Should the SpecialArtifact for a runfiles tree also return true from isDirectory()? (It may require fixing callers that only expect it to return true for tree artifacts and filesets.)

Fixes #28330.

PiperOrigin-RevId: 865346372
Change-Id: I49c897ca444547b077c1d471b7ac670bd83bae34

Commit 952aabb

This specialization of FileArtifactValue is now returned by RunfilesArtifactValue.getMetadata(), thereby ensuring that the metadata is of directory type. This is required for it to be handled correctly by the BEP.

This is intended to be a low-risk targeted fix to be cherry-picked into 9.x. It leaves a couple of open questions to be addressed:

* Should RunfilesArtifactValue itself implement FileArtifactValue and avoid the extra indirection? (The impact on memory usage is unclear.)

* Should the SpecialArtifact for a runfiles tree also return true from isDirectory()? (It may require fixing callers that only expect it to return true for tree artifacts and filesets.)

Fixes bazelbuild#28330.

PiperOrigin-RevId: 865346372
Change-Id: I49c897ca444547b077c1d471b7ac670bd83bae34
@bazel-io bazel-io requested a review from a team as a code owner February 4, 2026 12:51
@bazel-io bazel-io added team-Remote-Exec Issues and PRs for the Execution (Remote) team awaiting-review PR is awaiting review from an assigned reviewer labels Feb 4, 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 RunfilesProxyArtifactValue, a specialization of FileArtifactValue, to ensure that metadata for runfiles trees is correctly identified as a directory type. This is a targeted fix to address an issue with the Build Event Protocol (BEP). The change is well-implemented, introducing a new private inner class that correctly reports its type as DIRECTORY while being identified by a content digest. The related changes, including renaming createProxy to the more specific createRunfilesProxy and updating a test to use a more appropriate method, are also correct and improve code clarity. The changes are clean, minimal, and effectively solve the stated problem. The implementation is solid and I have no concerns.

@iancha1992 iancha1992 enabled auto-merge February 4, 2026 18:40
@iancha1992 iancha1992 requested a review from tjgq February 4, 2026 18:40
@iancha1992 iancha1992 added this pull request to the merge queue Feb 4, 2026
Merged via the queue into bazelbuild:release-9.0.1 with commit c04080d Feb 4, 2026
46 checks passed
@github-actions github-actions bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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