[ARVADOS] updated: 2.1.0-660-ge758989eb

Git user git at public.arvados.org
Thu Apr 15 21:23:41 UTC 2021


Summary of changes:
 sdk/go/keepclient/keepclient.go | 6 ++++++
 1 file changed, 6 insertions(+)

       via  e758989ebd80f3365baa56be2079d72e286c9cf5 (commit)
      from  d6c8a79b073cb000c7914e3ef07bf4d95350ae4f (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 e758989ebd80f3365baa56be2079d72e286c9cf5
Author: Ward Vandewege <ward at curii.com>
Date:   Thu Apr 15 17:20:02 2021 -0400

    17530: fail immediately in MakeKeepClient() when the api server address
           (or token) is unset. If we wait for discoverServices() to return
    the error we take 6s to time out in the New() call, which also tries to
    get the discovery document. Leave the check in discoverServices() in
    place, since that function is called from a few other exported
    functions.
    
    Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward at curii.com>

diff --git a/sdk/go/keepclient/keepclient.go b/sdk/go/keepclient/keepclient.go
index 454181265..7dfa2c4f8 100644
--- a/sdk/go/keepclient/keepclient.go
+++ b/sdk/go/keepclient/keepclient.go
@@ -122,6 +122,12 @@ 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