Skip to content

Commit 1f509f4

Browse files
authored
Remove redundant ApplyAdmissionStatusPatch() function. (#8052)
1 parent b07ffd8 commit 1f509f4

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

pkg/workload/workload.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@ func admissionChecksStatusPatch(w *kueue.Workload, wlCopy *kueue.Workload, c clo
962962
// was changed.
963963
func ApplyAdmissionStatus(ctx context.Context, c client.Client, w *kueue.Workload, strict bool, clk clock.Clock) error {
964964
wlCopy := PrepareWorkloadPatch(w, strict, clk)
965-
return ApplyAdmissionStatusPatch(ctx, c, wlCopy)
965+
return c.Status().Patch(ctx, wlCopy, client.Apply, client.FieldOwner(constants.AdmissionName), client.ForceOwnership)
966966
}
967967

968968
func PrepareWorkloadPatch(w *kueue.Workload, strict bool, clk clock.Clock) *kueue.Workload {
@@ -972,11 +972,6 @@ func PrepareWorkloadPatch(w *kueue.Workload, strict bool, clk clock.Clock) *kueu
972972
return wlCopy
973973
}
974974

975-
// ApplyAdmissionStatusPatch applies the patch of admission related status fields of a workload with SSA.
976-
func ApplyAdmissionStatusPatch(ctx context.Context, c client.Client, patch *kueue.Workload) error {
977-
return c.Status().Patch(ctx, patch, client.Apply, client.FieldOwner(constants.AdmissionName), client.ForceOwnership)
978-
}
979-
980975
// PatchAdmissionStatusOption defines a functional option for customizing PatchAdmissionStatusOptions.
981976
// It follows the functional options pattern, allowing callers to configure
982977
// patch behavior at call sites without directly manipulating PatchAdmissionStatusOptions.

0 commit comments

Comments
 (0)