[ARVADOS] updated: 1.3.0-3253-gfa78e264e

Git user git at public.arvados.org
Thu Oct 1 23:44:30 UTC 2020


Summary of changes:
 lib/dispatchcloud/test/queue.go |  9 ++++-----
 sdk/go/keepclient/keepclient.go |  6 ++----
 services/keep-web/cache.go      | 13 ++++++-------
 services/keepstore/volume.go    |  3 +--
 4 files changed, 13 insertions(+), 18 deletions(-)

       via  fa78e264ef585f02348f4f5c0a7183746a708a8f (commit)
      from  cabf89d1fd8b40a2624d101a95c6587bfdd91fed (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 fa78e264ef585f02348f4f5c0a7183746a708a8f
Author: Ward Vandewege <ward at curii.com>
Date:   Thu Oct 1 19:44:14 2020 -0400

    Fix more golint warnings.
    
    No issue #
    
    Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward at curii.com>

diff --git a/lib/dispatchcloud/test/queue.go b/lib/dispatchcloud/test/queue.go
index 8a8f686e1..3598ec6da 100644
--- a/lib/dispatchcloud/test/queue.go
+++ b/lib/dispatchcloud/test/queue.go
@@ -172,12 +172,11 @@ func (q *Queue) Notify(upd arvados.Container) bool {
 			if allowContainerUpdate[ctr.State][upd.State] {
 				q.Containers[i] = upd
 				return true
-			} else {
-				if q.Logger != nil {
-					q.Logger.WithField("ContainerUUID", ctr.UUID).Infof("test.Queue rejected update from %s to %s", ctr.State, upd.State)
-				}
-				return false
 			}
+			if q.Logger != nil {
+				q.Logger.WithField("ContainerUUID", ctr.UUID).Infof("test.Queue rejected update from %s to %s", ctr.State, upd.State)
+			}
+			return false
 		}
 	}
 	q.Containers = append(q.Containers, upd)
diff --git a/sdk/go/keepclient/keepclient.go b/sdk/go/keepclient/keepclient.go
index 13f8f9577..8eff377ce 100644
--- a/sdk/go/keepclient/keepclient.go
+++ b/sdk/go/keepclient/keepclient.go
@@ -492,9 +492,8 @@ func (kc *KeepClient) getSortedRoots(locator string) []string {
 func (kc *KeepClient) cache() *BlockCache {
 	if kc.BlockCache != nil {
 		return kc.BlockCache
-	} else {
-		return DefaultBlockCache
 	}
+	return DefaultBlockCache
 }
 
 func (kc *KeepClient) ClearBlockCache() {
@@ -575,9 +574,8 @@ var reqIDGen = httpserver.IDGenerator{Prefix: "req-"}
 func (kc *KeepClient) getRequestID() string {
 	if kc.RequestID != "" {
 		return kc.RequestID
-	} else {
-		return reqIDGen.Next()
 	}
+	return reqIDGen.Next()
 }
 
 type Locator struct {
diff --git a/services/keep-web/cache.go b/services/keep-web/cache.go
index 2ff2136ed..5400f694f 100644
--- a/services/keep-web/cache.go
+++ b/services/keep-web/cache.go
@@ -224,13 +224,12 @@ func (c *cache) Get(arv *arvadosclient.ArvadosClient, targetID string, forceRelo
 				})
 			}
 			return collection, err
-		} else {
-			// PDH changed, but now we know we have
-			// permission -- and maybe we already have the
-			// new PDH in the cache.
-			if coll := c.lookupCollection(arv.ApiToken + "\000" + current.PortableDataHash); coll != nil {
-				return coll, nil
-			}
+		}
+		// PDH changed, but now we know we have
+		// permission -- and maybe we already have the
+		// new PDH in the cache.
+		if coll := c.lookupCollection(arv.ApiToken + "\000" + current.PortableDataHash); coll != nil {
+			return coll, nil
 		}
 	}
 
diff --git a/services/keepstore/volume.go b/services/keepstore/volume.go
index 5a277b600..4d8a0aec7 100644
--- a/services/keepstore/volume.go
+++ b/services/keepstore/volume.go
@@ -353,9 +353,8 @@ func (vm *RRVolumeManager) Mounts() []*VolumeMount {
 func (vm *RRVolumeManager) Lookup(uuid string, needWrite bool) *VolumeMount {
 	if mnt, ok := vm.mountMap[uuid]; ok && (!needWrite || !mnt.ReadOnly) {
 		return mnt
-	} else {
-		return nil
 	}
+	return nil
 }
 
 // AllReadable returns an array of all readable volumes

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list