Skip to content

Commit

Permalink
Merge pull request kubernetes#552 from Fish-pro/chore/convert
Browse files Browse the repository at this point in the history
Clean up unnecessary whitespace and convert
  • Loading branch information
k8s-ci-robot authored Feb 6, 2023
2 parents e4e5b35 + e3dfbf5 commit 5e13ae8
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion apis/kueue/webhooks/workload_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func ValidateWorkload(obj *kueue.Workload) field.ErrorList {
}

if len(obj.Spec.QueueName) > 0 {
allErrs = append(allErrs, validateNameReference(string(obj.Spec.QueueName), specPath.Child("queueName"))...)
allErrs = append(allErrs, validateNameReference(obj.Spec.QueueName, specPath.Child("queueName"))...)
}

if obj.Spec.Admission != nil {
Expand Down
3 changes: 1 addition & 2 deletions pkg/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ func (c *ClusterQueue) UpdateCodependentResources() {
}
if len(codep) > 1 {
for name := range codep {
c.RequestableResources[corev1.ResourceName(name)].CodependentResources = codep
c.RequestableResources[name].CodependentResources = codep
}
}
}
Expand Down Expand Up @@ -872,7 +872,6 @@ func resourcesByName(in []kueue.Resource) map[corev1.ResourceName]*Resource {
fLimits.Max = pointer.Int64(workload.ResourceValue(r.Name, *f.Quota.Max))
}
flavors[i] = fLimits

}
out[r.Name] = &Resource{
Flavors: flavors,
Expand Down
1 change: 0 additions & 1 deletion pkg/controller/core/workload_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ func (r *WorkloadReconciler) Delete(e event.DeleteEvent) bool {
// the state is unknown, the workload could have been assumed and we need
// to clear it from the cache.
if wl.Spec.Admission != nil || e.DeleteStateUnknown {

// trigger the move of associated inadmissibleWorkloads if required.
r.queues.QueueAssociatedInadmissibleWorkloadsAfter(ctx, wl, func() {
// Delete the workload from cache while holding the queues lock
Expand Down
2 changes: 0 additions & 2 deletions pkg/controller/workload/job/job_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ func NewReconciler(
client client.Client,
record record.EventRecorder,
opts ...Option) *JobReconciler {

options := defaultOptions
for _, opt := range opts {
opt(&options)
Expand Down Expand Up @@ -306,7 +305,6 @@ func (r *JobReconciler) startJob(ctx context.Context, w *kueue.Workload, job *ba
job.Spec.Template.Spec.NodeSelector[k] = v
}
}

} else {
log.V(3).Info("no nodeSelectors to inject")
}
Expand Down
1 change: 0 additions & 1 deletion pkg/queue/cluster_queue_best_effort_fifo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ func TestBestEffortFIFORequeueIfNotPresent(t *testing.T) {
if ok := cq.RequeueIfNotPresent(workload.NewInfo(wl), reason); ok {
t.Error("Re-queued a workload that was already present")
}

})
}
}
1 change: 0 additions & 1 deletion pkg/queue/cluster_queue_strict_fifo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ func TestStrictFIFORequeueIfNotPresent(t *testing.T) {
if ok := cq.RequeueIfNotPresent(workload.NewInfo(wl), reason); ok {
t.Error("Re-queued a workload that was already present")
}

})
}
}
1 change: 0 additions & 1 deletion pkg/queue/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ func (m *Manager) QueueForWorkloadExists(wl *kueue.Workload) bool {
defer m.RUnlock()
_, ok := m.localQueues[workload.QueueKey(wl)]
return ok

}

// ClusterQueueForWorkload returns the name of the ClusterQueue where the
Expand Down

0 comments on commit 5e13ae8

Please sign in to comment.