From 6ca20a8dd312de784593bd108f5d01609cd681cc Mon Sep 17 00:00:00 2001 From: Anisur Date: Sat, 28 Jun 2025 15:15:53 +0600 Subject: [PATCH 1/2] big fix Signed-off-by: Anisur --- pkg/controller/batch/watcher.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/batch/watcher.go b/pkg/controller/batch/watcher.go index 22fde3e1..6140ea7b 100644 --- a/pkg/controller/batch/watcher.go +++ b/pkg/controller/batch/watcher.go @@ -98,7 +98,7 @@ func (r *TaskQueueReconciler) handleResourcesUpdate(ctx context.Context, obj int return nil } if _, err := r.syncTaskQueueStatus(ctx, tq, func(key string) bool { - return key == newObj.GetName() + return key == fmt.Sprintf("%s/%s", newObj.GetNamespace(), newObj.GetName()) }); err != nil { return fmt.Errorf("failed to sync task status: %w", err) } From 8ac6b8473f7a3f8d617a8379907e78bdd1d819dc Mon Sep 17 00:00:00 2001 From: Anisur Rahman Date: Wed, 13 Aug 2025 11:53:28 +0600 Subject: [PATCH 2/2] handle fewer tasks Signed-off-by: Anisur Rahman --- pkg/controller/batch/taskqueue_controller.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/controller/batch/taskqueue_controller.go b/pkg/controller/batch/taskqueue_controller.go index 0dd9373c..2822151b 100644 --- a/pkg/controller/batch/taskqueue_controller.go +++ b/pkg/controller/batch/taskqueue_controller.go @@ -126,6 +126,9 @@ func (r *TaskQueueReconciler) syncTaskQueueStatus(ctx context.Context, tq *queue } } } + if r.getInProgressTaskCount(tq) < tq.Spec.MaxConcurrentTasks { // In case of fewer tasks than max concurrent, we should processPendingTasks + shouldRequeue = false + } return shouldRequeue, utilerrors.NewAggregate(errs) }