[ARVADOS] updated: 2.1.0-662-g123e39f45
Git user
git at public.arvados.org
Fri Apr 16 15:18:01 UTC 2021
Summary of changes:
sdk/go/keepclient/discover.go | 4 ++++
sdk/go/keepclient/keepclient.go | 3 +++
2 files changed, 7 insertions(+)
via 123e39f45192118a1e84629bf94a3a7db2bd5014 (commit)
from ba87b0cb04e4a7e8e837567d9a6e317f3d5fa0b2 (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 123e39f45192118a1e84629bf94a3a7db2bd5014
Author: Nico Cesar <nico at nicocesar.com>
Date: Fri Apr 16 11:16:50 2021 -0400
added check KeepClient.discoverServices() to make it fail faster
This commit shows a faster fail, but according to
https://dev.arvados.org/issues/17530#note-11 is not what we want. Or do
we?
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..5eafbbe33 100644
--- a/sdk/go/keepclient/discover.go
+++ b/sdk/go/keepclient/discover.go
@@ -138,6 +138,10 @@ func (kc *KeepClient) discoverServices() error {
return nil
}
+ if kc.Arvados.ApiServer == "" {
+ return fmt.Errorf("Arvados client is not configured (target API host is not set). Maybe env var ARVADOS_API_HOST 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 454181265..d92e8886f 100644
--- a/sdk/go/keepclient/keepclient.go
+++ b/sdk/go/keepclient/keepclient.go
@@ -122,6 +122,9 @@ 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("Arvados client is not configured (target API host is not set). Maybe env var ARVADOS_API_HOST should be set first?")
+ }
kc := New(arv)
return kc, kc.discoverServices()
}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list