[arvados] updated: 2.7.0-5374-g9fa5faed89

git repository hosting git at public.arvados.org
Wed Nov 15 23:55:29 UTC 2023


Summary of changes:
 build/rails-package-scripts/arvados-api-server.sh  |   2 +-
 build/rails-package-scripts/postinst.sh            |   7 +-
 build/run-tests.sh                                 |  18 +-
 cmd/arvados-package/cmd.go                         |   2 +-
 doc/admin/upgrading.html.textile.liquid            |   6 +
 lib/boot/workbench2.go                             |  27 ++-
 lib/cloud/ec2/ec2.go                               |  33 ++-
 lib/cloud/ec2/ec2_test.go                          |  51 ++++-
 lib/cmd/cmd.go                                     |  20 +-
 lib/config/config.default.yml                      |  11 +
 lib/config/export.go                               |   1 +
 lib/controller/federation/conn.go                  |  64 ++++--
 lib/controller/federation/login_test.go            |  39 ----
 lib/controller/federation/logout_test.go           | 246 +++++++++++++++++++++
 lib/crunchrun/executor_test.go                     |   4 +
 lib/dispatchcloud/container/queue.go               |  23 +-
 lib/dispatchcloud/container/queue_test.go          |  11 +-
 lib/dispatchcloud/dispatcher.go                    |   2 +-
 lib/dispatchcloud/dispatcher_test.go               |  15 +-
 lib/dispatchcloud/node_size.go                     |  65 ++++--
 lib/dispatchcloud/node_size_test.go                |  68 ++++--
 lib/dispatchcloud/scheduler/run_queue.go           | 111 ++++++----
 lib/dispatchcloud/scheduler/run_queue_test.go      |   6 +-
 lib/dispatchcloud/test/queue.go                    |  10 +-
 lib/dispatchcloud/test/stub_driver.go              |  16 +-
 lib/install/deps.go                                | 107 ++++++---
 sdk/cwl/arvados_cwl/runner.py                      |   5 +-
 sdk/cwl/setup.py                                   |   1 -
 sdk/go/arvados/config.go                           |   1 +
 sdk/python/arvados/commands/keepdocker.py          |   5 +-
 sdk/python/tests/run_test_server.py                |  22 +-
 .../crunch-dispatch-slurm/crunch-dispatch-slurm.go |   8 +-
 services/fuse/arvados_fuse/unmount.py              |  10 +
 services/workbench2/Makefile                       |  44 +++-
 .../workbench2/cypress/integration/login.spec.js   |  19 +-
 .../cypress/integration/page-not-found.spec.js     |   5 +-
 .../workbench2/cypress/integration/project.spec.js |   2 +-
 services/workbench2/cypress/support/commands.js    |   2 +-
 services/workbench2/docker/Dockerfile              |   3 +-
 .../collection-panel-files.tsx                     |   2 +
 services/workbench2/src/index.tsx                  |  17 +-
 .../collection-service/collection-service.ts       |  11 +-
 .../process-logs-panel-actions.ts                  |  48 ++--
 .../store/process-panel/process-panel-actions.ts   |   8 +-
 .../project-panel-middleware-service.ts            |   7 +-
 .../workbench2/src/store/trash/trash-actions.ts    | 174 ++++++++-------
 .../src/store/workbench/workbench-actions.ts       |   6 +
 .../views/collection-panel/collection-panel.tsx    |   7 +-
 .../src/views/not-found-panel/not-found-panel.tsx  |  27 +++
 .../src/views/process-panel/process-panel-root.tsx |  18 +-
 .../src/views/project-panel/project-panel.tsx      |  25 ++-
 .../workflow-panel/registered-workflow-panel.tsx   |   9 +-
 services/workbench2/tools/arvados_config.yml       |   6 +-
 services/workbench2/tools/run-integration-tests.sh |  23 +-
 tools/salt-install/installer.sh                    |  11 +-
 55 files changed, 1065 insertions(+), 426 deletions(-)
 create mode 100644 lib/controller/federation/logout_test.go

       via  9fa5faed898bf23fcea8f4e7946e540473e42e08 (commit)
       via  dc6fb79ab1c3ba1aaa0e33261dea132ae40cb981 (commit)
       via  5f778e6945d8c3c216922f9aa1f45253a1c62376 (commit)
       via  6f6a06e13d12389ba045bc6694cb83b97f714e78 (commit)
       via  46fe1e60a1cd96a39163911edd821b3e316ca606 (commit)
       via  7bc4217495b405c98ea4cad8178b8136383486cf (commit)
       via  3bea410bc6f2bde352cb351c9065ee1c46f1b631 (commit)
       via  b2ef730e0f524bc8e08fbc241c80c170d9f27763 (commit)
       via  f5fd7e2dc13b912e1032a54119f3fb60973f77e2 (commit)
       via  5f3520a80c66558c2a6b1a48ebc0eedb4d5e8f96 (commit)
       via  b9b2513a621b6704157a1078e3b2ec75b3c92d1c (commit)
       via  d3cb0cad7f052987651a9f0b2237329cf3997c58 (commit)
       via  91d9e964f9769347044ebaac556cd56360d96d2a (commit)
       via  50bccff93109fe6ef9c370d2a858049d8b2e22cd (commit)
       via  c68e4ba51336a871dff26ae9f8dc7eb7e316083d (commit)
       via  3236e0cbbe0fcb9e684d63a0ffac4d1f4a0d96b8 (commit)
       via  ae4cf50d72adebc6df338ef54ec5f2755ad73b8f (commit)
       via  4f06e4dc7e9eb5ad04703dbbaa47370e6baeb9a1 (commit)
       via  3433f306caf560017377b32adf7a23842ba9ab31 (commit)
       via  6ff39245b93dd55e60c7433af64f2244b0091c6e (commit)
       via  d087ef17a59688c8e38c3c72192f295d8bca28c2 (commit)
       via  10b08e0c05d176775c4f0cf13f6e77025bb1e636 (commit)
       via  f4fdee016f05ca986c55c7d769ce2f1a6bec5541 (commit)
       via  a5ce6f3013a9924c40c71b04940759e127c98858 (commit)
       via  d6e41e6884090f5ff42e9fa5bb53852c7bcc47c4 (commit)
       via  28b83594452b195cc1e8b412bdd3a3bb2a91e2d9 (commit)
       via  f3b8d03f7063b162355bccfd71aeb2b8b67bbdbb (commit)
       via  03caa5fccf60f32c4fe1d6aac297c64ade6a69b9 (commit)
       via  e14e00a5fb79be5cba5c8b9b0ae5863011f60daf (commit)
       via  2454b8583c13b754c233b0e44cdbc95873cd14cc (commit)
       via  dc524f398ed78c9820ef90b87d2ec4422d4f9132 (commit)
       via  e8d36edca6d1601a50f3712bc7d1c7258a23fcc7 (commit)
       via  5e2a9f3aeb1e72b9776f3a9974f8f4bffde83f8a (commit)
       via  d719195a223a00b1f7706f4f734e0cd59618e54e (commit)
       via  a53bf7d89e01e98dcdc62b5357a0404d5489c9a1 (commit)
       via  b34c4b9234777d68b675aebf77680b8dd8708a6d (commit)
       via  ac312e0acae4fd114114081c9f4791d05e640831 (commit)
       via  c306aaa029d8e65a4399f27fec982e4e2f72ba8d (commit)
       via  4ad6191d53207a8b2d4c0c8a30b18119daaa5fbc (commit)
       via  9f42b105d76cffd91e2d91a6b5d25ff4418f192c (commit)
       via  889be1993b1c270b361f3502f33ead1dae95c9a2 (commit)
       via  0e9f41a15027a66c69ef351846b213b2e2075642 (commit)
       via  d6446b03e2f5d5079a870bdd7b963456dc12b485 (commit)
       via  a73295e64f58fe027b995e0cca3d103d4e2289ff (commit)
       via  88aedea4fdf827524c620830ec11681e5cd5f527 (commit)
       via  66cee5a8021e73271650e0997ca7f757e419d169 (commit)
       via  da204dccd3df12b5c885068768f95c84e4703047 (commit)
       via  1028c0630dac2a2bff363da1390bbf942e7fe7ae (commit)
       via  e3ac3dafe5432c81a294403e1996c306a93d48f8 (commit)
       via  1875af9bcf4a1afe435176e952e63341a9ae9c03 (commit)
       via  8e913832ad289fd28700f4081046b7de48688130 (commit)
       via  5b30fab0552f623a35ff5b89b90dab82dfcee258 (commit)
       via  26e2f985f4c2b511c59977e4c63158649f296624 (commit)
       via  e11c6c520d8d01397f58a5cda1fe7e5e5e06acab (commit)
       via  75b017ae9d566d523e448aaeb863c4d89b3548fe (commit)
      from  b77707a7b06d57145a7829458d476baf8573317e (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 9fa5faed898bf23fcea8f4e7946e540473e42e08
Author: Tom Clegg <tom at curii.com>
Date:   Wed Nov 15 17:06:43 2023 -0500

    20846: Add -nodejs-version option to arvados-server install.
    
    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 dd4347e3f7..33e591f95b 100644
--- a/lib/install/deps.go
+++ b/lib/install/deps.go
@@ -40,7 +40,7 @@ const (
 	pjsversion                = "1.9.8"
 	geckoversion              = "0.24.0"
 	gradleversion             = "5.3.1"
-	nodejsversion             = "v12.22.12"
+	defaultNodejsVersion      = "v12.22.12"
 	devtestDatabasePassword   = "insecure_arvados_test"
 )
 
@@ -55,6 +55,7 @@ type installCommand struct {
 	RubyVersion        string
 	BundlerVersion     string
 	SingularityVersion string
+	NodejsVersion      string
 	EatMyData          bool
 }
 
@@ -81,6 +82,7 @@ func (inst *installCommand) RunCommand(prog string, args []string, stdin io.Read
 	flags.StringVar(&inst.RubyVersion, "ruby-version", defaultRubyVersion, "Ruby `version` to install (do not override in production mode)")
 	flags.StringVar(&inst.BundlerVersion, "bundler-version", defaultBundlerVersion, "Bundler `version` to install (do not override in production mode)")
 	flags.StringVar(&inst.SingularityVersion, "singularity-version", defaultSingularityVersion, "Singularity `version` to install (do not override in production mode)")
+	flags.StringVar(&inst.NodejsVersion, "nodejs-version", defaultNodejsVersion, "Nodejs `version` to install (not applicable in production mode)")
 	flags.BoolVar(&inst.EatMyData, "eatmydata", false, "use eatmydata to speed up install")
 
 	if ok, code := cmd.ParseFlags(flags, prog, args, "", stderr); !ok {
@@ -129,6 +131,10 @@ func (inst *installCommand) RunCommand(prog string, args []string, stdin io.Read
 		fmt.Fprintf(stderr, "invalid argument %q for -singularity-version\n", inst.SingularityVersion)
 		return 64
 	}
+	if ok, _ := regexp.MatchString(`^v\d`, inst.NodejsVersion); !ok {
+		fmt.Fprintf(stderr, "invalid argument %q for -nodejs-version\n", inst.NodejsVersion)
+		return 64
+	}
 
 	osv, err := identifyOS()
 	if err != nil {
@@ -560,11 +566,11 @@ setcap "cap_sys_admin+pei cap_sys_chroot+pei" /var/lib/arvados/bin/nsenter
 	}
 
 	if !prod {
-		if havenodejsversion, err := exec.Command("/usr/local/bin/node", "--version").CombinedOutput(); err == nil && string(havenodejsversion) == nodejsversion+"\n" {
-			logger.Print("nodejs " + nodejsversion + " already installed")
+		if havenodejsversion, err := exec.Command("/usr/local/bin/node", "--version").CombinedOutput(); err == nil && string(havenodejsversion) == inst.NodejsVersion+"\n" {
+			logger.Print("nodejs " + inst.NodejsVersion + " already installed")
 		} else {
 			err = inst.runBash(`
-NJS=`+nodejsversion+`
+NJS=`+inst.NodejsVersion+`
 rm -rf /var/lib/arvados/node-*-linux-x64
 wget --progress=dot:giga -O- https://nodejs.org/dist/${NJS}/node-${NJS}-linux-x64.tar.xz | sudo tar -C /var/lib/arvados -xJf -
 ln -sfv /var/lib/arvados/node-${NJS}-linux-x64/bin/{node,npm} /usr/local/bin/
@@ -579,7 +585,7 @@ ln -sfv /var/lib/arvados/node-${NJS}-linux-x64/bin/{node,npm} /usr/local/bin/
 		} else {
 			err = inst.runBash(`
 npm install -g yarn
-ln -sfv /var/lib/arvados/node-`+nodejsversion+`-linux-x64/bin/{yarn,yarnpkg} /usr/local/bin/
+ln -sfv /var/lib/arvados/node-`+inst.NodejsVersion+`-linux-x64/bin/{yarn,yarnpkg} /usr/local/bin/
 `, stdout, stderr)
 			if err != nil {
 				return 1

commit dc6fb79ab1c3ba1aaa0e33261dea132ae40cb981
Author: Tom Clegg <tom at curii.com>
Date:   Wed Nov 15 16:58:26 2023 -0500

    20846: Add -singularity-version option to arvados-server install.
    
    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 998da1200c..dd4347e3f7 100644
--- a/lib/install/deps.go
+++ b/lib/install/deps.go
@@ -34,27 +34,28 @@ var Command cmd.Handler = &installCommand{}
 const goversion = "1.20.6"
 
 const (
-	defaultRubyVersion      = "3.2.2"
-	defaultBundlerVersion   = "2.2.19"
-	singularityversion      = "3.10.4"
-	pjsversion              = "1.9.8"
-	geckoversion            = "0.24.0"
-	gradleversion           = "5.3.1"
-	nodejsversion           = "v12.22.12"
-	devtestDatabasePassword = "insecure_arvados_test"
+	defaultRubyVersion        = "3.2.2"
+	defaultBundlerVersion     = "2.2.19"
+	defaultSingularityVersion = "3.10.4"
+	pjsversion                = "1.9.8"
+	geckoversion              = "0.24.0"
+	gradleversion             = "5.3.1"
+	nodejsversion             = "v12.22.12"
+	devtestDatabasePassword   = "insecure_arvados_test"
 )
 
 //go:embed arvados.service
 var arvadosServiceFile []byte
 
 type installCommand struct {
-	ClusterType    string
-	SourcePath     string
-	Commit         string
-	PackageVersion string
-	RubyVersion    string
-	BundlerVersion string
-	EatMyData      bool
+	ClusterType        string
+	SourcePath         string
+	Commit             string
+	PackageVersion     string
+	RubyVersion        string
+	BundlerVersion     string
+	SingularityVersion string
+	EatMyData          bool
 }
 
 func (inst *installCommand) RunCommand(prog string, args []string, stdin io.Reader, stdout, stderr io.Writer) int {
@@ -79,6 +80,7 @@ func (inst *installCommand) RunCommand(prog string, args []string, stdin io.Read
 	flags.StringVar(&inst.PackageVersion, "package-version", "0.0.0", "version string to embed in executable files")
 	flags.StringVar(&inst.RubyVersion, "ruby-version", defaultRubyVersion, "Ruby `version` to install (do not override in production mode)")
 	flags.StringVar(&inst.BundlerVersion, "bundler-version", defaultBundlerVersion, "Bundler `version` to install (do not override in production mode)")
+	flags.StringVar(&inst.SingularityVersion, "singularity-version", defaultSingularityVersion, "Singularity `version` to install (do not override in production mode)")
 	flags.BoolVar(&inst.EatMyData, "eatmydata", false, "use eatmydata to speed up install")
 
 	if ok, code := cmd.ParseFlags(flags, prog, args, "", stderr); !ok {
@@ -123,6 +125,10 @@ func (inst *installCommand) RunCommand(prog string, args []string, stdin io.Read
 		fmt.Fprintf(stderr, "invalid argument %q for -bundler-version\n", inst.BundlerVersion)
 		return 64
 	}
+	if ok, _ := regexp.MatchString(`^\d`, inst.SingularityVersion); !ok {
+		fmt.Fprintf(stderr, "invalid argument %q for -singularity-version\n", inst.SingularityVersion)
+		return 64
+	}
 
 	osv, err := identifyOS()
 	if err != nil {
@@ -404,11 +410,11 @@ rm ${zip}
 			}
 		}
 
-		if havesingularityversion, err := exec.Command("/var/lib/arvados/bin/singularity", "--version").CombinedOutput(); err == nil && strings.Contains(string(havesingularityversion), singularityversion) {
-			logger.Print("singularity " + singularityversion + " already installed")
+		if havesingularityversion, err := exec.Command("/var/lib/arvados/bin/singularity", "--version").CombinedOutput(); err == nil && strings.Contains(string(havesingularityversion), inst.SingularityVersion) {
+			logger.Print("singularity " + inst.SingularityVersion + " already installed")
 		} else if dev || test {
 			err = inst.runBash(`
-S=`+singularityversion+`
+S=`+inst.SingularityVersion+`
 tmp=/var/lib/arvados/tmp/singularity
 trap "rm -r ${tmp}" ERR EXIT
 cd /var/lib/arvados/tmp

commit 5f778e6945d8c3c216922f9aa1f45253a1c62376
Author: Tom Clegg <tom at curii.com>
Date:   Wed Nov 15 16:51:43 2023 -0500

    20846: Add -bundler-version option to arvados-server install.
    
    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 9f4af1317f..998da1200c 100644
--- a/lib/install/deps.go
+++ b/lib/install/deps.go
@@ -35,7 +35,7 @@ const goversion = "1.20.6"
 
 const (
 	defaultRubyVersion      = "3.2.2"
-	bundlerversion          = "2.2.19"
+	defaultBundlerVersion   = "2.2.19"
 	singularityversion      = "3.10.4"
 	pjsversion              = "1.9.8"
 	geckoversion            = "0.24.0"
@@ -53,6 +53,7 @@ type installCommand struct {
 	Commit         string
 	PackageVersion string
 	RubyVersion    string
+	BundlerVersion string
 	EatMyData      bool
 }
 
@@ -77,6 +78,7 @@ func (inst *installCommand) RunCommand(prog string, args []string, stdin io.Read
 	flags.StringVar(&inst.Commit, "commit", "", "source commit `hash` to embed (blank means use 'git log' or all-zero placeholder)")
 	flags.StringVar(&inst.PackageVersion, "package-version", "0.0.0", "version string to embed in executable files")
 	flags.StringVar(&inst.RubyVersion, "ruby-version", defaultRubyVersion, "Ruby `version` to install (do not override in production mode)")
+	flags.StringVar(&inst.BundlerVersion, "bundler-version", defaultBundlerVersion, "Bundler `version` to install (do not override in production mode)")
 	flags.BoolVar(&inst.EatMyData, "eatmydata", false, "use eatmydata to speed up install")
 
 	if ok, code := cmd.ParseFlags(flags, prog, args, "", stderr); !ok {
@@ -117,6 +119,10 @@ func (inst *installCommand) RunCommand(prog string, args []string, stdin io.Read
 		fmt.Fprintf(stderr, "invalid argument %q for -ruby-version\n", inst.RubyVersion)
 		return 64
 	}
+	if ok, _ := regexp.MatchString(`^\d`, inst.BundlerVersion); !ok {
+		fmt.Fprintf(stderr, "invalid argument %q for -bundler-version\n", inst.BundlerVersion)
+		return 64
+	}
 
 	osv, err := identifyOS()
 	if err != nil {
@@ -661,7 +667,7 @@ done
 			{"mkdir", "-p", "log", "public/assets", "tmp", "vendor", ".bundle", "/var/www/.bundle", "/var/www/.gem", "/var/www/.npm", "/var/www/.passenger"},
 			{"touch", "log/production.log"},
 			{"chown", "-R", "--from=root", "www-data:www-data", "/var/www/.bundle", "/var/www/.gem", "/var/www/.npm", "/var/www/.passenger", "log", "tmp", "vendor", ".bundle", "Gemfile.lock", "config.ru", "config/environment.rb"},
-			{"sudo", "-u", "www-data", "/var/lib/arvados/bin/gem", "install", "--user", "--conservative", "--no-document", "bundler:" + bundlerversion},
+			{"sudo", "-u", "www-data", "/var/lib/arvados/bin/gem", "install", "--user", "--conservative", "--no-document", "bundler:" + inst.BundlerVersion},
 			{"sudo", "-u", "www-data", "/var/lib/arvados/bin/bundle", "config", "set", "--local", "deployment", "true"},
 			{"sudo", "-u", "www-data", "/var/lib/arvados/bin/bundle", "config", "set", "--local", "path", "/var/www/.gem"},
 			{"sudo", "-u", "www-data", "/var/lib/arvados/bin/bundle", "config", "set", "--local", "without", "development test diagnostics performance"},

commit 6f6a06e13d12389ba045bc6694cb83b97f714e78
Author: Tom Clegg <tom at curii.com>
Date:   Wed Nov 15 16:45:34 2023 -0500

    20846: Add -ruby-version option to arvados-server install.
    
    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 7b32984348..9f4af1317f 100644
--- a/lib/install/deps.go
+++ b/lib/install/deps.go
@@ -17,6 +17,7 @@ import (
 	"os/exec"
 	"os/user"
 	"path/filepath"
+	"regexp"
 	"runtime"
 	"strconv"
 	"strings"
@@ -33,7 +34,7 @@ var Command cmd.Handler = &installCommand{}
 const goversion = "1.20.6"
 
 const (
-	rubyversion             = "3.2.2"
+	defaultRubyVersion      = "3.2.2"
 	bundlerversion          = "2.2.19"
 	singularityversion      = "3.10.4"
 	pjsversion              = "1.9.8"
@@ -51,6 +52,7 @@ type installCommand struct {
 	SourcePath     string
 	Commit         string
 	PackageVersion string
+	RubyVersion    string
 	EatMyData      bool
 }
 
@@ -74,6 +76,7 @@ func (inst *installCommand) RunCommand(prog string, args []string, stdin io.Read
 	flags.StringVar(&inst.SourcePath, "source", "/arvados", "source tree location (required for -type=package)")
 	flags.StringVar(&inst.Commit, "commit", "", "source commit `hash` to embed (blank means use 'git log' or all-zero placeholder)")
 	flags.StringVar(&inst.PackageVersion, "package-version", "0.0.0", "version string to embed in executable files")
+	flags.StringVar(&inst.RubyVersion, "ruby-version", defaultRubyVersion, "Ruby `version` to install (do not override in production mode)")
 	flags.BoolVar(&inst.EatMyData, "eatmydata", false, "use eatmydata to speed up install")
 
 	if ok, code := cmd.ParseFlags(flags, prog, args, "", stderr); !ok {
@@ -110,6 +113,11 @@ func (inst *installCommand) RunCommand(prog string, args []string, stdin io.Read
 		return 1
 	}
 
+	if ok, _ := regexp.MatchString(`^\d\.\d+\.\d+$`, inst.RubyVersion); !ok {
+		fmt.Fprintf(stderr, "invalid argument %q for -ruby-version\n", inst.RubyVersion)
+		return 64
+	}
+
 	osv, err := identifyOS()
 	if err != nil {
 		return 1
@@ -305,20 +313,24 @@ fi
 			return 1
 		}
 	}
-	rubymajorversion := rubyversion[:strings.LastIndex(rubyversion, ".")]
-	if haverubyversion, err := exec.Command("/var/lib/arvados/bin/ruby", "-v").CombinedOutput(); err == nil && bytes.HasPrefix(haverubyversion, []byte("ruby "+rubyversion)) {
-		logger.Print("ruby " + rubyversion + " already installed")
+	rubyminorversion := inst.RubyVersion[:strings.LastIndex(inst.RubyVersion, ".")]
+	if haverubyversion, err := exec.Command("/var/lib/arvados/bin/ruby", "-v").CombinedOutput(); err == nil && bytes.HasPrefix(haverubyversion, []byte("ruby "+inst.RubyVersion)) {
+		logger.Print("ruby " + inst.RubyVersion + " already installed")
 	} else {
 		err = inst.runBash(`
+rubyversion="`+inst.RubyVersion+`"
+rubyminorversion="`+rubyminorversion+`"
 tmp="$(mktemp -d)"
 trap 'rm -r "${tmp}"' ERR EXIT
-wget --progress=dot:giga -O- https://cache.ruby-lang.org/pub/ruby/`+rubymajorversion+`/ruby-`+rubyversion+`.tar.gz | tar -C "${tmp}" -xzf -
-cd "${tmp}/ruby-`+rubyversion+`"
+wget --progress=dot:giga -O- "https://cache.ruby-lang.org/pub/ruby/$rubyminorversion/ruby-$rubyversion.tar.gz" | tar -C "${tmp}" -xzf -
+cd "${tmp}/ruby-$rubyversion"
 ./configure --disable-install-static-library --enable-shared --disable-install-doc --prefix /var/lib/arvados
 make -j8
 rm -f /var/lib/arvados/bin/erb
 make install
-/var/lib/arvados/bin/gem update --no-document --system 3.4.21
+if [[ "$rubyversion" > "3" ]]; then
+  /var/lib/arvados/bin/gem update --no-document --system 3.4.21
+fi
 /var/lib/arvados/bin/gem install bundler --no-document
 `, stdout, stderr)
 		if err != nil {

commit 46fe1e60a1cd96a39163911edd821b3e316ca606
Merge: b77707a7b0 7bc4217495
Author: Tom Clegg <tom at curii.com>
Date:   Wed Nov 15 16:05:06 2023 -0500

    20846: Merge branch 'main' into 20846-ruby3
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>

diff --cc lib/install/deps.go
index a5cfe87952,500d1ec7b8..7b32984348
--- a/lib/install/deps.go
+++ b/lib/install/deps.go
@@@ -665,37 -693,15 +678,39 @@@ don
  				return 1
  			}
  		}
 +		cmd = exec.Command("sudo", "-u", "www-data", "/var/lib/arvados/bin/bundle", "exec", "passenger-config", "validate-install")
 +		cmd.Dir = "/var/lib/arvados/railsapi"
 +		cmd.Stdout = stdout
 +		cmd.Stderr = stderr
 +		err = cmd.Run()
 +		if err != nil && !strings.Contains(err.Error(), "exit status 2") {
 +			// Exit code 2 indicates there were warnings (like
 +			// "other passenger installations have been detected",
 +			// which we can't expect to avoid) but no errors.
 +			// Other non-zero exit codes (1, 9) indicate errors.
 +			return 1
 +		}
  
 -		// Install workbench2 app to /var/lib/arvados/workbench2/
 +		// Install workbench2 app to
 +		// /var/lib/arvados/workbench2/.
 +		//
 +		// We copy the source tree from the (possibly
 +		// readonly) source tree into a temp dir because `yarn
 +		// build` writes to {source-tree}/build/. When we
 +		// upgrade to react-scripts >= 4.0.2 we may be able to
 +		// build from the source dir and write directly to the
 +		// final destination (using
 +		// YARN_INSTALL_STATE_PATH=/dev/null
 +		// BUILD_PATH=/var/lib/arvados/workbench2) instead of
 +		// using two rsync steps here.
  		if err = inst.runBash(`
+ src="`+inst.SourcePath+`/services/workbench2"
  tmp=/var/lib/arvados/tmp/workbench2
 +trap "rm -r ${tmp}" ERR EXIT
- rsync -a --delete-after `+inst.SourcePath+`/services/workbench2/ "$tmp/"
- env -C "$tmp" VERSION="`+inst.PackageVersion+`" BUILD_NUMBER=1 GIT_COMMIT=000000000 yarn build
- rsync -a --delete-after "$tmp/build/" /var/lib/arvados/workbench2/
+ dst=/var/lib/arvados/workbench2
+ rsync -a --delete-after "$src/" "$tmp/"
+ env -C "$tmp" VERSION="`+inst.PackageVersion+`" BUILD_NUMBER=1 GIT_COMMIT="`+inst.Commit[:9]+`" yarn build
+ rsync -a --delete-after "$tmp/build/" "$dst/"
  `, stdout, stderr); err != nil {
  			return 1
  		}

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list