From c1ec1dce7547d3fbbf4fdd9ce2baf811620a869c Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Mon, 23 Sep 2024 17:48:01 +0200 Subject: [PATCH] DRA scheduler: code cleanup Comment fix and removal of `skippedUnknownDevice`. That field was originally meant to somehow influence how a failure to allocate gets reported, but in the end that distinction was not implemented. --- .../dynamic-resource-allocation/structured/allocator.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/staging/src/k8s.io/dynamic-resource-allocation/structured/allocator.go b/staging/src/k8s.io/dynamic-resource-allocation/structured/allocator.go index 5430ec0a08e..0b997207078 100644 --- a/staging/src/k8s.io/dynamic-resource-allocation/structured/allocator.go +++ b/staging/src/k8s.io/dynamic-resource-allocation/structured/allocator.go @@ -68,7 +68,7 @@ func NewAllocator(ctx context.Context, }, nil } -// ClaimsToAllocate returns the claims that the allocated was created for. +// ClaimsToAllocate returns the claims that the allocator was created for. func (a *Allocator) ClaimsToAllocate() []*resourceapi.ResourceClaim { return a.claimsToAllocate } @@ -354,7 +354,6 @@ type allocator struct { constraints [][]constraint // one list of constraints per claim requestData map[requestIndices]requestData // one entry per request allocated map[DeviceID]bool - skippedUnknownDevice bool result []*resourceapi.AllocationResult } @@ -620,9 +619,6 @@ func (alloc *allocator) isSelectable(r requestIndices, slice *resourceapi.Resour device := slice.Spec.Devices[deviceIndex].Basic if device == nil { // Must be some future, unknown device type. We cannot select it. - // If we don't find anything else, then this will get reported - // in the final result, so remember that we skipped some device. - alloc.skippedUnknownDevice = true return false, nil }