Skip to content

Commit 5578eeb

Browse files
authored
Dropping support Prometheus 1.x rule format on configdb (#4826)
* Dropping support Prometheus 1.x rule format on configdb Signed-off-by: Alan Protasio <[email protected]> * Update Changelog Signed-off-by: Alan Protasio <[email protected]> Signed-off-by: Alan Protasio <[email protected]>
1 parent c930bd6 commit 5578eeb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+23
-11881
lines changed

Diff for: CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
- `-flusher.wal-dir`, `-flusher.concurrent-flushes`, `-flusher.flush-op-timeout`
4040
* [CHANGE] Remove support for alertmanager and ruler legacy store configuration. Before upgrading, you need to convert your configuration to use the `alertmanager-storage` and `ruler-storage` configuration on the version that you're already running, then upgrade.
4141
* [CHANGE] Disables TSDB isolation. #4825
42+
* [CHANGE] Drops support Prometheus 1.x rule format on configdb. #4826
4243
* [ENHANCEMENT] Querier/Ruler: Retry store-gateway in case of unexpected failure, instead of failing the query. #4532
4344
* [ENHANCEMENT] Ring: DoBatch prioritize 4xx errors when failing. #4783
4445
* [ENHANCEMENT] Cortex now built with Go 1.18. #4829

Diff for: pkg/configs/api/api_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ func Test_SetConfig_ValidatesAlertmanagerConfig(t *testing.T) {
293293

294294
userID := makeUserID()
295295
for i, test := range amCfgValidationTests {
296-
cfg := userconfig.Config{AlertmanagerConfig: test.config}
296+
cfg := userconfig.Config{AlertmanagerConfig: test.config, RulesConfig: userconfig.RulesConfig{FormatVersion: userconfig.RuleFormatV2}}
297297
resp := requestAsUser(t, userID, "POST", "/api/prom/configs/alertmanager", "", readerFromConfig(t, cfg))
298298

299299
if !test.shouldFail {
@@ -322,7 +322,7 @@ func Test_SetConfig_ValidatesAlertmanagerConfig_WithEmailEnabled(t *testing.T) {
322322
defer cleanup(t)
323323

324324
userID := makeUserID()
325-
cfg := userconfig.Config{AlertmanagerConfig: config}
325+
cfg := userconfig.Config{AlertmanagerConfig: config, RulesConfig: userconfig.RulesConfig{FormatVersion: userconfig.RuleFormatV2}}
326326
resp := requestAsUser(t, userID, "POST", "/api/prom/configs/alertmanager", "", readerFromConfig(t, cfg))
327327

328328
assert.Equal(t, http.StatusNoContent, resp.Code)

Diff for: pkg/configs/api/helpers_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ func makeConfig() userconfig.Config {
9696
9797
receivers:
9898
- name: noop`),
99-
RulesConfig: userconfig.RulesConfig{},
99+
RulesConfig: userconfig.RulesConfig{FormatVersion: userconfig.RuleFormatV2},
100100
}
101101
}
102102

Diff for: pkg/configs/legacy_promql/ast.go

-340
This file was deleted.

0 commit comments

Comments
 (0)