[ARVADOS] created: 2.1.0-659-gd6c8a79b0

Git user git at public.arvados.org
Thu Apr 15 16:27:44 UTC 2021


        at  d6c8a79b073cb000c7914e3ef07bf4d95350ae4f (commit)


commit d6c8a79b073cb000c7914e3ef07bf4d95350ae4f
Author: Nico Cesar <nico at nicocesar.com>
Date:   Thu Apr 15 12:26:42 2021 -0400

    discoverServices() checks if we have the service
    
    Now the failure takes 6s (instead of 30s) but is still some time
    
    Arvados-DCO-1.1-Signed-off-by: Nico Cesar <nico at curii.com>

diff --git a/sdk/go/keepclient/discover.go b/sdk/go/keepclient/discover.go
index 726c3fb30..fd7832a4e 100644
--- a/sdk/go/keepclient/discover.go
+++ b/sdk/go/keepclient/discover.go
@@ -138,6 +138,13 @@ func (kc *KeepClient) discoverServices() error {
 		return nil
 	}
 
+	if kc.Arvados.ApiServer == "" {
+		return fmt.Errorf("API server is not configured. Maybe env var ARVADOS_API_HOST should be set first?")
+	}
+	if kc.Arvados.ApiToken == "" {
+		return fmt.Errorf("API token is not configured. Maybe env var ARVADOS_API_TOKEN should be set first?")
+	}
+
 	svcListCacheMtx.Lock()
 	cacheEnt, ok := svcListCache[kc.Arvados.ApiServer]
 	if !ok {

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list