Skip to content

Commit 9e2f5a3

Browse files
authored
Fix compactor_blocks_retention_period type in extra_small_user (grafana#395)
* Fix `compactor_blocks_retention_period` type in `extra_small_user` The actual type of `compactor_blocks_retention_period` is `model.Duration`. Which comes from prometheus `common` package. The problem is that `model.Duration` have custom JSON unmarshal which treat the incoming value as string. https://github.com/prometheus/common/blob/main/model/time.go#L276 So setting it as integer, won't work when unmarshalling with JSON. NOTE: This won't be an issue for YamlUnmarshal, as it always treating it as string (even though you put it as integer) https://github.com/prometheus/common/blob/main/model/time.go#L307 * update CHANGELOG
1 parent 1d5e6a4 commit 9e2f5a3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
* [BUGFIX] Fixed rollout progress dashboard to include query-scheduler too. #376
6363
* [BUGFIX] Fixed `-distributor.extend-writes` setting on ruler when `unregister_ingesters_on_shutdown` is disabled. #369
6464
* [BUGFIX] Upstream recording rule `node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate` renamed. #379
65+
* [BUGFIX] Treat `compactor_blocks_retention_period` type as string rather than int.#395
6566

6667
## 1.9.0 / 2021-05-18
6768

cortex/config.libsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@
358358
ruler_max_rule_groups_per_tenant: 20,
359359

360360
// No retention for now.
361-
compactor_blocks_retention_period: 0,
361+
compactor_blocks_retention_period: '0',
362362
},
363363

364364
medium_small_user:: {

0 commit comments

Comments
 (0)