[arvados] created: 2.6.0-424-g49c153fed

git repository hosting git at public.arvados.org
Wed Aug 2 20:47:04 UTC 2023


        at  49c153fed482e6911333d984ce88bdec1a426396 (commit)


commit 49c153fed482e6911333d984ce88bdec1a426396
Author: Tom Clegg <tom at curii.com>
Date:   Wed Aug 2 16:11:11 2023 -0400

    20735: Update Go to 1.20.6.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>

diff --git a/go.mod b/go.mod
index 7931bb4f5..d7bb5768e 100644
--- a/go.mod
+++ b/go.mod
@@ -15,7 +15,7 @@ require (
 	github.com/coreos/go-oidc/v3 v3.5.0
 	github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e
 	github.com/creack/pty v1.1.18
-	github.com/docker/docker v24.0.2+incompatible
+	github.com/docker/docker v24.0.5+incompatible
 	github.com/dustin/go-humanize v1.0.0
 	github.com/fsnotify/fsnotify v1.4.9
 	github.com/ghodss/yaml v1.0.0
diff --git a/go.sum b/go.sum
index 629c8dbb0..7f71b206d 100644
--- a/go.sum
+++ b/go.sum
@@ -83,8 +83,8 @@ github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI=
 github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ=
 github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8=
 github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
-github.com/docker/docker v24.0.2+incompatible h1:eATx+oLz9WdNVkQrr0qjQ8HvRJ4bOOxfzEo8R+dA3cg=
-github.com/docker/docker v24.0.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
+github.com/docker/docker v24.0.5+incompatible h1:WmgcE4fxyI6EEXxBRxsHnZXrO1pQ3smi0k/jho4HLeY=
+github.com/docker/docker v24.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
 github.com/docker/go-connections v0.3.0 h1:3lOnM9cSzgGwx8VfK/NGOW5fLQ0GjIlCkaktF+n1M6o=
 github.com/docker/go-connections v0.3.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
 github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw=
diff --git a/lib/install/deps.go b/lib/install/deps.go
index 2eaad1f63..4500d89f8 100644
--- a/lib/install/deps.go
+++ b/lib/install/deps.go
@@ -30,7 +30,7 @@ import (
 
 var Command cmd.Handler = &installCommand{}
 
-const goversion = "1.20.5"
+const goversion = "1.20.6"
 
 const (
 	rubyversion             = "2.7.7"

commit 3c1de8915ddc274136786e35dd3fecd0495f5e84
Author: Tom Clegg <tom at curii.com>
Date:   Wed Jul 12 11:35:48 2023 -0400

    20735: Update ruby and singularity.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>

diff --git a/lib/install/deps.go b/lib/install/deps.go
index fa79cad6a..2eaad1f63 100644
--- a/lib/install/deps.go
+++ b/lib/install/deps.go
@@ -33,15 +33,15 @@ var Command cmd.Handler = &installCommand{}
 const goversion = "1.20.5"
 
 const (
-	rubyversion             = "2.7.6"
+	rubyversion             = "2.7.7"
 	bundlerversion          = "2.2.19"
-	singularityversion      = "3.9.9"
+	singularityversion      = "3.10.4"
 	pjsversion              = "1.9.8"
 	geckoversion            = "0.24.0"
 	gradleversion           = "5.3.1"
 	nodejsversion           = "v12.22.12"
 	devtestDatabasePassword = "insecure_arvados_test"
-	workbench2version       = "e30e54d674c95ee15e296c71e471c1555bdc5a38" // 2.4.3
+	workbench2version       = "9a62117dbe56bdfa42489415eb6696638c2bb336" // 2.6.3
 )
 
 //go:embed arvados.service
@@ -360,7 +360,7 @@ S=`+singularityversion+`
 tmp=/var/lib/arvados/tmp/singularity
 trap "rm -r ${tmp}" ERR EXIT
 cd /var/lib/arvados/tmp
-git clone https://github.com/sylabs/singularity
+git clone --recurse-submodules https://github.com/sylabs/singularity
 cd singularity
 git checkout v${S}
 ./mconfig --prefix=/var/lib/arvados

commit bac58f7cf76f347f4eeb5e2436412e5ccbdebf7f
Author: Tom Clegg <tom at curii.com>
Date:   Wed Jul 12 11:34:45 2023 -0400

    20735: Update to go 1.20.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>

diff --git a/lib/cmd/cmd.go b/lib/cmd/cmd.go
index a03cb90f6..3d4092e6b 100644
--- a/lib/cmd/cmd.go
+++ b/lib/cmd/cmd.go
@@ -55,12 +55,12 @@ func (versionCommand) RunCommand(prog string, args []string, stdin io.Reader, st
 //
 // Example:
 //
-//     os.Exit(Multi(map[string]Handler{
-//             "foobar": HandlerFunc(func(prog string, args []string) int {
-//                     fmt.Println(args[0])
-//                     return 2
-//             }),
-//     })("/usr/bin/multi", []string{"foobar", "baz"}, os.Stdin, os.Stdout, os.Stderr))
+//	os.Exit(Multi(map[string]Handler{
+//	        "foobar": HandlerFunc(func(prog string, args []string) int {
+//	                fmt.Println(args[0])
+//	                return 2
+//	        }),
+//	})("/usr/bin/multi", []string{"foobar", "baz"}, os.Stdin, os.Stdout, os.Stderr))
 //
 // ...prints "baz" and exits 2.
 type Multi map[string]Handler
diff --git a/lib/crunchrun/logging.go b/lib/crunchrun/logging.go
index 76a55c499..91a1b77cf 100644
--- a/lib/crunchrun/logging.go
+++ b/lib/crunchrun/logging.go
@@ -175,9 +175,9 @@ func ReadWriteLines(in io.Reader, writer io.Writer, done chan<- bool) {
 }
 
 // NewThrottledLogger creates a new thottled logger that
-// (a) prepends timestamps to each line
-// (b) batches log messages and only calls the underlying Writer
-//  at most once per "crunchLogSecondsBetweenEvents" seconds.
+//   - prepends timestamps to each line, and
+//   - batches log messages and only calls the underlying Writer
+//     at most once per "crunchLogSecondsBetweenEvents" seconds.
 func NewThrottledLogger(writer io.WriteCloser) *ThrottledLogger {
 	tl := &ThrottledLogger{}
 	tl.flush = make(chan struct{}, 1)
diff --git a/lib/install/deps.go b/lib/install/deps.go
index 1b4bf7266..fa79cad6a 100644
--- a/lib/install/deps.go
+++ b/lib/install/deps.go
@@ -30,7 +30,7 @@ import (
 
 var Command cmd.Handler = &installCommand{}
 
-const goversion = "1.18.8"
+const goversion = "1.20.5"
 
 const (
 	rubyversion             = "2.7.6"
diff --git a/lib/install/deps_go_version_test.go b/lib/install/deps_go_version_test.go
index 1a69b6e61..a434c834d 100644
--- a/lib/install/deps_go_version_test.go
+++ b/lib/install/deps_go_version_test.go
@@ -20,13 +20,11 @@ var _ = check.Suite(&Suite{})
 
 type Suite struct{}
 
-/*
-	TestExtractGoVersion tests the grep/awk command used in
-	tools/arvbox/bin/arvbox to extract the version of Go to install for
-	bootstrapping `arvados-server`.
-
-	If this test is changed, the arvbox code will also need to be updated.
-*/
+// TestExtractGoVersion tests the grep/awk command used in
+// tools/arvbox/bin/arvbox to extract the version of Go to install for
+// bootstrapping `arvados-server`.
+//
+// If this test is changed, the arvbox code will also need to be updated.
 func (*Suite) TestExtractGoVersion(c *check.C) {
 	script := `
   sourcepath="$(realpath ../..)"
diff --git a/sdk/go/manifest/manifest.go b/sdk/go/manifest/manifest.go
index 954fb710c..a59700385 100644
--- a/sdk/go/manifest/manifest.go
+++ b/sdk/go/manifest/manifest.go
@@ -11,12 +11,13 @@ package manifest
 import (
 	"errors"
 	"fmt"
-	"git.arvados.org/arvados.git/sdk/go/blockdigest"
 	"path"
 	"regexp"
 	"sort"
 	"strconv"
 	"strings"
+
+	"git.arvados.org/arvados.git/sdk/go/blockdigest"
 )
 
 var ErrInvalidToken = errors.New("Invalid token")
@@ -467,21 +468,21 @@ func (m segmentedManifest) manifestTextForPath(srcpath, relocate string) string
 // If 'srcpath' and 'relocate' are '.' it simply returns an equivalent manifest
 // in normalized form.
 //
-//   Extract(".", ".")  // return entire normalized manfest text
+//	Extract(".", ".")  // return entire normalized manfest text
 //
 // If 'srcpath' points to a single file, it will return manifest text for just that file.
 // The value of "relocate" is can be used to rename the file or set the file stream.
 //
-//   Extract("./foo", ".")          // extract file "foo" and put it in stream "."
-//   Extract("./foo", "./bar")      // extract file "foo", rename it to "bar" in stream "."
-//   Extract("./foo", "./bar/")     // extract file "foo", rename it to "./bar/foo"
-//   Extract("./foo", "./bar/baz")  // extract file "foo", rename it to "./bar/baz")
+//	Extract("./foo", ".")          // extract file "foo" and put it in stream "."
+//	Extract("./foo", "./bar")      // extract file "foo", rename it to "bar" in stream "."
+//	Extract("./foo", "./bar/")     // extract file "foo", rename it to "./bar/foo"
+//	Extract("./foo", "./bar/baz")  // extract file "foo", rename it to "./bar/baz")
 //
 // Otherwise it will return the manifest text for all streams with the prefix in "srcpath" and place
 // them under the path in "relocate".
 //
-//   Extract("./stream", ".")      // extract "./stream" to "." and "./stream/subdir" to "./subdir")
-//   Extract("./stream", "./bar")  // extract "./stream" to "./bar" and "./stream/subdir" to "./bar/subdir")
+//	Extract("./stream", ".")      // extract "./stream" to "." and "./stream/subdir" to "./subdir")
+//	Extract("./stream", "./bar")  // extract "./stream" to "./bar" and "./stream/subdir" to "./bar/subdir")
 func (m Manifest) Extract(srcpath, relocate string) (ret Manifest) {
 	segmented, err := m.segment()
 	if err != nil {
diff --git a/services/keep-web/doc.go b/services/keep-web/doc.go
index d2b4c7eb5..4f7d2ca96 100644
--- a/services/keep-web/doc.go
+++ b/services/keep-web/doc.go
@@ -10,44 +10,44 @@
 //
 // See http://doc.arvados.org/install/install-keep-web.html.
 //
-// Configuration
+// # Configuration
 //
 // The default cluster configuration file location is
 // /etc/arvados/config.yml.
 //
 // Example configuration file
 //
-//   Clusters:
-//     zzzzz:
-//       SystemRootToken: ""
-//       Services:
-//         Controller:
-//           ExternalURL: "https://example.com"
-//           Insecure: false
-//         WebDAV:
-//           InternalURLs:
-//             "http://:1234/": {}
-//         WebDAVDownload:
-//           InternalURLs:
-//             "http://:1234/": {}
-//           ExternalURL: "https://download.example.com/"
-//       Users:
-//         AnonymousUserToken: "xxxxxxxxxxxxxxxxxxxx"
-//       Collections:
-//         TrustAllContent: false
-//
-// Starting the server
+//	Clusters:
+//	  zzzzz:
+//	    SystemRootToken: ""
+//	    Services:
+//	      Controller:
+//	        ExternalURL: "https://example.com"
+//	        Insecure: false
+//	      WebDAV:
+//	        InternalURLs:
+//	          "http://:1234/": {}
+//	      WebDAVDownload:
+//	        InternalURLs:
+//	          "http://:1234/": {}
+//	        ExternalURL: "https://download.example.com/"
+//	    Users:
+//	      AnonymousUserToken: "xxxxxxxxxxxxxxxxxxxx"
+//	    Collections:
+//	      TrustAllContent: false
+//
+// # Starting the server
 //
 // Start a server using the default config file
 // /etc/arvados/config.yml:
 //
-//   keep-web
+//	keep-web
 //
 // Start a server using the config file /path/to/config.yml:
 //
-//   keep-web -config /path/to/config.yml
+//	keep-web -config /path/to/config.yml
 //
-// Proxy configuration
+// # Proxy configuration
 //
 // Typically, keep-web is installed behind a proxy like nginx.
 //
@@ -74,25 +74,25 @@
 // proxy. However, if TLS is not used between nginx and keep-web, the
 // intervening networks must be secured by other means.
 //
-// Anonymous downloads
+// # Anonymous downloads
 //
 // The "Users.AnonymousUserToken" configuration entry used when
 // when processing anonymous requests, i.e., whenever a web client
 // does not supply its own Arvados API token via path, query string,
 // cookie, or request header.
 //
-//   Clusters:
-//     zzzzz:
-//       Users:
-//         AnonymousUserToken: "xxxxxxxxxxxxxxxxxxxxxxx"
+//	Clusters:
+//	  zzzzz:
+//	    Users:
+//	      AnonymousUserToken: "xxxxxxxxxxxxxxxxxxxxxxx"
 //
 // See http://doc.arvados.org/install/install-keep-web.html for examples.
 //
-// Download URLs
+// # Download URLs
 //
 // See http://doc.arvados.org/api/keep-web-urls.html
 //
-// Attachment-Only host
+// # Attachment-Only host
 //
 // It is possible to serve untrusted content and accept user
 // credentials at the same origin as long as the content is only
@@ -103,13 +103,13 @@
 // only when the designated origin matches exactly the Host header
 // provided by the client or downstream proxy.
 //
-//   Clusters:
-//     zzzzz:
-//       Services:
-//         WebDAVDownload:
-//           ExternalURL: "https://domain.example:9999"
+//	Clusters:
+//	  zzzzz:
+//	    Services:
+//	      WebDAVDownload:
+//	        ExternalURL: "https://domain.example:9999"
 //
-// Trust All Content mode
+// # Trust All Content mode
 //
 // In TrustAllContent mode, Keep-web will accept credentials (API
 // tokens) and serve any collection X at
@@ -120,32 +120,31 @@
 //
 // In such cases you can enable trust-all-content mode.
 //
-//   Clusters:
-//     zzzzz:
-//       Collections:
-//         TrustAllContent: true
+//	Clusters:
+//	  zzzzz:
+//	    Collections:
+//	      TrustAllContent: true
 //
 // When TrustAllContent is enabled, the only effect of the
 // Attachment-Only host setting is to add a "Content-Disposition:
 // attachment" header.
 //
-//   Clusters:
-//     zzzzz:
-//       Services:
-//         WebDAVDownload:
-//           ExternalURL: "https://domain.example:9999"
-//       Collections:
-//         TrustAllContent: true
+//	Clusters:
+//	  zzzzz:
+//	    Services:
+//	      WebDAVDownload:
+//	        ExternalURL: "https://domain.example:9999"
+//	    Collections:
+//	      TrustAllContent: true
 //
 // Depending on your site configuration, you might also want to enable
 // the "trust all content" setting in Workbench. Normally, Workbench
 // avoids redirecting requests to keep-web if they depend on
 // TrustAllContent being enabled.
 //
-// Metrics
+// # Metrics
 //
 // Keep-web exposes request metrics in Prometheus text-based format at
 // /metrics. The same information is also available as JSON at
 // /metrics.json.
-//
 package keepweb
diff --git a/services/keepproxy/keepproxy.go b/services/keepproxy/keepproxy.go
index f857ed3e4..2090c5068 100644
--- a/services/keepproxy/keepproxy.go
+++ b/services/keepproxy/keepproxy.go
@@ -509,9 +509,9 @@ func (h *proxyHandler) Put(resp http.ResponseWriter, req *http.Request) {
 // ServeHTTP implementation for IndexHandler
 // Supports only GET requests for /index/{prefix:[0-9a-f]{0,32}}
 // For each keep server found in LocalRoots:
-//   Invokes GetIndex using keepclient
-//   Expects "complete" response (terminating with blank new line)
-//   Aborts on any errors
+// - Invokes GetIndex using keepclient
+// - Expects "complete" response (terminating with blank new line)
+// - Aborts on any errors
 // Concatenates responses from all those keep servers and returns
 func (h *proxyHandler) Index(resp http.ResponseWriter, req *http.Request) {
 	setCORSHeaders(resp)
diff --git a/services/keepproxy/keepproxy_test.go b/services/keepproxy/keepproxy_test.go
index 8c4a649f6..4e53797d8 100644
--- a/services/keepproxy/keepproxy_test.go
+++ b/services/keepproxy/keepproxy_test.go
@@ -607,22 +607,22 @@ func (s *ServerRequiredSuite) TestStripHint(c *C) {
 }
 
 // Test GetIndex
-//   Put one block, with 2 replicas
-//   With no prefix (expect the block locator, twice)
-//   With an existing prefix (expect the block locator, twice)
-//   With a valid but non-existing prefix (expect "\n")
-//   With an invalid prefix (expect error)
+// - Put one block, with 2 replicas
+// - With no prefix (expect the block locator, twice)
+// - With an existing prefix (expect the block locator, twice)
+// - With a valid but non-existing prefix (expect "\n")
+// - With an invalid prefix (expect error)
 func (s *ServerRequiredSuite) TestGetIndex(c *C) {
 	getIndexWorker(c, false)
 }
 
 // Test GetIndex
-//   Uses config.yml
-//   Put one block, with 2 replicas
-//   With no prefix (expect the block locator, twice)
-//   With an existing prefix (expect the block locator, twice)
-//   With a valid but non-existing prefix (expect "\n")
-//   With an invalid prefix (expect error)
+// - Uses config.yml
+// - Put one block, with 2 replicas
+// - With no prefix (expect the block locator, twice)
+// - With an existing prefix (expect the block locator, twice)
+// - With a valid but non-existing prefix (expect "\n")
+// - With an invalid prefix (expect error)
 func (s *ServerRequiredConfigYmlSuite) TestGetIndex(c *C) {
 	getIndexWorker(c, true)
 }
diff --git a/services/keepstore/handler_test.go b/services/keepstore/handler_test.go
index d545bde0a..5bdafb77c 100644
--- a/services/keepstore/handler_test.go
+++ b/services/keepstore/handler_test.go
@@ -4,9 +4,9 @@
 
 // Tests for Keep HTTP handlers:
 //
-//     GetBlockHandler
-//     PutBlockHandler
-//     IndexHandler
+// - GetBlockHandler
+// - PutBlockHandler
+// - IndexHandler
 //
 // The HTTP handlers are responsible for enforcing permission policy,
 // so these tests must exercise all possible permission permutations.
@@ -86,7 +86,6 @@ type RequestTester struct {
 //   - permissions on, unauthenticated request, signed locator
 //   - permissions on, authenticated request, expired locator
 //   - permissions on, authenticated request, signed locator, transient error from backend
-//
 func (s *HandlerSuite) TestGetHandler(c *check.C) {
 	c.Assert(s.handler.setup(context.Background(), s.cluster, "", prometheus.NewRegistry(), testServiceURL), check.IsNil)
 
@@ -206,7 +205,6 @@ func (s *HandlerSuite) TestGetHandler(c *check.C) {
 //   - no server key
 //   - with server key, authenticated request, unsigned locator
 //   - with server key, unauthenticated request, unsigned locator
-//
 func (s *HandlerSuite) TestPutHandler(c *check.C) {
 	c.Assert(s.handler.setup(context.Background(), s.cluster, "", prometheus.NewRegistry(), testServiceURL), check.IsNil)
 
@@ -517,7 +515,6 @@ func (s *HandlerSuite) TestTouchHandler(c *check.C) {
 //
 // The only /index requests that should succeed are those issued by the
 // superuser. They should pass regardless of the value of BlobSigning.
-//
 func (s *HandlerSuite) TestIndexHandler(c *check.C) {
 	c.Assert(s.handler.setup(context.Background(), s.cluster, "", prometheus.NewRegistry(), testServiceURL), check.IsNil)
 
@@ -673,28 +670,27 @@ func (s *HandlerSuite) TestIndexHandler(c *check.C) {
 //
 // Cases tested:
 //
-//   With no token and with a non-data-manager token:
-//   * Delete existing block
-//     (test for 403 Forbidden, confirm block not deleted)
+//	With no token and with a non-data-manager token:
+//	* Delete existing block
+//	  (test for 403 Forbidden, confirm block not deleted)
 //
-//   With data manager token:
+//	With data manager token:
 //
-//   * Delete existing block
-//     (test for 200 OK, response counts, confirm block deleted)
+//	* Delete existing block
+//	  (test for 200 OK, response counts, confirm block deleted)
 //
-//   * Delete nonexistent block
-//     (test for 200 OK, response counts)
+//	* Delete nonexistent block
+//	  (test for 200 OK, response counts)
 //
-//   TODO(twp):
+//	TODO(twp):
 //
-//   * Delete block on read-only and read-write volume
-//     (test for 200 OK, response with copies_deleted=1,
-//     copies_failed=1, confirm block deleted only on r/w volume)
-//
-//   * Delete block on read-only volume only
-//     (test for 200 OK, response with copies_deleted=0, copies_failed=1,
-//     confirm block not deleted)
+//	* Delete block on read-only and read-write volume
+//	  (test for 200 OK, response with copies_deleted=1,
+//	  copies_failed=1, confirm block deleted only on r/w volume)
 //
+//	* Delete block on read-only volume only
+//	  (test for 200 OK, response with copies_deleted=0, copies_failed=1,
+//	  confirm block not deleted)
 func (s *HandlerSuite) TestDeleteHandler(c *check.C) {
 	c.Assert(s.handler.setup(context.Background(), s.cluster, "", prometheus.NewRegistry(), testServiceURL), check.IsNil)
 
@@ -823,18 +819,18 @@ func (s *HandlerSuite) TestDeleteHandler(c *check.C) {
 // Cases tested: syntactically valid and invalid pull lists, from the
 // data manager and from unprivileged users:
 //
-//   1. Valid pull list from an ordinary user
-//      (expected result: 401 Unauthorized)
+//  1. Valid pull list from an ordinary user
+//     (expected result: 401 Unauthorized)
 //
-//   2. Invalid pull request from an ordinary user
-//      (expected result: 401 Unauthorized)
+//  2. Invalid pull request from an ordinary user
+//     (expected result: 401 Unauthorized)
 //
-//   3. Valid pull request from the data manager
-//      (expected result: 200 OK with request body "Received 3 pull
-//      requests"
+//  3. Valid pull request from the data manager
+//     (expected result: 200 OK with request body "Received 3 pull
+//     requests"
 //
-//   4. Invalid pull request from the data manager
-//      (expected result: 400 Bad Request)
+//  4. Invalid pull request from the data manager
+//     (expected result: 400 Bad Request)
 //
 // Test that in the end, the pull manager received a good pull list with
 // the expected number of requests.
@@ -842,7 +838,6 @@ func (s *HandlerSuite) TestDeleteHandler(c *check.C) {
 // TODO(twp): test concurrency: launch 100 goroutines to update the
 // pull list simultaneously.  Make sure that none of them return 400
 // Bad Request and that pullq.GetList() returns a valid list.
-//
 func (s *HandlerSuite) TestPullHandler(c *check.C) {
 	c.Assert(s.handler.setup(context.Background(), s.cluster, "", prometheus.NewRegistry(), testServiceURL), check.IsNil)
 
@@ -938,18 +933,18 @@ func (s *HandlerSuite) TestPullHandler(c *check.C) {
 // Cases tested: syntactically valid and invalid trash lists, from the
 // data manager and from unprivileged users:
 //
-//   1. Valid trash list from an ordinary user
-//      (expected result: 401 Unauthorized)
+//  1. Valid trash list from an ordinary user
+//     (expected result: 401 Unauthorized)
 //
-//   2. Invalid trash list from an ordinary user
-//      (expected result: 401 Unauthorized)
+//  2. Invalid trash list from an ordinary user
+//     (expected result: 401 Unauthorized)
 //
-//   3. Valid trash list from the data manager
-//      (expected result: 200 OK with request body "Received 3 trash
-//      requests"
+//  3. Valid trash list from the data manager
+//     (expected result: 200 OK with request body "Received 3 trash
+//     requests"
 //
-//   4. Invalid trash list from the data manager
-//      (expected result: 400 Bad Request)
+//  4. Invalid trash list from the data manager
+//     (expected result: 400 Bad Request)
 //
 // Test that in the end, the trash collector received a good list
 // trash list with the expected number of requests.
@@ -957,7 +952,6 @@ func (s *HandlerSuite) TestPullHandler(c *check.C) {
 // TODO(twp): test concurrency: launch 100 goroutines to update the
 // pull list simultaneously.  Make sure that none of them return 400
 // Bad Request and that replica.Dump() returns a valid list.
-//
 func (s *HandlerSuite) TestTrashHandler(c *check.C) {
 	c.Assert(s.handler.setup(context.Background(), s.cluster, "", prometheus.NewRegistry(), testServiceURL), check.IsNil)
 	// Replace the router's trashq -- which the worker goroutines
diff --git a/services/keepstore/handlers.go b/services/keepstore/handlers.go
index 63a23687e..60fdde89c 100644
--- a/services/keepstore/handlers.go
+++ b/services/keepstore/handlers.go
@@ -449,11 +449,10 @@ func getWorkQueueStatus(q *WorkQueue) WorkQueueStatus {
 // Otherwise, the response code is 200 OK, with a response body
 // consisting of the JSON message
 //
-//    {"copies_deleted":d,"copies_failed":f}
+//	{"copies_deleted":d,"copies_failed":f}
 //
 // where d and f are integers representing the number of blocks that
 // were successfully and unsuccessfully deleted.
-//
 func (rtr *router) handleDELETE(resp http.ResponseWriter, req *http.Request) {
 	hash := mux.Vars(req)["hash"]
 
@@ -674,7 +673,6 @@ func (rtr *router) handleUntrash(resp http.ResponseWriter, req *http.Request) {
 //
 // If the block found does not have the correct MD5 hash, returns
 // DiskHashError.
-//
 func GetBlock(ctx context.Context, volmgr *RRVolumeManager, hash string, buf []byte, resp http.ResponseWriter) (int, error) {
 	log := ctxlog.FromContext(ctx)
 
@@ -845,17 +843,24 @@ func newPutProgress(classes []string) putProgress {
 // following codes:
 //
 // 500 Collision
-//        A different block with the same hash already exists on this
-//        Keep server.
+//
+//	A different block with the same hash already exists on this
+//	Keep server.
+//
 // 422 MD5Fail
-//        The MD5 hash of the BLOCK does not match the argument HASH.
+//
+//	The MD5 hash of the BLOCK does not match the argument HASH.
+//
 // 503 Full
-//        There was not enough space left in any Keep volume to store
-//        the object.
+//
+//	There was not enough space left in any Keep volume to store
+//	the object.
+//
 // 500 Fail
-//        The object could not be stored for some other reason (e.g.
-//        all writes failed). The text of the error message should
-//        provide as much detail as possible.
+//
+//	The object could not be stored for some other reason (e.g.
+//	all writes failed). The text of the error message should
+//	provide as much detail as possible.
 func PutBlock(ctx context.Context, volmgr *RRVolumeManager, block []byte, hash string, wantStorageClasses []string) (putProgress, error) {
 	log := ctxlog.FromContext(ctx)
 
@@ -1004,10 +1009,9 @@ func CompareAndTouch(ctx context.Context, volmgr *RRVolumeManager, hash string,
 
 var validLocatorRe = regexp.MustCompile(`^[0-9a-f]{32}$`)
 
-// IsValidLocator returns true if the specified string is a valid Keep locator.
-//   When Keep is extended to support hash types other than MD5,
-//   this should be updated to cover those as well.
-//
+// IsValidLocator returns true if the specified string is a valid Keep
+// locator.  When Keep is extended to support hash types other than
+// MD5, this should be updated to cover those as well.
 func IsValidLocator(loc string) bool {
 	return validLocatorRe.MatchString(loc)
 }
diff --git a/services/keepstore/keepstore.go b/services/keepstore/keepstore.go
index b9dbe2777..f83ba603d 100644
--- a/services/keepstore/keepstore.go
+++ b/services/keepstore/keepstore.go
@@ -17,8 +17,6 @@ const MinFreeKilobytes = BlockSize / 1024
 
 var bufs *bufferPool
 
-// KeepError types.
-//
 type KeepError struct {
 	HTTPCode int
 	ErrMsg   string
diff --git a/services/keepstore/trash_worker.go b/services/keepstore/trash_worker.go
index 3909d90d9..d7c73127e 100644
--- a/services/keepstore/trash_worker.go
+++ b/services/keepstore/trash_worker.go
@@ -12,12 +12,7 @@ import (
 	"github.com/sirupsen/logrus"
 )
 
-// RunTrashWorker is used by Keepstore to initiate trash worker channel goroutine.
-//	The channel will process trash list.
-//		For each (next) trash request:
-//      Delete the block indicated by the trash request Locator
-//		Repeat
-//
+// RunTrashWorker processes the trash request queue.
 func RunTrashWorker(volmgr *RRVolumeManager, logger logrus.FieldLogger, cluster *arvados.Cluster, trashq *WorkQueue) {
 	for item := range trashq.NextItem {
 		trashRequest := item.(TrashRequest)
diff --git a/services/keepstore/trash_worker_test.go b/services/keepstore/trash_worker_test.go
index 4e20c3feb..a1648c52c 100644
--- a/services/keepstore/trash_worker_test.go
+++ b/services/keepstore/trash_worker_test.go
@@ -36,9 +36,8 @@ type TrashWorkerTestData struct {
 	ExpectLocator2 bool
 }
 
-/* Delete block that does not exist in any of the keep volumes.
-   Expect no errors.
-*/
+// Delete block that does not exist in any of the keep volumes.
+// Expect no errors.
 func (s *HandlerSuite) TestTrashWorkerIntegration_GetNonExistingLocator(c *check.C) {
 	s.cluster.Collections.BlobTrash = true
 	testData := TrashWorkerTestData{
@@ -58,9 +57,8 @@ func (s *HandlerSuite) TestTrashWorkerIntegration_GetNonExistingLocator(c *check
 	s.performTrashWorkerTest(c, testData)
 }
 
-/* Delete a block that exists on volume 1 of the keep servers.
-   Expect the second locator in volume 2 to be unaffected.
-*/
+// Delete a block that exists on volume 1 of the keep servers. Expect
+// the second locator in volume 2 to be unaffected.
 func (s *HandlerSuite) TestTrashWorkerIntegration_LocatorInVolume1(c *check.C) {
 	s.cluster.Collections.BlobTrash = true
 	testData := TrashWorkerTestData{
@@ -80,9 +78,8 @@ func (s *HandlerSuite) TestTrashWorkerIntegration_LocatorInVolume1(c *check.C) {
 	s.performTrashWorkerTest(c, testData)
 }
 
-/* Delete a block that exists on volume 2 of the keep servers.
-   Expect the first locator in volume 1 to be unaffected.
-*/
+// Delete a block that exists on volume 2 of the keep servers. Expect
+// the first locator in volume 1 to be unaffected.
 func (s *HandlerSuite) TestTrashWorkerIntegration_LocatorInVolume2(c *check.C) {
 	s.cluster.Collections.BlobTrash = true
 	testData := TrashWorkerTestData{
@@ -102,9 +99,8 @@ func (s *HandlerSuite) TestTrashWorkerIntegration_LocatorInVolume2(c *check.C) {
 	s.performTrashWorkerTest(c, testData)
 }
 
-/* Delete a block with matching mtime for locator in both volumes.
-   Expect locator to be deleted from both volumes.
-*/
+// Delete a block with matching mtime for locator in both
+// volumes. Expect locator to be deleted from both volumes.
 func (s *HandlerSuite) TestTrashWorkerIntegration_LocatorInBothVolumes(c *check.C) {
 	s.cluster.Collections.BlobTrash = true
 	testData := TrashWorkerTestData{
@@ -124,9 +120,8 @@ func (s *HandlerSuite) TestTrashWorkerIntegration_LocatorInBothVolumes(c *check.
 	s.performTrashWorkerTest(c, testData)
 }
 
-/* Same locator with different Mtimes exists in both volumes.
-   Delete the second and expect the first to be still around.
-*/
+// Same locator with different Mtimes exists in both volumes. Delete
+// the second and expect the first to be still around.
 func (s *HandlerSuite) TestTrashWorkerIntegration_MtimeMatchesForLocator1ButNotForLocator2(c *check.C) {
 	s.cluster.Collections.BlobTrash = true
 	testData := TrashWorkerTestData{
@@ -170,10 +165,8 @@ func (s *HandlerSuite) TestTrashWorkerIntegration_SpecifyMountUUID(c *check.C) {
 	s.performTrashWorkerTest(c, testData)
 }
 
-/* Two different locators in volume 1.
-   Delete one of them.
-   Expect the other unaffected.
-*/
+// Two different locators in volume 1. Delete one of them. Expect the
+// other unaffected.
 func (s *HandlerSuite) TestTrashWorkerIntegration_TwoDifferentLocatorsInVolume1(c *check.C) {
 	s.cluster.Collections.BlobTrash = true
 	testData := TrashWorkerTestData{
@@ -194,9 +187,9 @@ func (s *HandlerSuite) TestTrashWorkerIntegration_TwoDifferentLocatorsInVolume1(
 	s.performTrashWorkerTest(c, testData)
 }
 
-/* Allow default Trash Life time to be used. Thus, the newly created block
-   will not be deleted because its Mtime is within the trash life time.
-*/
+// Allow default Trash Life time to be used. Thus, the newly created
+// block will not be deleted because its Mtime is within the trash
+// life time.
 func (s *HandlerSuite) TestTrashWorkerIntegration_SameLocatorInTwoVolumesWithDefaultTrashLifeTime(c *check.C) {
 	s.cluster.Collections.BlobTrash = true
 	testData := TrashWorkerTestData{
@@ -220,9 +213,8 @@ func (s *HandlerSuite) TestTrashWorkerIntegration_SameLocatorInTwoVolumesWithDef
 	s.performTrashWorkerTest(c, testData)
 }
 
-/* Delete a block with matching mtime for locator in both volumes, but EnableDelete is false,
-   so block won't be deleted.
-*/
+// Delete a block with matching mtime for locator in both volumes, but
+// EnableDelete is false, so block won't be deleted.
 func (s *HandlerSuite) TestTrashWorkerIntegration_DisabledDelete(c *check.C) {
 	s.cluster.Collections.BlobTrash = false
 	testData := TrashWorkerTestData{
@@ -242,7 +234,6 @@ func (s *HandlerSuite) TestTrashWorkerIntegration_DisabledDelete(c *check.C) {
 	s.performTrashWorkerTest(c, testData)
 }
 
-/* Perform the test */
 func (s *HandlerSuite) performTrashWorkerTest(c *check.C, testData TrashWorkerTestData) {
 	c.Assert(s.handler.setup(context.Background(), s.cluster, "", prometheus.NewRegistry(), testServiceURL), check.IsNil)
 	// Replace the router's trashq -- which the worker goroutines
diff --git a/services/keepstore/unix_volume.go b/services/keepstore/unix_volume.go
index dd62cf131..a08b7de01 100644
--- a/services/keepstore/unix_volume.go
+++ b/services/keepstore/unix_volume.go
@@ -314,7 +314,6 @@ func (v *UnixVolume) WriteBlock(ctx context.Context, loc string, rdr io.Reader)
 
 // Status returns a VolumeStatus struct describing the volume's
 // current state, or nil if an error occurs.
-//
 func (v *UnixVolume) Status() *VolumeStatus {
 	fi, err := v.os.Stat(v.Root)
 	if err != nil {
@@ -355,14 +354,13 @@ var blockFileRe = regexp.MustCompile(`^[0-9a-f]{32}$`)
 //
 // Each block is given in the format
 //
-//     locator+size modification-time {newline}
+//	locator+size modification-time {newline}
 //
 // e.g.:
 //
-//     e4df392f86be161ca6ed3773a962b8f3+67108864 1388894303
-//     e4d41e6fd68460e0e3fc18cc746959d2+67108864 1377796043
-//     e4de7a2810f5554cd39b36d8ddb132ff+67108864 1388701136
-//
+//	e4df392f86be161ca6ed3773a962b8f3+67108864 1388894303
+//	e4d41e6fd68460e0e3fc18cc746959d2+67108864 1377796043
+//	e4de7a2810f5554cd39b36d8ddb132ff+67108864 1388701136
 func (v *UnixVolume) IndexTo(prefix string, w io.Writer) error {
 	rootdir, err := v.os.Open(v.Root)
 	if err != nil {
@@ -532,7 +530,6 @@ func (v *UnixVolume) blockPath(loc string) string {
 
 // IsFull returns true if the free space on the volume is less than
 // MinFreeKilobytes.
-//
 func (v *UnixVolume) IsFull() (isFull bool) {
 	fullSymlink := v.Root + "/full"
 
@@ -563,7 +560,6 @@ func (v *UnixVolume) IsFull() (isFull bool) {
 
 // FreeDiskSpace returns the number of unused 1k blocks available on
 // the volume.
-//
 func (v *UnixVolume) FreeDiskSpace() (free uint64, err error) {
 	var fs syscall.Statfs_t
 	err = syscall.Statfs(v.Root, &fs)
diff --git a/services/keepstore/volume_generic_test.go b/services/keepstore/volume_generic_test.go
index 0dd34e3af..218041243 100644
--- a/services/keepstore/volume_generic_test.go
+++ b/services/keepstore/volume_generic_test.go
@@ -320,10 +320,9 @@ func (s *genericVolumeSuite) testPutMultipleBlocks(t TB, factory TestableVolumeF
 	}
 }
 
-// testPutAndTouch
-//   Test that when applying PUT to a block that already exists,
-//   the block's modification time is updated.
-// Test is intended for only writable volumes
+// testPutAndTouch checks that when applying PUT to a block that
+// already exists, the block's modification time is updated.  Intended
+// for only writable volumes.
 func (s *genericVolumeSuite) testPutAndTouch(t TB, factory TestableVolumeFactory) {
 	s.setup(t)
 	v := s.newVolume(t, factory)
diff --git a/services/keepstore/work_queue.go b/services/keepstore/work_queue.go
index 4c46ec8e6..be3d118ff 100644
--- a/services/keepstore/work_queue.go
+++ b/services/keepstore/work_queue.go
@@ -108,7 +108,6 @@ type WorkQueueStatus struct {
 }
 
 // NewWorkQueue returns a new empty WorkQueue.
-//
 func NewWorkQueue() *WorkQueue {
 	nextItem := make(chan interface{})
 	reportDone := make(chan struct{})
@@ -185,7 +184,6 @@ func NewWorkQueue() *WorkQueue {
 // and starts giving workers items from the given list. After giving
 // it to ReplaceQueue, the caller must not read or write the given
 // list.
-//
 func (b *WorkQueue) ReplaceQueue(list *list.List) {
 	b.newlist <- list
 }
@@ -196,14 +194,12 @@ func (b *WorkQueue) ReplaceQueue(list *list.List) {
 //
 // After Close, Status will return correct values, NextItem will be
 // closed, and ReplaceQueue will panic.
-//
 func (b *WorkQueue) Close() {
 	close(b.newlist)
 }
 
 // Status returns an up-to-date WorkQueueStatus reflecting the current
 // queue status.
-//
 func (b *WorkQueue) Status() WorkQueueStatus {
 	// If the channel is closed, we get the nil value of
 	// WorkQueueStatus, which is an accurate description of a
diff --git a/services/ws/doc.go b/services/ws/doc.go
index a67df1511..cdb5c467f 100644
--- a/services/ws/doc.go
+++ b/services/ws/doc.go
@@ -6,11 +6,11 @@
 // cache-invalidation event feed at "ws://.../websocket") to
 // websocket clients.
 //
-// Installation and configuration
+// # Installation and configuration
 //
 // See https://doc.arvados.org/install/install-ws.html.
 //
-// Developer info
+// # Developer info
 //
 // See https://dev.arvados.org/projects/arvados/wiki/Hacking_websocket_server.
 package ws
diff --git a/tools/keep-exercise/keep-exercise.go b/tools/keep-exercise/keep-exercise.go
index 1acd8d8b9..6d06a1832 100644
--- a/tools/keep-exercise/keep-exercise.go
+++ b/tools/keep-exercise/keep-exercise.go
@@ -15,7 +15,6 @@
 // fill your storage volumes with random data if you leave it running,
 // which can cost you money or leave you with too little room for
 // useful data.
-//
 package main
 
 import (

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list