Fail the build before calling bootstrap if LOAS credentials are missing.
The build currently waits for bootstrap to return an error before failing. This means if the user does not have LOAS credentials, they will need to wait for boostrap to attempt to start reproxy (~10s) and the gcert timeout time (5-10s), which will take ~20s to return an error and fail the build. Test: - Ran m with no gcert and build failed in 2s - Ran RBE_use_google_prod_creds=false RBE_use_external_auth_token=false RBE_use_application_default_credentials=true m with no gcert and reproxy started Bug: b/251425073 Change-Id: Id7fe3d6095f083643aaf0ab8f32a34b7961c61e8
This commit is contained in:
@@ -94,6 +94,9 @@ func cleanupRBELogsDir(ctx Context, config Config) {
|
||||
}
|
||||
|
||||
func startRBE(ctx Context, config Config) {
|
||||
if !config.GoogleProdCredsExist() && prodCredsAuthType(config) {
|
||||
ctx.Fatalf("Unable to start RBE reproxy\nFAILED: Missing LOAS credentials.")
|
||||
}
|
||||
ctx.BeginTrace(metrics.RunSetupTool, "rbe_bootstrap")
|
||||
defer ctx.EndTrace()
|
||||
|
||||
|
Reference in New Issue
Block a user