Build API: Begin moving GomaConfig to endpoint arguments.
The goma configs should mostly be an endpoint argument more so
than a chroot attribute. Allow parsing the goma config from an
endpoint request field instead of the chroot message.
This implementation should simply be an addition that uses it when
available. The switch to forcing the use of the endpoint field
instead will be coming later.
BUG=chromium:1038386
TEST=run_tests
Change-Id: I7ba41c8a5f2f5b9976bdb7bb5312ddfe297b7739
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/1984430
Tested-by: Alex Klein <saklein@chromium.org>
Reviewed-by: David Burger <dburger@chromium.org>
Reviewed-by: Michael Mortensen <mmortensen@google.com>
Commit-Queue: Alex Klein <saklein@chromium.org>
diff --git a/api/controller/controller_util.py b/api/controller/controller_util.py
index 4cb84a0..5306f80 100644
--- a/api/controller/controller_util.py
+++ b/api/controller/controller_util.py
@@ -60,9 +60,11 @@
goma = ParseGomaConfig(chroot_message.goma, path) if parse_goma else None
- return Chroot(path=path, cache_dir=cache_dir, chrome_root=chrome_root,
- env=env, goma=goma)
+ chroot = Chroot(
+ path=path, cache_dir=cache_dir, chrome_root=chrome_root, env=env)
+ chroot.goma = goma
+ return chroot
def ParseGomaConfig(goma_message, chroot_path):
"""Parse a goma config message."""