@@ -300,7 +300,7 @@ func (c *Cache) AddClusterQueue(ctx context.Context, cq *kueue.ClusterQueue) err
300300 defer c .Unlock ()
301301
302302 if _ , ok := c .clusterQueues [cq .Name ]; ok {
303- return fmt . Errorf ("ClusterQueue already exists" )
303+ return errors . New ("ClusterQueue already exists" )
304304 }
305305 cqImpl , err := c .newClusterQueue (cq )
306306 if err != nil {
@@ -459,7 +459,7 @@ func (c *Cache) UpdateWorkload(oldWl, newWl *kueue.Workload) error {
459459 if workload .HasQuotaReservation (oldWl ) {
460460 cq , ok := c .clusterQueues [string (oldWl .Status .Admission .ClusterQueue )]
461461 if ! ok {
462- return fmt . Errorf ("old ClusterQueue doesn't exist" )
462+ return errors . New ("old ClusterQueue doesn't exist" )
463463 }
464464 cq .deleteWorkload (oldWl )
465465 }
@@ -470,7 +470,7 @@ func (c *Cache) UpdateWorkload(oldWl, newWl *kueue.Workload) error {
470470 }
471471 cq , ok := c .clusterQueues [string (newWl .Status .Admission .ClusterQueue )]
472472 if ! ok {
473- return fmt . Errorf ("new ClusterQueue doesn't exist" )
473+ return errors . New ("new ClusterQueue doesn't exist" )
474474 }
475475 if c .podsReadyTracking {
476476 c .podsReadyCond .Broadcast ()
@@ -543,7 +543,7 @@ func (c *Cache) ForgetWorkload(w *kueue.Workload) error {
543543 defer c .Unlock ()
544544
545545 if _ , assumed := c .assumedWorkloads [workload .Key (w )]; ! assumed {
546- return fmt . Errorf ("the workload is not assumed" )
546+ return errors . New ("the workload is not assumed" )
547547 }
548548 c .cleanupAssumedState (w )
549549
0 commit comments