Repository: kubernetes-sigs/kueue

Issue:
Replace `WithStrict(strict bool)` with `WithLoose()`
<!-- Please only use this template for submitting clean up requests -->

**What would you like to be cleaned**:

I would like to replace the following `WithStrict(bool)` with `WithLoose()`

https://github.com/kubernetes-sigs/kueue/blob/2faadda3e0827ef19195bb01d9966a4b7ddcea20/pkg/util/client/client.go#L57-L73

**Why is this needed**:

As I mentioned in https://github.com/kubernetes-sigs/kueue/pull/6842#discussion_r2372127893, the usage will be more simple which could just call `WithLoose()` w/o any argument.

Hints from issue comments:
@tenzen-y: cc @mszadkow @mimowo 

Solution patch:
diff --git a/pkg/controller/jobs/pod/pod_controller.go b/pkg/controller/jobs/pod/pod_controller.go
index a4c1d1dd6..ef6932555 100644
--- a/pkg/controller/jobs/pod/pod_controller.go
+++ b/pkg/controller/jobs/pod/pod_controller.go
@@ -556,7 +556,7 @@ func (p *Pod) Finalize(ctx context.Context, c client.Client) error {
 		pod := &podsInGroup.Items[i]
 		return clientutil.Patch(ctx, c, pod, func() (client.Object, bool, error) {
 			return pod, controllerutil.RemoveFinalizer(pod, podconstants.PodFinalizer), nil
-		}, clientutil.WithStrict(false))
+		}, clientutil.WithLoose())
 	})
 }
 
@@ -919,7 +919,7 @@ func (p *Pod) removeExcessPods(ctx context.Context, c client.Client, r record.Ev
 				log.V(3).Info("Finalizing excess pod in group", "excessPod", klog.KObj(&pod))
 			}
 			return &pod, removed, nil
-		}, clientutil.WithStrict(false)); err != nil {
+		}, clientutil.WithLoose()); err != nil {
 			// We won't observe this cleanup in the event handler.
 			p.excessPodExpectations.ObservedUID(log, p.key, pod.UID)
 			return err
@@ -961,7 +961,7 @@ func (p *Pod) finalizePods(ctx context.Context, c client.Client, extraPods []cor
 				log.V(3).Info("Finalizing pod in group", "Pod", klog.KObj(&pod))
 			}
 			return &pod, removed, nil
-		}, clientutil.WithStrict(false)); err != nil {
+		}, clientutil.WithLoose()); err != nil {
 			// We won't observe this cleanup in the event handler.
 			p.excessPodExpectations.ObservedUID(log, p.key, pod.UID)
 			return err
diff --git a/pkg/util/client/client.go b/pkg/util/client/client.go
index 658ba087f..00003c1df 100644
--- a/pkg/util/client/client.go
+++ b/pkg/util/client/client.go
@@ -37,7 +37,7 @@ type PatchOption func(*PatchOptions)
 //     ResourceVersion.
 //
 // Typically, PatchOptions are constructed via DefaultPatchOptions and
-// modified using PatchOption functions (e.g., WithStrict).
+// modified using PatchOption functions (e.g., WithLoose).
 type PatchOptions struct {
 	Strict bool
 }
@@ -54,7 +54,7 @@ func DefaultPatchOptions() *PatchOptions {
 	}
 }
 
-// WithStrict returns a PatchOption that sets the Strict field on PatchOptions.
+// WithLoose returns a PatchOption that sets the Strict field on PatchOptions.
 //
 // By default, Strict is true. In strict mode, generated patches enforce stricter
 // behavior by clearing the ResourceVersion field from the "original" object.
@@ -65,10 +65,10 @@ func DefaultPatchOptions() *PatchOptions {
 //
 //	patch := clientutil.Patch(ctx, c, obj, true, func() (bool, error) {
 //	    return updateFn(obj), nil
-//	}, WithStrict(false)) // disables strict mode
-func WithStrict(strict bool) PatchOption {
+//	}, WithLoose()) // disables strict mode
+func WithLoose() PatchOption {
 	return func(o *PatchOptions) {
-		o.Strict = strict
+		o.Strict = false
 	}
 }
 
@@ -87,7 +87,7 @@ func patchCommon(obj client.Object, update func() (client.Object, bool, error),
 // the changes. Finally, it applies the patch through the given client.Client.
 //
 // Behavior is influenced by PatchOptions, which can be customized using
-// PatchOption functional arguments (e.g., WithStrict).
+// PatchOption functional arguments (e.g., WithLoose).
 //
 // Returns:
 //   - error: If patch generation or application fails, an error is returned.
@@ -98,7 +98,7 @@ func patchCommon(obj client.Object, update func() (client.Object, bool, error),
 //	    updated := obj.DeepCopyObject().(client.Object)
 //	    updated.SetLabels(map[string]string{"app": "demo"})
 //	    return updated, true, nil
-//	}, WithStrict(true))
+//	}, WithLoose())
 //	if err != nil {
 //	    log.Fatal(err)
 //	}
@@ -122,7 +122,7 @@ func Patch(ctx context.Context, c client.Client, obj client.Object, update func(
 // (c.Status().Patch).
 //
 // Behavior is influenced by PatchOptions, which can be customized using
-// PatchOption functional arguments (e.g., WithStrict).
+// PatchOption functional arguments (e.g., WithLoose).
 //
 // Returns:
 //   - error: If patch generation or application fails, an error is returned.



Test patch:
diff --git a/pkg/util/client/client_test.go b/pkg/util/client/client_test.go
index a7c9d5ac5..81e291b6a 100644
--- a/pkg/util/client/client_test.go
+++ b/pkg/util/client/client_test.go
@@ -110,7 +110,7 @@ func TestPatch(t *testing.T) {
 					obj.Spec.Suspend = ptr.To(true)
 					return obj, true, nil
 				},
-				options: []PatchOption{WithStrict(false)},
+				options: []PatchOption{WithLoose()},
 			},
 			want: want{
 				// Unlike "Strict" version - this update is successful since the resource version is not
@@ -128,7 +128,7 @@ func TestPatch(t *testing.T) {
 					obj.Spec.Suspend = ptr.To(true)
 					return obj, true, nil
 				},
-				options: []PatchOption{WithStrict(false)},
+				options: []PatchOption{WithLoose()},
 			},
 			want: want{
 				obj: newObject("3", func(job *batchv1.Job) {
@@ -235,7 +235,7 @@ func TestPatchStatus(t *testing.T) {
 					obj.Status.Active = 1
 					return obj, true, nil
 				},
-				options: []PatchOption{WithStrict(false)},
+				options: []PatchOption{WithLoose()},
 			},
 			want: want{
 				obj: newObject("3", func(job *batchv1.Job) {
@@ -251,7 +251,7 @@ func TestPatchStatus(t *testing.T) {
 					obj.Status.Active = 1
 					return obj, true, nil
 				},
-				options: []PatchOption{WithStrict(false)},
+				options: []PatchOption{WithLoose()},
 			},
 			want: want{
 				obj: newObject("3", func(job *batchv1.Job) {