[ARVADOS] updated: 2.1.0-901-gc44b26cec
Git user
git at public.arvados.org
Tue Jun 8 15:28:59 UTC 2021
Summary of changes:
lib/diagnostics/cmd.go | 27 +++++++++++++++++----------
1 file changed, 17 insertions(+), 10 deletions(-)
via c44b26cec9a66385796ee410dfb0eba90068ca35 (commit)
via b8adfd5cae9c63359868c4e9768864dda4dc9d3d (commit)
from 0e188b03eb77eff1f284092f909ea145857978da (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 c44b26cec9a66385796ee410dfb0eba90068ca35
Author: Tom Clegg <tom at curii.com>
Date: Tue Jun 8 02:08:43 2021 -0400
17609: Tweak messages.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/lib/diagnostics/cmd.go b/lib/diagnostics/cmd.go
index 1c7b98baf..b0241b3ae 100644
--- a/lib/diagnostics/cmd.go
+++ b/lib/diagnostics/cmd.go
@@ -72,15 +72,15 @@ type diagnoser struct {
}
func (diag *diagnoser) debugf(f string, args ...interface{}) {
- diag.logger.Debugf(f, args...)
+ diag.logger.Debugf(" ... "+f, args...)
}
func (diag *diagnoser) infof(f string, args ...interface{}) {
- diag.logger.Infof(f, args...)
+ diag.logger.Infof(" ... "+f, args...)
}
func (diag *diagnoser) warnf(f string, args ...interface{}) {
- diag.logger.Warnf(f, args...)
+ diag.logger.Warnf(" ... "+f, args...)
}
func (diag *diagnoser) errorf(f string, args ...interface{}) {
@@ -101,14 +101,14 @@ func (diag *diagnoser) dotest(id int, title string, fn func() error) {
}
diag.done[id] = true
- diag.infof("%4d: %s", id, title)
+ diag.logger.Infof("%4d: %s", id, title)
t0 := time.Now()
err := fn()
- elapsed := fmt.Sprintf("%.0dms", time.Now().Sub(t0)/time.Millisecond)
+ elapsed := fmt.Sprintf("%d ms", time.Now().Sub(t0)/time.Millisecond)
if err != nil {
diag.errorf("%4d: %s (%s): %s", id, title, elapsed, err)
} else {
- diag.debugf("%4d: %s (%s): ok", id, title, elapsed)
+ diag.logger.Debugf("%4d: %s (%s): ok", id, title, elapsed)
}
}
@@ -533,7 +533,7 @@ func (diag *diagnoser) runtests() {
diag.dotest(160, "running a container", func() error {
if diag.priority < 1 {
- diag.debugf("skipping, caller requested priority<1 (%d)", diag.priority)
+ diag.infof("skipping (use priority > 0 if you want to run a container)")
return nil
}
if project.UUID == "" {
commit b8adfd5cae9c63359868c4e9768864dda4dc9d3d
Author: Tom Clegg <tom at curii.com>
Date: Tue Jun 8 01:53:12 2021 -0400
17609: Behave better when project creation fails.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/lib/diagnostics/cmd.go b/lib/diagnostics/cmd.go
index 2f43263e5..1c7b98baf 100644
--- a/lib/diagnostics/cmd.go
+++ b/lib/diagnostics/cmd.go
@@ -31,7 +31,7 @@ func (cmd Command) RunCommand(prog string, args []string, stdin io.Reader, stdou
f.StringVar(&diag.logLevel, "log-level", "info", "logging level (debug, info, warning, error)")
f.BoolVar(&diag.checkInternal, "internal-client", false, "check that this host is considered an \"internal\" client")
f.BoolVar(&diag.checkExternal, "external-client", false, "check that this host is considered an \"external\" client")
- f.IntVar(&diag.priority, "priority", 500, "priority for test container (1..1000)")
+ f.IntVar(&diag.priority, "priority", 500, "priority for test container (1..1000, or 0 to skip)")
f.DurationVar(&diag.timeout, "timeout", 10*time.Second, "timeout for http requests")
err := f.Parse(args)
if err == flag.ErrHelp {
@@ -334,13 +334,17 @@ func (diag *diagnoser) runtests() {
var collection arvados.Collection
diag.dotest(90, "creating temporary collection", func() error {
+ if project.UUID == "" {
+ return fmt.Errorf("skipping, no project to work in")
+ }
ctx, cancel := context.WithDeadline(context.Background(), time.Now().Add(diag.timeout))
defer cancel()
err := client.RequestAndDecodeContext(ctx, &collection, "POST", "arvados/v1/collections", nil, map[string]interface{}{
"ensure_unique_name": true,
"collection": map[string]interface{}{
- "name": "test collection",
- "trash_at": time.Now().Add(time.Hour)}})
+ "owner_uuid": project.UUID,
+ "name": "test collection",
+ "trash_at": time.Now().Add(time.Hour)}})
if err != nil {
return err
}
@@ -532,6 +536,9 @@ func (diag *diagnoser) runtests() {
diag.debugf("skipping, caller requested priority<1 (%d)", diag.priority)
return nil
}
+ if project.UUID == "" {
+ return fmt.Errorf("skipping, no project to work in")
+ }
var cr arvados.ContainerRequest
ctx, cancel := context.WithDeadline(context.Background(), time.Now().Add(diag.timeout))
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list