Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix version in APIv1 deprecation notice #3815

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion api/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion api/v1_deprecation_router.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Loading