Skip to content

Commit

Permalink
fix(nettests): failing to start a nettest is a warning
Browse files Browse the repository at this point in the history
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 ooni/probe#2576 for extra information.
  • Loading branch information
bassosimone committed Oct 18, 2023
1 parent 657fed6 commit e8e918f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/ooniprobe/internal/nettests/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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)
}
}

Expand Down

0 comments on commit e8e918f

Please sign in to comment.