From e8e918f14c9426f527c9df69cebc91bd8622f085 Mon Sep 17 00:00:00 2001 From: Simone Basso Date: Wed, 18 Oct 2023 18:13:24 +0200 Subject: [PATCH 1/2] fix(nettests): failing to start a nettest is a warning Emitting an error causes ooni/probe-desktop to try to generate a warning window that (1) is a bit unpleasant to visually see and (2) more importantly is not proper to show, given that we have default-disabled experiments right now. See https://github.com/ooni/probe/issues/2576 for extra information. --- cmd/ooniprobe/internal/nettests/run.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/ooniprobe/internal/nettests/run.go b/cmd/ooniprobe/internal/nettests/run.go index 25385a647e..75c79ddf68 100644 --- a/cmd/ooniprobe/internal/nettests/run.go +++ b/cmd/ooniprobe/internal/nettests/run.go @@ -78,7 +78,7 @@ func RunGroup(config RunGroupConfig) error { return err } if err := sess.MaybeLookupBackends(); err != nil { - log.WithError(err).Warn("Failed to discover OONI backends") + log.WithError(err).Errorf("Failed to discover OONI backends") return err } @@ -116,7 +116,9 @@ func RunGroup(config RunGroupConfig) error { ctl.RunType = config.RunType ctl.SetNettestIndex(i, len(group.Nettests)) if err = nt.Run(ctl); err != nil { - log.WithError(err).Errorf("Failed to run %s", group.Label) + // Note that here we would like to emit a warning--the proper choice + // given that we continue running. See https://github.com/ooni/probe/issues/2576. + log.WithError(err).Warnf("Failed to run %s", group.Label) } } From d41d1ee7cae89371e551519e2a9afe1e766de706 Mon Sep 17 00:00:00 2001 From: Simone Basso Date: Wed, 18 Oct 2023 18:18:51 +0200 Subject: [PATCH 2/2] [ci skip] Update cmd/ooniprobe/internal/nettests/run.go --- cmd/ooniprobe/internal/nettests/run.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/ooniprobe/internal/nettests/run.go b/cmd/ooniprobe/internal/nettests/run.go index 75c79ddf68..503124aaec 100644 --- a/cmd/ooniprobe/internal/nettests/run.go +++ b/cmd/ooniprobe/internal/nettests/run.go @@ -116,7 +116,7 @@ func RunGroup(config RunGroupConfig) error { ctl.RunType = config.RunType ctl.SetNettestIndex(i, len(group.Nettests)) if err = nt.Run(ctl); err != nil { - // Note that here we would like to emit a warning--the proper choice + // We used to emit an error here, now we emit a warning--the proper choice // given that we continue running. See https://github.com/ooni/probe/issues/2576. log.WithError(err).Warnf("Failed to run %s", group.Label) }