Skip to content

Commit

Permalink
[core] Ensure we don't overwrite the devices now that it's a pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
teo committed Jun 4, 2024
1 parent 1124de5 commit 89c1941
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions core/integration/odc/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -459,9 +459,18 @@ func (p *Plugin) GetEnvironmentsShortData(envIds []uid.ID) map[uid.ID]string {
continue
}

partitionInfo.Devices = nil // don't return the full devices payload

partitionInfoOut, err := json.Marshal(partitionInfo)
// return everything except the devices
partitionInfoPayload := &OdcPartitionInfo{
PartitionId: partitionInfo.PartitionId,
RunNumber: partitionInfo.RunNumber,
State: partitionInfo.State,
EcsState: partitionInfo.EcsState,
DdsSessionId: partitionInfo.DdsSessionId,
DdsSessionStatus: partitionInfo.DdsSessionStatus,
Hosts: partitionInfo.Hosts,
}

partitionInfoOut, err := json.Marshal(partitionInfoPayload)
if err != nil {
continue
}
Expand Down

0 comments on commit 89c1941

Please sign in to comment.