pantsbuild / pants

The Pants Build System
https://www.pantsbuild.org
Apache License 2.0
3.19k stars 613 forks source link

Pass through remote execution platform in Rust codebase via options #21104

Open krishnan-chandra opened 1 week ago

krishnan-chandra commented 1 week ago

Partial solve for https://github.com/pantsbuild/pants/issues/21016.

The remote execution platform was previously hardcoded to be Linux x86. This change allows passing through a new setting called remote_execution_platform containing a platform string; it requires that server be set as well to ensure that it is only used with remote execution, and defaults to Linux x86 to retain backwards compatibility.

This still needs some work on the rule/execution side to actually pass this setting through when the remote environment has a platform set.

lilatomic commented 1 week ago

Someone who knows something about Rust dev and the REAPI should probably weigh in instead of me, but it looks good. Do we know if there's a test that covers this? Maybe all the REAPI tests do, since specifying the correct value means that everything continues to work correctly?