fix(slurm): correct PartitionInfoMaximums CpusPerNode/CpusPerSocket types to Uint32NoVal
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -307,7 +307,7 @@ func mapPartition(pi slurm.PartitionInfo) model.PartitionResponse {
|
|||||||
}
|
}
|
||||||
var maxCPUsPerNode *int32
|
var maxCPUsPerNode *int32
|
||||||
if pi.Maximums != nil {
|
if pi.Maximums != nil {
|
||||||
maxCPUsPerNode = pi.Maximums.CpusPerNode
|
maxCPUsPerNode = mapUint32NoValToInt32(pi.Maximums.CpusPerNode)
|
||||||
}
|
}
|
||||||
var minNodes *int32
|
var minNodes *int32
|
||||||
if pi.Minimums != nil {
|
if pi.Minimums != nil {
|
||||||
|
|||||||
@@ -54,8 +54,8 @@ type PartitionInfoMaximumsOversubscribe struct {
|
|||||||
|
|
||||||
// PartitionInfoMaximums represents maximum resource limits for a partition (v0.0.40_partition_info.maximums).
|
// PartitionInfoMaximums represents maximum resource limits for a partition (v0.0.40_partition_info.maximums).
|
||||||
type PartitionInfoMaximums struct {
|
type PartitionInfoMaximums struct {
|
||||||
CpusPerNode *int32 `json:"cpus_per_node,omitempty"`
|
CpusPerNode *Uint32NoVal `json:"cpus_per_node,omitempty"`
|
||||||
CpusPerSocket *int32 `json:"cpus_per_socket,omitempty"`
|
CpusPerSocket *Uint32NoVal `json:"cpus_per_socket,omitempty"`
|
||||||
MemoryPerCPU *int64 `json:"memory_per_cpu,omitempty"`
|
MemoryPerCPU *int64 `json:"memory_per_cpu,omitempty"`
|
||||||
PartitionMemoryPerCPU *Uint64NoVal `json:"partition_memory_per_cpu,omitempty"`
|
PartitionMemoryPerCPU *Uint64NoVal `json:"partition_memory_per_cpu,omitempty"`
|
||||||
PartitionMemoryPerNode *Uint64NoVal `json:"partition_memory_per_node,omitempty"`
|
PartitionMemoryPerNode *Uint64NoVal `json:"partition_memory_per_node,omitempty"`
|
||||||
|
|||||||
@@ -43,8 +43,8 @@ func TestPartitionInfoRoundTrip(t *testing.T) {
|
|||||||
},
|
},
|
||||||
GraceTime: Ptr(int32(300)),
|
GraceTime: Ptr(int32(300)),
|
||||||
Maximums: &PartitionInfoMaximums{
|
Maximums: &PartitionInfoMaximums{
|
||||||
CpusPerNode: Ptr(int32(128)),
|
CpusPerNode: &Uint32NoVal{Set: Ptr(true), Number: Ptr(int64(128))},
|
||||||
CpusPerSocket: Ptr(int32(64)),
|
CpusPerSocket: &Uint32NoVal{Set: Ptr(true), Number: Ptr(int64(64))},
|
||||||
MemoryPerCPU: Ptr(int64(8192)),
|
MemoryPerCPU: Ptr(int64(8192)),
|
||||||
PartitionMemoryPerCPU: &Uint64NoVal{Set: Ptr(true), Number: Ptr(int64(8192))},
|
PartitionMemoryPerCPU: &Uint64NoVal{Set: Ptr(true), Number: Ptr(int64(8192))},
|
||||||
PartitionMemoryPerNode: &Uint64NoVal{Set: Ptr(true), Number: Ptr(int64(262144))},
|
PartitionMemoryPerNode: &Uint64NoVal{Set: Ptr(true), Number: Ptr(int64(262144))},
|
||||||
|
|||||||
Reference in New Issue
Block a user