diff --git a/staging/src/k8s.io/dynamic-resource-allocation/kubeletplugin/draplugin.go b/staging/src/k8s.io/dynamic-resource-allocation/kubeletplugin/draplugin.go index 06bde0ae3fa..3b1f1353fc6 100644 --- a/staging/src/k8s.io/dynamic-resource-allocation/kubeletplugin/draplugin.go +++ b/staging/src/k8s.io/dynamic-resource-allocation/kubeletplugin/draplugin.go @@ -115,7 +115,8 @@ type DRAPlugin interface { // and serialization. // // The conventions for returning one overall error and several per-ResourceClaim - // errors are the same as in PrepareResourceClaims. + // errors are the same as in PrepareResourceClaims. In particular, all claims + // must have an entry in the response, even if that entry is nil. UnprepareResourceClaims(ctx context.Context, claims []NamespacedObject) (result map[types.UID]error, err error) // ErrorHandler gets called for each error encountered while publishing diff --git a/staging/src/k8s.io/kubelet/pkg/apis/dra/v1beta1/api.pb.go b/staging/src/k8s.io/kubelet/pkg/apis/dra/v1beta1/api.pb.go index 2f024c614f1..4d84e530108 100644 --- a/staging/src/k8s.io/kubelet/pkg/apis/dra/v1beta1/api.pb.go +++ b/staging/src/k8s.io/kubelet/pkg/apis/dra/v1beta1/api.pb.go @@ -326,7 +326,8 @@ func (m *NodeUnprepareResourcesRequest) GetClaims() []*Claim { type NodeUnprepareResourcesResponse struct { // The ResourceClaims for which preparation was reverted. // The same rules as for NodePrepareResourcesResponse.claims - // apply. + // apply. In particular, all claims in the request must + // have an entry in the response, even if that entry is nil. Claims map[string]*NodeUnprepareResourceResponse `protobuf:"bytes,1,rep,name=claims,proto3" json:"claims,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` diff --git a/staging/src/k8s.io/kubelet/pkg/apis/dra/v1beta1/api.proto b/staging/src/k8s.io/kubelet/pkg/apis/dra/v1beta1/api.proto index 8afd10a05e3..e2f7960f486 100644 --- a/staging/src/k8s.io/kubelet/pkg/apis/dra/v1beta1/api.proto +++ b/staging/src/k8s.io/kubelet/pkg/apis/dra/v1beta1/api.proto @@ -95,7 +95,8 @@ message NodeUnprepareResourcesRequest { message NodeUnprepareResourcesResponse { // The ResourceClaims for which preparation was reverted. // The same rules as for NodePrepareResourcesResponse.claims - // apply. + // apply. In particular, all claims in the request must + // have an entry in the response, even if that entry is nil. map claims = 1; }