Skip to content

Commit

Permalink
Merge pull request #85 from cortexproject/fix-flaky-tests
Browse files Browse the repository at this point in the history
Always sort getOutputSeries labels for aggregate expr
  • Loading branch information
yeya24 authored Dec 30, 2023
2 parents 613b1ec + d74f18f commit cf35deb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions walk.go
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,9 @@ func getOutputSeries(expr parser.Expr) ([]labels.Labels, bool) {
for _, v := range m {
output = append(output, v)
}
sort.Slice(output, func(i, j int) bool {
return labels.Compare(output[i], output[j]) < 0
})
return output, false
case *parser.SubqueryExpr:
return getOutputSeries(node.Expr)
Expand Down

0 comments on commit cf35deb

Please sign in to comment.