Closed kavirajk closed 3 years ago
The actual type of compactor_blocks_retention_period is model.Duration. Which comes from prometheus common package.
compactor_blocks_retention_period
model.Duration
common
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
What this PR does:
Which issue(s) this PR fixes: Fixes NA
Checklist
CHANGELOG.md
[CHANGE]
[FEATURE]
[ENHANCEMENT]
[BUGFIX]
The actual type of
compactor_blocks_retention_period
ismodel.Duration
. Which comes from prometheuscommon
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#L276So 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
What this PR does:
Which issue(s) this PR fixes: Fixes NA
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]