Skip to content

Commit

Permalink
Replace queueSuspendedTrainJob with queueSuspendedTrainJobs
Browse files Browse the repository at this point in the history
Signed-off-by: Yuki Iwai <[email protected]>
  • Loading branch information
tenzen-y committed Oct 16, 2024
1 parent 2f616e5 commit 0c376d3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/runtime.v2/framework/plugins/coscheduling/coscheduling.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func (h *PodGroupRuntimeClassHandler) Create(ctx context.Context, e event.Create
return
}
log := ctrl.LoggerFrom(ctx).WithValues("runtimeClass", klog.KObj(containerRuntimeClass))
if err := h.queueSuspendedTrainJob(ctx, containerRuntimeClass, q); err != nil {
if err := h.queueSuspendedTrainJobs(ctx, containerRuntimeClass, q); err != nil {
log.Error(err, "could not queue suspended TrainJob to reconcile queue")
}
}
Expand All @@ -175,7 +175,7 @@ func (h *PodGroupRuntimeClassHandler) Update(ctx context.Context, e event.Update
return
}
log := ctrl.LoggerFrom(ctx).WithValues("runtimeClass", klog.KObj(newContainerRuntimeClass))
if err := h.queueSuspendedTrainJob(ctx, newContainerRuntimeClass, q); err != nil {
if err := h.queueSuspendedTrainJobs(ctx, newContainerRuntimeClass, q); err != nil {
log.Error(err, "could not queue suspended TrainJob to reconcile queue")
}
}
Expand All @@ -186,15 +186,15 @@ func (h *PodGroupRuntimeClassHandler) Delete(ctx context.Context, e event.Delete
return
}
log := ctrl.LoggerFrom(ctx).WithValues("runtimeClass", klog.KObj(containerRuntimeClass))
if err := h.queueSuspendedTrainJob(ctx, containerRuntimeClass, q); err != nil {
if err := h.queueSuspendedTrainJobs(ctx, containerRuntimeClass, q); err != nil {
log.Error(err, "could not queue suspended TrainJob to reconcile queue")
}
}

func (h *PodGroupRuntimeClassHandler) Generic(context.Context, event.GenericEvent, workqueue.RateLimitingInterface) {
}

func (h *PodGroupRuntimeClassHandler) queueSuspendedTrainJob(ctx context.Context, runtimeClass *nodev1.RuntimeClass, q workqueue.RateLimitingInterface) error {
func (h *PodGroupRuntimeClassHandler) queueSuspendedTrainJobs(ctx context.Context, runtimeClass *nodev1.RuntimeClass, q workqueue.RateLimitingInterface) error {
var trainingRuntimes kubeflowv2.TrainingRuntimeList
if err := h.client.List(ctx, &trainingRuntimes, client.MatchingFields{TrainingRuntimeContainerRuntimeClassKey: runtimeClass.Name}); err != nil {
return err
Expand Down

0 comments on commit 0c376d3

Please sign in to comment.