[arvados] updated: 2.7.0-5348-gf5fd7e2dc1
git repository hosting
git at public.arvados.org
Mon Nov 13 16:51:51 UTC 2023
Summary of changes:
build/run-tests.sh | 16 +++++++++++++++-
cmd/arvados-package/cmd.go | 2 +-
lib/boot/workbench2.go | 27 ++++++++++++++++++---------
lib/cmd/cmd.go | 20 +++++++++++++++++++-
lib/install/deps.go | 26 +++++++++++++++++++++-----
5 files changed, 74 insertions(+), 17 deletions(-)
via f5fd7e2dc13b912e1032a54119f3fb60973f77e2 (commit)
via 5f3520a80c66558c2a6b1a48ebc0eedb4d5e8f96 (commit)
via b9b2513a621b6704157a1078e3b2ec75b3c92d1c (commit)
via d3cb0cad7f052987651a9f0b2237329cf3997c58 (commit)
via 91d9e964f9769347044ebaac556cd56360d96d2a (commit)
from 4f06e4dc7e9eb5ad04703dbbaa47370e6baeb9a1 (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 f5fd7e2dc13b912e1032a54119f3fb60973f77e2
Author: Tom Clegg <tom at curii.com>
Date: Sat Nov 11 20:07:16 2023 -0500
18874: Fix wb2 install/boot to accommodate readonly source tree.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/lib/boot/workbench2.go b/lib/boot/workbench2.go
index 149487cdb6..8c8c607f45 100644
--- a/lib/boot/workbench2.go
+++ b/lib/boot/workbench2.go
@@ -38,21 +38,30 @@ func (runner runWorkbench2) Run(ctx context.Context, fail func(error), super *Su
user: "www-data",
}, "arvados-server", "workbench2", super.cluster.Services.Controller.ExternalURL.Host, net.JoinHostPort(host, port), ".")
} else {
- stdinr, stdinw := io.Pipe()
- defer stdinw.Close()
- go func() {
- <-ctx.Done()
- stdinw.Close()
- }()
- if err = os.Mkdir(super.SourcePath+"/services/workbench2/public/_health", 0777); err != nil && !errors.Is(err, fs.ErrExist) {
+ // super.SourcePath might be readonly, so for
+ // dev/test mode we make a copy in a writable
+ // dir.
+ livedir := super.wwwtempdir + "/workbench2"
+ if err := super.RunProgram(ctx, super.SourcePath+"/services/workbench2", runOptions{}, "rsync", "-a", "--delete-after", super.SourcePath+"/services/workbench2/", livedir); err != nil {
+ fail(err)
+ return
+ }
+ if err = os.Mkdir(livedir+"/public/_health", 0777); err != nil && !errors.Is(err, fs.ErrExist) {
fail(err)
return
}
- if err = ioutil.WriteFile(super.SourcePath+"/services/workbench2/public/_health/ping", []byte(`{"health":"OK"}`), 0666); err != nil {
+ if err = ioutil.WriteFile(livedir+"/public/_health/ping", []byte(`{"health":"OK"}`), 0666); err != nil {
fail(err)
return
}
- err = super.RunProgram(ctx, super.SourcePath+"/services/workbench2", runOptions{
+
+ stdinr, stdinw := io.Pipe()
+ defer stdinw.Close()
+ go func() {
+ <-ctx.Done()
+ stdinw.Close()
+ }()
+ err = super.RunProgram(ctx, livedir, runOptions{
env: []string{
"CI=true",
"HTTPS=false",
diff --git a/lib/install/deps.go b/lib/install/deps.go
index 6c12a52c8f..500d1ec7b8 100644
--- a/lib/install/deps.go
+++ b/lib/install/deps.go
@@ -696,9 +696,12 @@ done
// Install workbench2 app to /var/lib/arvados/workbench2/
if err = inst.runBash(`
-cd "`+inst.SourcePath+`/services/workbench2"
-VERSION="`+inst.PackageVersion+`" BUILD_NUMBER=1 GIT_COMMIT="`+inst.Commit[:9]+`" yarn build
-rsync -a --delete-after build/ /var/lib/arvados/workbench2/
+src="`+inst.SourcePath+`/services/workbench2"
+tmp=/var/lib/arvados/tmp/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
}
commit 5f3520a80c66558c2a6b1a48ebc0eedb4d5e8f96
Author: Tom Clegg <tom at curii.com>
Date: Sat Nov 11 18:33:27 2023 -0500
18874: Embed real git commit in wb2 build.
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 3d4092e6b8..2b08ab4822 100644
--- a/lib/cmd/cmd.go
+++ b/lib/cmd/cmd.go
@@ -14,6 +14,7 @@ import (
"path/filepath"
"regexp"
"runtime"
+ "runtime/debug"
"sort"
"strings"
@@ -35,7 +36,13 @@ func (f HandlerFunc) RunCommand(prog string, args []string, stdin io.Reader, std
// 0.
var Version versionCommand
-var version = "dev"
+var (
+ // These default version/commit strings should be set at build
+ // time: `go install -buildvcs=false -ldflags "-X
+ // git.arvados.org/arvados.git/lib/cmd.version=1.2.3"`
+ version = "dev"
+ commit = "0000000000000000000000000000000000000000"
+)
type versionCommand struct{}
@@ -43,6 +50,17 @@ func (versionCommand) String() string {
return fmt.Sprintf("%s (%s)", version, runtime.Version())
}
+func (versionCommand) Commit() string {
+ if bi, ok := debug.ReadBuildInfo(); ok {
+ for _, bs := range bi.Settings {
+ if bs.Key == "vcs.revision" {
+ return bs.Value
+ }
+ }
+ }
+ return commit
+}
+
func (versionCommand) RunCommand(prog string, args []string, stdin io.Reader, stdout, stderr io.Writer) int {
prog = regexp.MustCompile(` -*version$`).ReplaceAllLiteralString(prog, "")
fmt.Fprintf(stdout, "%s %s (%s)\n", prog, version, runtime.Version())
diff --git a/lib/install/deps.go b/lib/install/deps.go
index 89b078e347..6c12a52c8f 100644
--- a/lib/install/deps.go
+++ b/lib/install/deps.go
@@ -49,6 +49,7 @@ var arvadosServiceFile []byte
type installCommand struct {
ClusterType string
SourcePath string
+ Commit string
PackageVersion string
EatMyData bool
}
@@ -71,6 +72,7 @@ func (inst *installCommand) RunCommand(prog string, args []string, stdin io.Read
versionFlag := flags.Bool("version", false, "Write version information to stdout and exit 0")
flags.StringVar(&inst.ClusterType, "type", "production", "cluster `type`: development, test, production, or package")
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.BoolVar(&inst.EatMyData, "eatmydata", false, "use eatmydata to speed up install")
@@ -80,6 +82,14 @@ func (inst *installCommand) RunCommand(prog string, args []string, stdin io.Read
return cmd.Version.RunCommand(prog, args, stdin, stdout, stderr)
}
+ if inst.Commit == "" {
+ if commit, err := exec.Command("env", "-C", inst.SourcePath, "git", "log", "-n1", "--format=%H").CombinedOutput(); err == nil {
+ inst.Commit = strings.TrimSpace(string(commit))
+ } else {
+ inst.Commit = "0000000000000000000000000000000000000000"
+ }
+ }
+
var dev, test, prod, pkg bool
switch inst.ClusterType {
case "development":
@@ -563,7 +573,10 @@ ln -sfv /var/lib/arvados/node-`+nodejsversion+`-linux-x64/bin/{yarn,yarnpkg} /us
// container using a non-root-owned git tree
// mounted from the host -- as in
// "arvados-package build".
- cmd := exec.Command("go", "install", "-buildvcs=false", "-ldflags", "-X git.arvados.org/arvados.git/lib/cmd.version="+inst.PackageVersion+" -X main.version="+inst.PackageVersion+" -s -w")
+ cmd := exec.Command("go", "install", "-buildvcs=false",
+ "-ldflags", "-s -w"+
+ " -X git.arvados.org/arvados.git/lib/cmd.version="+inst.PackageVersion+
+ " -X git.arvados.org/arvados.git/lib/cmd.commit="+inst.Commit)
cmd.Env = append(cmd.Env, os.Environ()...)
cmd.Env = append(cmd.Env, "GOBIN=/var/lib/arvados/bin")
cmd.Dir = filepath.Join(inst.SourcePath, srcdir)
@@ -683,8 +696,8 @@ done
// Install workbench2 app to /var/lib/arvados/workbench2/
if err = inst.runBash(`
-cd `+inst.SourcePath+`/services/workbench2
-VERSION="`+inst.PackageVersion+`" BUILD_NUMBER=1 GIT_COMMIT=000000000 yarn build
+cd "`+inst.SourcePath+`/services/workbench2"
+VERSION="`+inst.PackageVersion+`" BUILD_NUMBER=1 GIT_COMMIT="`+inst.Commit[:9]+`" yarn build
rsync -a --delete-after build/ /var/lib/arvados/workbench2/
`, stdout, stderr); err != nil {
return 1
commit b9b2513a621b6704157a1078e3b2ec75b3c92d1c
Author: Tom Clegg <tom at curii.com>
Date: Sat Nov 11 17:03:12 2023 -0500
18874: Update package-building test OS to debian:11.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/cmd/arvados-package/cmd.go b/cmd/arvados-package/cmd.go
index db3d63f277..c16d8a1c95 100644
--- a/cmd/arvados-package/cmd.go
+++ b/cmd/arvados-package/cmd.go
@@ -71,7 +71,7 @@ type opts struct {
func parseFlags(prog string, args []string, stderr io.Writer) (_ opts, ok bool, exitCode int) {
opts := opts{
SourceDir: ".",
- TargetOS: "debian:10",
+ TargetOS: "debian:11",
Maintainer: "Arvados Package Maintainers <packaging at arvados.org>",
Vendor: "The Arvados Project",
}
commit d3cb0cad7f052987651a9f0b2237329cf3997c58
Author: Tom Clegg <tom at curii.com>
Date: Sat Nov 11 17:02:55 2023 -0500
18874: Update setuptools/pip requirements.
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 62438645ff..89b078e347 100644
--- a/lib/install/deps.go
+++ b/lib/install/deps.go
@@ -598,7 +598,7 @@ v=/var/lib/arvados/lib/python
tmp=/var/lib/arvados/tmp/python
python3 -m venv "$v"
. "$v/bin/activate"
-pip3 install --no-cache-dir 'setuptools>=18.5' 'pip>=7'
+pip3 install --no-cache-dir 'setuptools>=68' 'pip>=20'
export ARVADOS_BUILDING_VERSION="`+inst.PackageVersion+`"
for src in "`+inst.SourcePath+`/sdk/python" "`+inst.SourcePath+`/services/fuse"; do
rsync -a --delete-after "$src/" "$tmp/"
commit 91d9e964f9769347044ebaac556cd56360d96d2a
Author: Tom Clegg <tom at curii.com>
Date: Sat Nov 11 16:49:53 2023 -0500
18874: Don't bring up test services for package/boot/install tests.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/build/run-tests.sh b/build/run-tests.sh
index 9586a085a3..2cd8fdd6eb 100755
--- a/build/run-tests.sh
+++ b/build/run-tests.sh
@@ -710,7 +710,21 @@ do_test() {
stop_services
check_arvados_config "$1"
;;
- gofmt | doc | lib/cli | lib/cloud/azure | lib/cloud/ec2 | lib/cloud/cloudtest | lib/cmd | lib/dispatchcloud/sshexecutor | lib/dispatchcloud/worker | services/workbench2_units | services/workbench2_integration)
+ gofmt \
+ | cmd/arvados-package \
+ | doc \
+ | lib/boot \
+ | lib/cli \
+ | lib/cloud/azure \
+ | lib/cloud/cloudtest \
+ | lib/cloud/ec2 \
+ | lib/cmd \
+ | lib/dispatchcloud/sshexecutor \
+ | lib/dispatchcloud/worker \
+ | lib/install \
+ | services/workbench2_integration \
+ | services/workbench2_units \
+ )
check_arvados_config "$1"
# don't care whether services are running
;;
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list