alertmanager/api/v2
George Robinson fa6a7e6dd6
Fix inconsistent defaults in UTF-8 behavior (#3668)
This commit fixes inconsistent UTF-8 behavior if the compat package is
not initialized and feature flags are not passed to the API. This can
happen when Alertmanager is used as a package in software such
as Cortex or Mimir.

The inconsistent behavior is that Alertmanager will accept UTF-8 alerts
but reject UTF-8 configurations.

Since feature flags are optional via api.Options, we cannot force them
to be passed to api.New at compile time. Instead, it's better to defer
back to the compat package which is consistent even when not initialized.

Signed-off-by: George Robinson <george.robinson@grafana.com>
2024-01-15 10:03:51 +00:00
..
client API: Allow the Silences API to use their own 400 response (#3610) 2023-11-22 10:25:27 +00:00
models Bump: go-swagger to latest stable 2023-10-19 12:11:29 +01:00
restapi API: Allow the Silences API to use their own 400 response (#3610) 2023-11-22 10:25:27 +00:00
api.go Fix inconsistent defaults in UTF-8 behavior (#3668) 2024-01-15 10:03:51 +00:00
api_test.go api/v2: Delete silence respond with 404 when silence is not found (#3352) 2023-05-05 14:06:26 +01:00
compat.go Update golangci-lint and fix complaints (#2853) 2022-03-25 17:59:51 +01:00
openapi.yaml API: Allow the Silences API to use their own 400 response (#3610) 2023-11-22 10:25:27 +00:00
testing.go Refactor POST /api/v1/silences 2022-07-06 18:34:57 +01:00