Skip to content

[9.3.0] Add resource_set to map_directory (https://github.com/bazelbuild/baze… - #30906

Closed
iancha1992 wants to merge 2 commits into
bazelbuild:release-9.3.0from
iancha1992:cp30589
Closed

iancha1992 wants to merge 2 commits into
bazelbuild:release-9.3.0from
iancha1992:cp30589

Conversation

@iancha1992

@iancha1992 iancha1992 commented Aug 27, 2026 •

Copy link
Copy Markdown
Member

…l/pull/30577)

This allows setting the resource requests for every nested action created by the map_directory lambda

Closes #30577.

PiperOrigin-RevId: 961950045
Change-Id: I2c780e50c695a2cc314c5841ba13a21d1ae502bc

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 d5348b3 and 6ac8c84

This allows setting the resource requests for every nested action
created by the map_directory lambda

Closes bazelbuild#30577.

PiperOrigin-RevId: 961950045
Change-Id: I2c780e50c695a2cc314c5841ba13a21d1ae502bc
@iancha1992
iancha1992 requested review from dabanki and meisterT August 27, 2026 21:34
@iancha1992
iancha1992 requested a review from a team as a code owner August 27, 2026 21:34
@iancha1992 iancha1992 added team-Configurability platforms, toolchains, cquery, select(), config transitions team-Starlark-Integration Issues involving Bazel's integration with Starlark, excluding builtin symbols awaiting-review PR is awaiting review from an assigned reviewer team-Rules-API API for writing rules/aspects: providers, runfiles, actions, artifacts labels Aug 27, 2026
Previously this only allowed a top level starlark function. Now users
still can't pass lambdas but they can pass pre-computed dictionaries
with the relevant elements. This is useful since at the action creation
time the rule author can very likely know these ballpark resource
requests, but they don't have all the context from a top level function.

Fixes bazelbuild#15187

Closes bazelbuild#29285.

PiperOrigin-RevId: 947146946
Change-Id: I667042b7266efbfe29ca503a64a8a87a37c39bbb
@meisterT

Copy link
Copy Markdown
Member

@keith the test failures look related

"output_dir": output_dir,
},
tools = {
"cat_tool": ctx.attr.cat_tool.files_to_run,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@keith @meisterT
Should we change this to "tool": ctx.attr.tool.files_to_run,??

@keith

keith commented Aug 28, 2026

Copy link
Copy Markdown
Member

#30916

@iancha1992 iancha1992 closed this Aug 28, 2026
auto-merge was automatically disabled August 28, 2026 21:40

Pull request was closed

@github-actions github-actions Bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-Configurability platforms, toolchains, cquery, select(), config transitions team-Rules-API API for writing rules/aspects: providers, runfiles, actions, artifacts team-Starlark-Integration Issues involving Bazel's integration with Starlark, excluding builtin symbols

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants