mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-03-11 15:34:56 +00:00
app/vmalert: consistently sort groups by name and filename on /groups
page
This should prevent non-deterministic sorting for groups with identical names. Signed-off-by: hagen1778 <roman@victoriametrics.com>
This commit is contained in:
parent
11e0bc88a2
commit
76a82cd4e5
2 changed files with 6 additions and 1 deletions
|
@ -199,7 +199,11 @@ func (rh *requestHandler) groups() []APIGroup {
|
|||
|
||||
// sort list of alerts for deterministic output
|
||||
sort.Slice(groups, func(i, j int) bool {
|
||||
return groups[i].Name < groups[j].Name
|
||||
a, b := groups[i], groups[j]
|
||||
if a.Name != b.Name {
|
||||
return a.Name < b.Name
|
||||
}
|
||||
return a.File < b.File
|
||||
})
|
||||
|
||||
return groups
|
||||
|
|
|
@ -13,6 +13,7 @@ The following `tip` changes can be tested by building VictoriaMetrics components
|
|||
|
||||
* BUGFIX: fix the misleading error `0ms is out of allowed range [0 ...` when passing `step=0` to [/api/v1/query](https://docs.victoriametrics.com/keyconcepts/#instant-query)
|
||||
or [/api/v1/query_range](https://docs.victoriametrics.com/keyconcepts/#range-query). See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5795).
|
||||
* BUGFIX: [vmalert](https://docs.victoriametrics.com/#vmalert): consistently sort groups by name and filename on `/groups` page in UI. This should prevent non-deterministic sorting for groups with identical names.
|
||||
|
||||
## [v1.93.12](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.93.12)
|
||||
|
||||
|
|
Loading…
Reference in a new issue