From 7106bcc1abbd2b2935ed54aa11dcdbd73eb34fe6 Mon Sep 17 00:00:00 2001 From: George Robinson Date: Tue, 23 Apr 2024 16:16:01 +0100 Subject: [PATCH] Fix version in APIv1 deprecation notice (#3815) Signed-off-by: George Robinson --- api/api.go | 2 +- api/metrics/metrics.go | 2 +- api/v1_deprecation_router.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/api.go b/api/api.go index 2e1e1ea4..97997c53 100644 --- a/api/api.go +++ b/api/api.go @@ -162,7 +162,7 @@ func New(opts Options) (*API, error) { // true for the concurrency limit, with the exception that it is only applied to // GET requests. func (api *API) Register(r *route.Router, routePrefix string) *http.ServeMux { - // TODO(gotjosh) API V1 was removed as of version 0.28, when we reach 1.0.0 we should removed these deprecation warnings. + // TODO(gotjosh) API V1 was removed as of version 0.27, when we reach 1.0.0 we should removed these deprecation warnings. api.deprecationRouter.Register(r.WithPrefix("/api/v1")) mux := http.NewServeMux() diff --git a/api/metrics/metrics.go b/api/metrics/metrics.go index ea45acc2..43901016 100644 --- a/api/metrics/metrics.go +++ b/api/metrics/metrics.go @@ -23,7 +23,7 @@ type Alerts struct { } // NewAlerts returns an *Alerts struct for the given API version. -// Since v1 was deprecated in 0.28, v2 is now hardcoded. +// Since v1 was deprecated in 0.27, v2 is now hardcoded. func NewAlerts(r prometheus.Registerer) *Alerts { numReceivedAlerts := prometheus.NewCounterVec(prometheus.CounterOpts{ Name: "alertmanager_alerts_received_total", diff --git a/api/v1_deprecation_router.go b/api/v1_deprecation_router.go index 46a61ebf..c50bfb04 100644 --- a/api/v1_deprecation_router.go +++ b/api/v1_deprecation_router.go @@ -54,7 +54,7 @@ func (dr *V1DeprecationRouter) deprecationHandler(w http.ResponseWriter, req *ht Error string `json:"error"` }{ "deprecated", - "The Alertmanager v1 API was deprecated in version 0.16.0 and is removed as of version 0.28.0 - please use the equivalent route in the v2 API", + "The Alertmanager v1 API was deprecated in version 0.16.0 and is removed as of version 0.27.0 - please use the equivalent route in the v2 API", } w.Header().Set("Content-Type", "application/json")