Skip to content

executor: reject actions requesting a non-Linux OSFamily - #52

Merged
dzbarsky merged 1 commit into
hermeticbuild:mainfrom
JSGette:reject-non-linux-os-family
Oct 19, 2026
Merged

dzbarsky merged 1 commit into
hermeticbuild:mainfrom
JSGette:reject-non-linux-os-family

Conversation

@JSGette

@JSGette JSGette commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

actiond only runs Linux actions, but it ignored the standard REAPI OSFamily platform property. An action routed to actiond with OSFamily=macos (for example from a mixed Linux/macOS Bazel build) was accepted and then failed at exec inside the Linux guest.

This rejects such actions right after the execution platform is resolved, before input validation or any sandbox setup, and reports them as a completed operation with FAILED_PRECONDITION and a readable message (same path as SandboxSetupFailed and timeouts), instead of a late exec failure.

  • Matching is case-insensitive: the platform lexicon value is linux, but many client configs send Linux, and those work today.
  • Actions without OSFamily, or with an empty value, are unaffected.

Testing

  • bazel test //src:unit_tests on macOS arm64 (210/210), including:
    • validateOsFamily accepts Linux and rejects other OS families
    • executeDecodedActionWithOptions rejects non-Linux OSFamily before creating directories
    • the extended execution infrastructure failures become uncached completed operations mapping test
  • Not run: full bazel build //... / bazel test //... (needs --config=remote) and tools/e2e.sh vm.

actiond only runs Linux actions, but it ignored the standard REAPI OSFamily
platform property. An action routed to actiond with OSFamily=macos was
accepted and then failed at exec inside the Linux guest.

Reject such actions before any sandbox setup with a FAILED_PRECONDITION
ExecuteResponse. Matching is case-insensitive because clients commonly send
"Linux" rather than the lexicon value "linux"; actions without OSFamily are
unaffected.
@dzbarsky
dzbarsky merged commit 430aefe into hermeticbuild:main Oct 19, 2026
0 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants