Skip to content

Commit

Permalink
fix metadata (#4207)
Browse files Browse the repository at this point in the history
  • Loading branch information
ukclivecox authored Jul 7, 2022
1 parent 8a3d7ca commit d878a7b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions executor/predictor/predictor_process.go
Original file line number Diff line number Diff line change
Expand Up @@ -443,15 +443,15 @@ func (p *PredictorProcess) Status(node *v1.PredictiveUnit, modelName string, msg
if nodeModel := v1.GetPredictiveUnit(node, modelName); nodeModel == nil {
return nil, fmt.Errorf("Failed to find model %s", modelName)
} else {
return p.Client.Status(p.Ctx, modelName, nodeModel.Endpoint.ServiceHost, p.getPort(node), msg, p.Meta.Meta)
return p.Client.Status(p.Ctx, modelName, nodeModel.Endpoint.ServiceHost, p.getPort(nodeModel), msg, p.Meta.Meta)
}
}

func (p *PredictorProcess) Metadata(node *v1.PredictiveUnit, modelName string, msg payload.SeldonPayload) (payload.SeldonPayload, error) {
if nodeModel := v1.GetPredictiveUnit(node, modelName); nodeModel == nil {
return nil, fmt.Errorf("Failed to find model %s", modelName)
} else {
return p.Client.Metadata(p.Ctx, modelName, nodeModel.Endpoint.ServiceHost, p.getPort(node), msg, p.Meta.Meta)
return p.Client.Metadata(p.Ctx, modelName, nodeModel.Endpoint.ServiceHost, p.getPort(nodeModel), msg, p.Meta.Meta)
}
}

Expand Down
4 changes: 3 additions & 1 deletion operator/controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"os"
"path/filepath"
"testing"
"time"

kedav1alpha1 "github.com/kedacore/keda/v2/apis/keda/v1alpha1"
. "github.com/onsi/ginkgo"
Expand Down Expand Up @@ -174,6 +175,7 @@ var _ = BeforeSuite(func(done Done) {
cfg, err = testEnv.Start()
Expect(err).ToNot(HaveOccurred())
Expect(cfg).ToNot(BeNil())
cfg.Timeout = time.Second * 10

clientset, err = kubernetes.NewForConfig(cfg)
Expect(err).NotTo(HaveOccurred())
Expand Down Expand Up @@ -219,7 +221,7 @@ var _ = BeforeSuite(func(done Done) {
Log: ctrl.Log.WithName("controllers").WithName("SeldonDeployment"),
Scheme: k8sManager.GetScheme(),
Recorder: k8sManager.GetEventRecorderFor(constants.ControllerName),
}).SetupWithManager(context.TODO(), k8sManager, constants.ControllerName)
}).SetupWithManager(context.Background(), k8sManager, constants.ControllerName)
Expect(err).ToNot(HaveOccurred())

//k8sClient, err = client.New(cfg, client.Options{Scheme: scheme.Scheme})
Expand Down

0 comments on commit d878a7b

Please sign in to comment.