[ARVADOS] updated: 2.1.0-1514-g26672f051

Git user git at public.arvados.org
Tue Nov 2 21:11:39 UTC 2021


Summary of changes:
 lib/controller/localdb/conn.go | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

       via  26672f05143c44b5c2d299b1eddfa14656e0e77e (commit)
      from  3849d76f2cb20f57b4b7e3d42b23c81406fbca43 (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 26672f05143c44b5c2d299b1eddfa14656e0e77e
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date:   Tue Nov 2 17:03:49 2021 -0300

    17944: Makes returning an empty Vocabulary also include an empty "tags".
    
    ...instead of returning "tags":null which makes workbench2's code to fail.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>

diff --git a/lib/controller/localdb/conn.go b/lib/controller/localdb/conn.go
index edbbcb09c..9d1aa5362 100644
--- a/lib/controller/localdb/conn.go
+++ b/lib/controller/localdb/conn.go
@@ -126,7 +126,9 @@ func (conn *Conn) loadVocabularyFile() error {
 // VocabularyGet refreshes the vocabulary cache if necessary and returns it.
 func (conn *Conn) VocabularyGet(ctx context.Context) (arvados.Vocabulary, error) {
 	if conn.cluster.API.VocabularyPath == "" {
-		return arvados.Vocabulary{}, nil
+		return arvados.Vocabulary{
+			Tags: map[string]arvados.VocabularyTag{},
+		}, nil
 	}
 	logger := ctxlog.FromContext(ctx)
 	if conn.vocabularyCache == nil {
@@ -134,7 +136,9 @@ func (conn *Conn) VocabularyGet(ctx context.Context) (arvados.Vocabulary, error)
 		err := conn.loadVocabularyFile()
 		if err != nil {
 			logger.WithError(err).Error("error loading vocabulary file")
-			return arvados.Vocabulary{}, err
+			return arvados.Vocabulary{
+				Tags: map[string]arvados.VocabularyTag{},
+			}, err
 		}
 		go watchVocabulary(logger, conn.cluster.API.VocabularyPath, func() {
 			logger.Info("vocabulary file changed, it'll be reloaded next time it's needed")

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list