Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix metadata #4207

Merged
merged 1 commit into from
Jul 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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