fix: fix tensorboards base address
@@ -2,15 +2,17 @@ package internal
import (
"context"
- "fmt"
+ "github.com/determined-ai/determined/master/pkg/actor"
"github.com/determined-ai/determined/proto/pkg/apiv1"
)
+var tensorboardsAddr = actor.Addr("tensorboard")
+
func (a *apiServer) GetTensorboards(
_ context.Context, req *apiv1.GetTensorboardsRequest,
) (resp *apiv1.GetTensorboardsResponse, err error) {
- err = a.actorRequest("/tensorboards", req, &resp)
+ err = a.actorRequest(tensorboardsAddr.String(), req, &resp)
if err != nil {
return nil, err
}
@@ -21,11 +23,11 @@ func (a *apiServer) GetTensorboards(
func (a *apiServer) GetTensorboard(
_ context.Context, req *apiv1.GetTensorboardRequest,
) (resp *apiv1.GetTensorboardResponse, err error) {
- return resp, a.actorRequest(fmt.Sprintf("/tensorboards/%s", req.TensorboardId), req, &resp)
+ return resp, a.actorRequest(tensorboardsAddr.Child(req.TensorboardId).String(), req, &resp)
}
func (a *apiServer) KillTensorboard(
_ context.Context, req *apiv1.KillTensorboardRequest,
) (resp *apiv1.KillTensorboardResponse, err error) {
- return resp, a.actorRequest(fmt.Sprintf("/tensorboards/%s", req.TensorboardId), req, &resp)
+ return resp, a.actorRequest(tensorboardsAddr.Child(req.TensorboardId).String(), req, &resp)
}
