SdkService/BuildSdkToolchain: Run inside chroot
This CL compiles protos to incorporate the method_assert_inside, and it
rejiggers the method implementation to actually run in the chroot.
See infra/proto CL: https://crrev.com/c/4647432
Ultimately this causes the API router to extract the modified files into
the result_path.
BUG=b:250021798
TEST=./run_tests
TEST=Run the endpoint via `bin/build_api`, watch it succeed, rejoice in
the output proto reporting generated files in the result_path as
expected, double-check that the files are there.
Cq-Depend: chromium:4647432
Change-Id: I424027139d819d424c8095c5a44000bc720c4917
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/4646285
Commit-Queue: Alex Klein <saklein@chromium.org>
Reviewed-by: Alex Klein <saklein@chromium.org>
Tested-by: Greg Edelston <gredelston@google.com>
Auto-Submit: Greg Edelston <gredelston@google.com>
diff --git a/api/controller/sdk.py b/api/controller/sdk.py
index 4837967..f0d9704 100644
--- a/api/controller/sdk.py
+++ b/api/controller/sdk.py
@@ -307,13 +307,11 @@
@faux.all_empty
-@validate.require("chroot")
@validate.validation_complete
def BuildSdkToolchain(input_proto, output_proto, _config):
"""Build cross-compiler packages for the SDK."""
- chroot = controller_util.ParseChroot(input_proto.chroot)
extra_env: Dict[str, str] = {}
if input_proto.use_flags:
extra_env["USE"] = " ".join(use.flag for use in input_proto.use_flags)
- generated_files = sdk.BuildSdkToolchain(chroot, extra_env=extra_env)
+ generated_files = sdk.BuildSdkToolchain(extra_env=extra_env)
output_proto.generated_files.extend(generated_files)