Skip to content

Commit

Permalink
fix: fix error message for unsupported versions
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Pasquier <[email protected]>
  • Loading branch information
simonpasquier committed Sep 24, 2024
1 parent 841c0d7 commit e22d9df
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## Unreleased

* [BUGFIX] Fix Thanos Ruler reconciliations not triggered on StatefulSet updates. #6964
* [BUGFIX] Fix error message for unsupported versions. #6965

## 0.77.0 / 2024-09-19

Expand Down
2 changes: 1 addition & 1 deletion pkg/alertmanager/statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ func makeStatefulSetSpec(logger *slog.Logger, a *monitoringv1.Alertmanager, conf
})
}
default:
return nil, fmt.Errorf("unsupported Alertmanager major version %s", version)
return nil, fmt.Errorf("unsupported Alertmanager version %q", amVersion)
}

volumes := []v1.Volume{
Expand Down
2 changes: 1 addition & 1 deletion pkg/prometheus/promcfg.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func NewConfigGenerator(
}

if version.Major != 2 && version.Major != 3 {
return nil, fmt.Errorf("unsupported Prometheus major version %s: %w", version, err)
return nil, fmt.Errorf("unsupported Prometheus version %q", promVersion)
}

logger = logger.With("version", promVersion)
Expand Down

0 comments on commit e22d9df

Please sign in to comment.