@@ -18,13 +18,14 @@ package trial
18
18
19
19
import (
20
20
"context"
21
+ "errors"
21
22
"fmt"
22
23
"time"
23
24
24
25
"github.com/spf13/viper"
25
26
corev1 "k8s.io/api/core/v1"
26
27
"k8s.io/apimachinery/pkg/api/equality"
27
- "k8s.io/apimachinery/pkg/api/errors"
28
+ apierrors "k8s.io/apimachinery/pkg/api/errors"
28
29
"k8s.io/apimachinery/pkg/api/meta"
29
30
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
30
31
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
@@ -153,7 +154,7 @@ func (r *ReconcileTrial) Reconcile(ctx context.Context, request reconcile.Reques
153
154
original := & trialsv1beta1.Trial {}
154
155
err := r .Get (ctx , request .NamespacedName , original )
155
156
if err != nil {
156
- if errors .IsNotFound (err ) {
157
+ if apierrors .IsNotFound (err ) {
157
158
// Object not found, return. Created objects are automatically garbage collected.
158
159
// For additional cleanup logic use finalizers.
159
160
return reconcile.Result {}, nil
@@ -277,7 +278,7 @@ func (r *ReconcileTrial) reconcileJob(instance *trialsv1beta1.Trial, desiredJob
277
278
deployedJob .SetGroupVersionKind (gvk )
278
279
err = r .Get (context .TODO (), types.NamespacedName {Name : desiredJob .GetName (), Namespace : desiredJob .GetNamespace ()}, deployedJob )
279
280
if err != nil {
280
- if errors .IsNotFound (err ) {
281
+ if apierrors .IsNotFound (err ) {
281
282
if instance .IsCompleted () {
282
283
return nil , nil
283
284
}
0 commit comments