Skip to content

[9.1.0] Prevent template_ctx.run from using map_directory outputs as inputs.#29014

Open
iancha1992 wants to merge 1 commit intobazelbuild:release-9.1.0from
iancha1992:cpe46bed702
Open

[9.1.0] Prevent template_ctx.run from using map_directory outputs as inputs.#29014
iancha1992 wants to merge 1 commit intobazelbuild:release-9.1.0from
iancha1992:cpe46bed702

Conversation

@iancha1992
Copy link
Member

This has the following implications:

  • Internal actions (generated by template_ctx.run()) cannot take both subtrees and their parent tree artifacts as inputs, which might be problematic for remote execution as artifacts are "streamed" (potentially causing the same files from the subtree to be added twice).
  • Ensures encapsulation of the action graph generated by map_directory(). For example, internal actions generated within map_directory(implementation) themselves depending on the output directories of the same map_directory() breaks encapsulation.

PiperOrigin-RevId: 884538235
Change-Id: If6c8f4990dea353460de9bdde5f5abca61f8b5a8

Description

Motivation

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: None

Commit e46bed7

This has the following implications:
- Internal actions (generated by `template_ctx.run()`) cannot take both subtrees and their parent tree artifacts as inputs, which might be problematic for remote execution as artifacts are "streamed" (potentially causing the same files from the subtree to be added twice).
- Ensures encapsulation of the action graph generated by `map_directory()`. For example, internal actions generated within `map_directory(implementation)` themselves depending on the output directories of the same `map_directory()` breaks encapsulation.

PiperOrigin-RevId: 884538235
Change-Id: If6c8f4990dea353460de9bdde5f5abca61f8b5a8
@iancha1992 iancha1992 requested a review from a team as a code owner March 16, 2026 21:59
@github-actions github-actions bot added team-Configurability platforms, toolchains, cquery, select(), config transitions awaiting-review PR is awaiting review from an assigned reviewer labels Mar 16, 2026
@iancha1992 iancha1992 requested a review from tjgq March 16, 2026 22:00
@iancha1992 iancha1992 added team-Remote-Exec Issues and PRs for the Execution (Remote) team and removed team-Configurability platforms, toolchains, cquery, select(), config transitions labels Mar 16, 2026
@iancha1992 iancha1992 added this to the 9.1.0 release blockers milestone Mar 16, 2026
@iancha1992 iancha1992 enabled auto-merge March 16, 2026 22:00
iancha1992 referenced this pull request Mar 16, 2026
This has the following implications:
- Internal actions (generated by `template_ctx.run()`) cannot take both subtrees and their parent tree artifacts as inputs, which might be problematic for remote execution as artifacts are "streamed" (potentially causing the same files from the subtree to be added twice).
- Ensures encapsulation of the action graph generated by `map_directory()`. For example, internal actions generated within `map_directory(implementation)` themselves depending on the output directories of the same `map_directory()` breaks encapsulation.

PiperOrigin-RevId: 884538235
Change-Id: If6c8f4990dea353460de9bdde5f5abca61f8b5a8
@iancha1992
Copy link
Member Author

@tjgq @fmeum Could you please take a look at the CI errors?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-review PR is awaiting review from an assigned reviewer team-Remote-Exec Issues and PRs for the Execution (Remote) team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants