Skip to content

Commit 2e548c7

Browse files
committed
[core] Ensure we don't overwrite the devices now that it's a pointer
1 parent 7dfa17d commit 2e548c7

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

core/integration/odc/plugin.go

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -459,9 +459,18 @@ func (p *Plugin) GetEnvironmentsShortData(envIds []uid.ID) map[uid.ID]string {
459459
continue
460460
}
461461

462-
partitionInfo.Devices = nil // don't return the full devices payload
463-
464-
partitionInfoOut, err := json.Marshal(partitionInfo)
462+
// return everything except the devices
463+
partitionInfoPayload := &OdcPartitionInfo{
464+
PartitionId: partitionInfo.PartitionId,
465+
RunNumber: partitionInfo.RunNumber,
466+
State: partitionInfo.State,
467+
EcsState: partitionInfo.EcsState,
468+
DdsSessionId: partitionInfo.DdsSessionId,
469+
DdsSessionStatus: partitionInfo.DdsSessionStatus,
470+
Hosts: partitionInfo.Hosts,
471+
}
472+
473+
partitionInfoOut, err := json.Marshal(partitionInfoPayload)
465474
if err != nil {
466475
continue
467476
}

0 commit comments

Comments
 (0)