Skip to content

Skip strategies incompatible with path mapping during resolution#25430

Closed
fmeum wants to merge 14 commits intobazelbuild:masterfrom
fmeum:can-exec-sandboxed
Closed

Skip strategies incompatible with path mapping during resolution#25430
fmeum wants to merge 14 commits intobazelbuild:masterfrom
fmeum:can-exec-sandboxed

Conversation

@fmeum
Copy link
Copy Markdown
Collaborator

@fmeum fmeum commented Mar 1, 2025

Spawn strategies that aren't sandboxed are now skipped while resolving a strategy for a path mapped spawn, which allows non-sandboxed strategies to be listed first and also results in a better error message if no compatible strategy is available (instead of an obscure exec failure).

Worker execution is special in that it can always sandbox if needed, but may not do so based on options. For this purpose, path mapped spawns are now treated just like dynamically executed spawns by forcing sandboxing.

In the future, the same mechanism can potentially be used to run spawns for rewound actions in Bazel, which must not delete or override their previous outputs.

Work towards #22658 (comment)
Fixes bazel-contrib/rules_go#4366

@fmeum fmeum marked this pull request as ready for review March 1, 2025 14:11
@fmeum fmeum force-pushed the can-exec-sandboxed branch from f89ad1d to 3003045 Compare March 1, 2025 14:11
@fmeum fmeum requested a review from tjgq March 1, 2025 14:11
@github-actions github-actions bot added team-Performance Issues for Performance teams team-Local-Exec Issues and PRs for the Execution (Local) team awaiting-review PR is awaiting review from an assigned reviewer labels Mar 1, 2025
@fmeum
Copy link
Copy Markdown
Collaborator Author

fmeum commented Mar 8, 2025

@bazel-io fork 8.2.0

@fmeum fmeum force-pushed the can-exec-sandboxed branch from e5e71f5 to e91d2b3 Compare March 13, 2025 08:15
@fmeum fmeum requested a review from tjgq March 13, 2025 08:15
@fmeum fmeum force-pushed the can-exec-sandboxed branch from e91d2b3 to 60fa563 Compare March 13, 2025 15:39
@fmeum
Copy link
Copy Markdown
Collaborator Author

fmeum commented Mar 13, 2025

I fixed the CI failures.

fmeum added 3 commits June 1, 2025 10:18
Spawn strategies that aren't sandboxed are now skipped while resolving a strategy for a path mapped spawn, which allows non-sandboxed strategies to be listed first and also results in a better error message if no compatible strategy is available (instead of an obscure exec failure).
@fmeum fmeum force-pushed the can-exec-sandboxed branch from 04603a8 to b165312 Compare June 1, 2025 08:22
@fmeum fmeum force-pushed the can-exec-sandboxed branch from b165312 to 72f388a Compare June 1, 2025 08:26
@fmeum fmeum requested a review from tjgq June 1, 2025 09:45
@fmeum
Copy link
Copy Markdown
Collaborator Author

fmeum commented Jul 15, 2025

@bazel-io fork 8.4.0

@tjgq tjgq added awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally and removed awaiting-review PR is awaiting review from an assigned reviewer labels Jul 16, 2025
@github-actions github-actions bot removed the awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally label Jul 17, 2025
bazel-io pushed a commit to bazel-io/bazel that referenced this pull request Jul 17, 2025
Spawn strategies that aren't sandboxed are now skipped while resolving a strategy for a path mapped spawn, which allows non-sandboxed strategies to be listed first and also results in a better error message if no compatible strategy is available (instead of an obscure exec failure).

Worker execution is special in that it can always sandbox if needed, but may not do so based on options. For this purpose, path mapped spawns are now treated just like dynamically executed spawns by forcing sandboxing.

In the future, the same mechanism can potentially be used to run spawns for rewound actions in Bazel, which must not delete or override their previous outputs.

Work towards bazelbuild#22658 (comment)
Fixes bazel-contrib/rules_go#4366

Closes bazelbuild#25430.

PiperOrigin-RevId: 784040555
Change-Id: I26e110801ce84c41aef5f3e03e34879c595ebedf
github-merge-queue bot pushed a commit that referenced this pull request Jul 17, 2025
…ion (#26563)

Spawn strategies that aren't sandboxed are now skipped while resolving a
strategy for a path mapped spawn, which allows non-sandboxed strategies
to be listed first and also results in a better error message if no
compatible strategy is available (instead of an obscure exec failure).

Worker execution is special in that it can always sandbox if needed, but
may not do so based on options. For this purpose, path mapped spawns are
now treated just like dynamically executed spawns by forcing sandboxing.

In the future, the same mechanism can potentially be used to run spawns
for rewound actions in Bazel, which must not delete or override their
previous outputs.

Work towards
#22658 (comment)
Fixes bazel-contrib/rules_go#4366

Closes #25430.

PiperOrigin-RevId: 784040555
Change-Id: I26e110801ce84c41aef5f3e03e34879c595ebedf

Commit
a42c981

Co-authored-by: Fabian Meumertzheim <[email protected]>
@fmeum fmeum deleted the can-exec-sandboxed branch August 5, 2025 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-Local-Exec Issues and PRs for the Execution (Local) team team-Performance Issues for Performance teams

Projects

None yet

Development

Successfully merging this pull request may close these issues.

stdlib build on Windows fails with pathmapping enabled

3 participants