From f098a10fbf883b35a7d7abaa6563e5df7823066d Mon Sep 17 00:00:00 2001 From: Kaviraj Date: Wed, 15 Sep 2021 14:50:22 +0200 Subject: [PATCH] Fix `compactor_blocks_retention_period` type in `extra_small_user` (https://github.com/grafana/cortex-jsonnet/pull/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 --- operations/mimir/config.libsonnet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/operations/mimir/config.libsonnet b/operations/mimir/config.libsonnet index 6369513cd63..f52b38d954f 100644 --- a/operations/mimir/config.libsonnet +++ b/operations/mimir/config.libsonnet @@ -358,7 +358,7 @@ ruler_max_rule_groups_per_tenant: 20, // No retention for now. - compactor_blocks_retention_period: 0, + compactor_blocks_retention_period: '0', }, medium_small_user:: {