From d7ccde11d6b1f459bdddfd2ab8bc3d3c1ab5bfdf Mon Sep 17 00:00:00 2001 From: Jingwen Chen Date: Wed, 28 Jun 2023 07:19:26 +0000 Subject: [PATCH] Don't use RBE for bp2build/queryview/api_bp2build/json_module_graph, even with USE_RBE=true. These are alternate modes of soong_build that don't use rbe/reclient. This lets us to remove USE_RBE=false from the bp2build run. Test: presubmits Change-Id: I439f9cf7e92ec85ca56baec5f62a83ee49b510d4 --- ui/build/config.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ui/build/config.go b/ui/build/config.go index e6427723d..fb5f7dd58 100644 --- a/ui/build/config.go +++ b/ui/build/config.go @@ -1375,10 +1375,15 @@ func (c *configImpl) StartGoma() bool { } func (c *configImpl) UseRBE() bool { + // These alternate modes of running Soong do not use RBE / reclient. + if c.Bp2Build() || c.Queryview() || c.ApiBp2build() || c.JsonModuleGraph() { + return false + } + authType, _ := c.rbeAuth() // Do not use RBE with prod credentials in scenarios when stubby doesn't exist, since // its unlikely that we will be able to obtain necessary creds without stubby. - if !c.StubbyExists() && strings.Contains(authType, "use_google_prod_creds"){ + if !c.StubbyExists() && strings.Contains(authType, "use_google_prod_creds") { return false } if v, ok := c.Environment().Get("USE_RBE"); ok {