Skip to content

Commit

Permalink
Add default values to docker_config when using pyfunc ensemblers
Browse files Browse the repository at this point in the history
  • Loading branch information
deadlycoconuts committed Mar 7, 2022
1 parent 3a3c310 commit f2767fc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 7 additions & 2 deletions api/turing/api/deployment_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package api
import (
"encoding/json"
"errors"
"fmt"
"strings"

merlin "github.com/gojek/merlin/client"
Expand Down Expand Up @@ -240,10 +241,14 @@ func (c RouterDeploymentController) deployRouterVersion(
ProjectID: routerVersion.Ensembler.PyfuncConfig.ProjectID,
})
if err != nil {
return "", err
return "", fmt.Errorf("failed to find specified ensembler: %w", err)
}

pyfuncEnsembler = ensembler.(*models.PyFuncEnsembler)
castedEnsembler, ok := ensembler.(*models.PyFuncEnsembler)
if !ok {
return "", fmt.Errorf("failed to cast ensembler: %w", err)
}
pyfuncEnsembler = castedEnsembler
}

// Deploy the router version
Expand Down
2 changes: 2 additions & 0 deletions api/turing/service/router_deployment_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,8 @@ func (ds *deploymentService) buildEnsemblerServiceImage(
Timeout: routerVersion.Ensembler.PyfuncConfig.Timeout,
Endpoint: PyFuncEnsemblerServiceEndpoint,
Port: PyFuncEnsemblerServicePort,
Env: models.EnvVars{},
ServiceAccount: "",
}

return nil
Expand Down

0 comments on commit f2767fc

Please sign in to comment.