Skip to content

Commit daaf1ff

Browse files
committed
[core] Special case for COSMICS run type in DCS
1 parent 22ba0ac commit daaf1ff

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

core/integration/dcs/plugin.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,14 @@ func (p *Plugin) CallStack(data interface{}) (stack map[string]interface{}) {
244244
// so we convert from the provided string to the correct enum value in common/runtype
245245
intRt, err := runtype.RunTypeString(runTypeS)
246246
if err == nil {
247-
// the runType was correctly matched to the common/runtype enum, but since the DCS enum is
248-
// kept compatible, we can directly convert the runtype.RunType to a dcspb.RunType enum value
249-
rt = dcspb.RunType(intRt)
247+
if intRt == runtype.COSMICS {
248+
// special case for COSMICS runs: there is no DCS run type for it, so we send PHYSICS
249+
rt = dcspb.RunType_PHYSICS
250+
} else {
251+
// the runType was correctly matched to the common/runtype enum, but since the DCS enum is
252+
// kept compatible, we can directly convert the runtype.RunType to a dcspb.RunType enum value
253+
rt = dcspb.RunType(intRt)
254+
}
250255
}
251256
}
252257

0 commit comments

Comments
 (0)