Skip to content

Commit

Permalink
Fix invalid attribute access in error message
Browse files Browse the repository at this point in the history
  • Loading branch information
deadlycoconuts committed Jan 16, 2024
1 parent a4d01d2 commit d376925
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/cluster/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func (c *controller) Deploy(ctx context.Context, modelService *models.Service) (
s, err := c.kserveClient.InferenceServices(modelService.Namespace).Get(modelService.Name, metav1.GetOptions{})
if err != nil {
if !kerrors.IsNotFound(err) {
return nil, errors.Wrapf(err, "unable to check status of inference service: %s", s.Name)
return nil, errors.Wrapf(err, "unable to check status of inference service: %s", modelService.Name)
}
s, err = c.kserveClient.InferenceServices(modelService.Namespace).Create(spec)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion api/cluster/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ func TestController_DeployInferenceService(t *testing.T) {
},
checkResult: &inferenceServiceReactor{
nil,
kerrors.NewNotFound(schema.GroupResource{}, ""),
errors.New("error check"),
},
deployTimeout: deployTimeout,
createPdbResult: &pdbReactor{pdb, nil},
Expand Down

0 comments on commit d376925

Please sign in to comment.