mirror of
https://github.com/prometheus/prometheus.git
synced 2026-02-03 20:39:32 -05:00
The isZero() method was missing checks for 9 fields that exist in the GlobalConfig struct. This caused the method to incorrectly return true when only these fields had non-zero values, resulting in user configurations being silently overwritten with defaults during YAML unmarshaling. Added checks for: BodySizeLimit, SampleLimit, TargetLimit, LabelLimit, LabelNameLengthLimit, LabelValueLengthLimit, KeepDroppedTargets, MetricNameValidationScheme, and MetricNameEscapingScheme. Consolidated TestEmptyGlobalBlock and new isZero tests under TestGlobalConfig. Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> |
||
|---|---|---|
| .. | ||
| testdata | ||
| config.go | ||
| config_default_test.go | ||
| config_test.go | ||
| config_windows_test.go | ||
| reload.go | ||
| reload_test.go | ||