Skip to content

Commit caa0979

Browse files
teoknopers8
authored andcommitted
[core] Sort detector list before including in ODC payload
1 parent 6f64bf3 commit caa0979

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/integration/odc/plugin.go

+3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import (
3333
"encoding/json"
3434
"fmt"
3535
"net/url"
36+
"slices"
3637
"strconv"
3738
"strings"
3839
"sync"
@@ -715,6 +716,7 @@ func (p *Plugin) ObjectStack(varStack map[string]string, baseConfigStack map[str
715716
if ok && strings.ToLower(strings.TrimSpace(ctpReadoutEnabled)) == "true" {
716717
detectorsSlice = append(detectorsSlice, "TRG")
717718
}
719+
slices.Sort(detectorsSlice)
718720
pdpDetectorList = strings.Join(detectorsSlice, ",")
719721
}
720722
accumulator = append(accumulator, fmt.Sprintf("WORKFLOW_DETECTORS='%s'", strings.TrimSpace(pdpDetectorList)))
@@ -1231,6 +1233,7 @@ func (p *Plugin) CallStack(data interface{}) (stack map[string]interface{}) {
12311233
if ok {
12321234
detectorsSlice, err := p.parseDetectors(detectorListS)
12331235
if err == nil {
1236+
slices.Sort(detectorsSlice)
12341237
arguments["detectors"] = strings.Join(detectorsSlice, ",")
12351238
} else {
12361239
log.WithField("partition", envId).

0 commit comments

Comments
 (0)