[ARVADOS] updated: 2.1.0-661-gba87b0cb0

Git user git at public.arvados.org
Fri Apr 16 15:16:07 UTC 2021


Summary of changes:
 sdk/go/arvadosclient/arvadosclient.go | 3 +++
 sdk/go/keepclient/discover.go         | 7 -------
 sdk/go/keepclient/keepclient.go       | 6 ------
 3 files changed, 3 insertions(+), 13 deletions(-)

       via  ba87b0cb04e4a7e8e837567d9a6e317f3d5fa0b2 (commit)
      from  e758989ebd80f3365baa56be2079d72e286c9cf5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit ba87b0cb04e4a7e8e837567d9a6e317f3d5fa0b2
Author: Nico Cesar <nico at nicocesar.com>
Date:   Fri Apr 16 11:15:02 2021 -0400

    added check in arvadosClient.CallRaw() if host is missing
    
    This will have a retry logic so 3s * 20 = 60s to fail,
    but it will be explicit why this is happening.
    
    Arvados-DCO-1.1-Signed-off-by: Nico Cesar <nico at curii.com>

diff --git a/sdk/go/arvadosclient/arvadosclient.go b/sdk/go/arvadosclient/arvadosclient.go
index d90c618f7..4c594625e 100644
--- a/sdk/go/arvadosclient/arvadosclient.go
+++ b/sdk/go/arvadosclient/arvadosclient.go
@@ -206,6 +206,9 @@ func (c *ArvadosClient) CallRaw(method string, resourceType string, uuid string,
 	if scheme == "" {
 		scheme = "https"
 	}
+	if c.ApiServer == "" {
+		return nil, fmt.Errorf("Arvados client is not configured (target API host is not set). Maybe env var ARVADOS_API_HOST should be set first?")
+	}
 	u := url.URL{
 		Scheme: scheme,
 		Host:   c.ApiServer}
diff --git a/sdk/go/keepclient/discover.go b/sdk/go/keepclient/discover.go
index fd7832a4e..726c3fb30 100644
--- a/sdk/go/keepclient/discover.go
+++ b/sdk/go/keepclient/discover.go
@@ -138,13 +138,6 @@ 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 {
diff --git a/sdk/go/keepclient/keepclient.go b/sdk/go/keepclient/keepclient.go
index 7dfa2c4f8..454181265 100644
--- a/sdk/go/keepclient/keepclient.go
+++ b/sdk/go/keepclient/keepclient.go
@@ -122,12 +122,6 @@ type KeepClient struct {
 // DiscoverKeepServices(), and returns when the client is ready to
 // use.
 func MakeKeepClient(arv *arvadosclient.ArvadosClient) (*KeepClient, error) {
-	if arv.ApiServer == "" {
-		return nil, fmt.Errorf("API server is not configured. Maybe env var ARVADOS_API_HOST should be set first?")
-	}
-	if arv.ApiToken == "" {
-		return nil, fmt.Errorf("API token is not configured. Maybe env var ARVADOS_API_TOKEN should be set first?")
-	}
 	kc := New(arv)
 	return kc, kc.discoverServices()
 }

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list