diff --git a/diagnostics/diagnostics.go b/diagnostics/diagnostics.go index b836e4b37..c653a7052 100644 --- a/diagnostics/diagnostics.go +++ b/diagnostics/diagnostics.go @@ -126,7 +126,7 @@ func (d *Diagnostics) Open() { } d.cb = gobreaker.NewCircuitBreaker(st) - d.logger().Printf("Pilosa is currently configured to send small diagnostics reports to our team every hour. More information here: https://www.pilosa.com/docs/latest/administration/") + d.logger().Printf("Pilosa is currently configured to send small diagnostics reports to our team every hour. More information here: https://www.pilosa.com/docs/latest/administration/#diagnostics") } // Close notify goroutine to stop. @@ -171,11 +171,11 @@ func (d *Diagnostics) CompareVersion(value string) error { localVersion := VersionSegments(d.version) if localVersion[0] < currentVersion[0] { //Major - return fmt.Errorf("Warning: You are running Pilosa %s, but a newer version is available %s", d.version, value) + return fmt.Errorf("Warning: You are running Pilosa %s. A newer version (%s) is available: https://github.com/pilosa/pilosa/releases", d.version, value) } else if localVersion[1] < currentVersion[1] { // Minor - return fmt.Errorf("Warning: You are running Pilosa %s. The latest Minor release is %s", d.version, value) + return fmt.Errorf("Warning: You are running Pilosa %s. The latest Minor release is %s: https://github.com/pilosa/pilosa/releases", d.version, value) } else if localVersion[2] < currentVersion[2] { // Patch - return fmt.Errorf("There is a new patch relese of Pilosa availbale: %s", value) + return fmt.Errorf("There is a new patch release of Pilosa availbale: %s: https://github.com/pilosa/pilosa/releases", value) } return nil diff --git a/diagnostics/diagnostics_test.go b/diagnostics/diagnostics_test.go index 18ea8d38e..6ad0cb773 100644 --- a/diagnostics/diagnostics_test.go +++ b/diagnostics/diagnostics_test.go @@ -76,12 +76,12 @@ func TestDiagnosticsVersion_Compare(t *testing.T) { version := "v0.1.1" d.SetVersion(version) - err := d.CompareVersion("1.7.0") - if !strings.Contains(err.Error(), "a newer version is available ") { + err := d.CompareVersion("v1.7.0") + if !strings.Contains(err.Error(), "A newer version") { t.Fatalf("Expected a newer version is available, actual error: %s", err) } err = d.CompareVersion("1.7.0") - if !strings.Contains(err.Error(), "a newer version is available ") { + if !strings.Contains(err.Error(), "A newer version") { t.Fatalf("Expected a newer version is available, actual error: %s", err) } err = d.CompareVersion("0.7.0") @@ -89,7 +89,7 @@ func TestDiagnosticsVersion_Compare(t *testing.T) { t.Fatalf("Expected Minor Version Missmatch, actual error: %s", err) } err = d.CompareVersion("0.1.2") - if !strings.Contains(err.Error(), "There is a new patch relese of Pilosa") { + if !strings.Contains(err.Error(), "There is a new patch release of Pilosa") { t.Fatalf("Expected Patch Version Missmatch, actual error: %s", err) } err = d.CompareVersion("0.1.1")