Skip to content

Commit

Permalink
[core] Sort detector list before including in ODC payload
Browse files Browse the repository at this point in the history
  • Loading branch information
teo authored and knopers8 committed Dec 12, 2024
1 parent 6f64bf3 commit caa0979
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/integration/odc/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import (
"encoding/json"
"fmt"
"net/url"
"slices"
"strconv"
"strings"
"sync"
Expand Down Expand Up @@ -715,6 +716,7 @@ func (p *Plugin) ObjectStack(varStack map[string]string, baseConfigStack map[str
if ok && strings.ToLower(strings.TrimSpace(ctpReadoutEnabled)) == "true" {
detectorsSlice = append(detectorsSlice, "TRG")
}
slices.Sort(detectorsSlice)
pdpDetectorList = strings.Join(detectorsSlice, ",")
}
accumulator = append(accumulator, fmt.Sprintf("WORKFLOW_DETECTORS='%s'", strings.TrimSpace(pdpDetectorList)))
Expand Down Expand Up @@ -1231,6 +1233,7 @@ func (p *Plugin) CallStack(data interface{}) (stack map[string]interface{}) {
if ok {
detectorsSlice, err := p.parseDetectors(detectorListS)
if err == nil {
slices.Sort(detectorsSlice)
arguments["detectors"] = strings.Join(detectorsSlice, ",")
} else {
log.WithField("partition", envId).
Expand Down

0 comments on commit caa0979

Please sign in to comment.