Skip to content
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
6 changes: 3 additions & 3 deletions cli/cmd/patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ var _patchCmd = &cobra.Command{
configPath := getConfigPath(args)

var deployResults []schema.DeployResult
if env.Provider == types.AWSProviderType {
deployResults, err = cluster.Patch(MustGetOperatorConfig(env.Name), configPath, _flagPatchForce)
if env.Provider == types.LocalProviderType {
deployResults, err = local.Patch(env, configPath)
if err != nil {
exit.Error(err)
}
} else {
deployResults, err = local.Patch(env, configPath)
deployResults, err = cluster.Patch(MustGetOperatorConfig(env.Name), configPath, _flagPatchForce)
if err != nil {
exit.Error(err)
}
Expand Down
8 changes: 4 additions & 4 deletions cli/local/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
"github.com/cortexlabs/cortex/pkg/types/userconfig"
)

func Deploy(env cliconfig.Environment, configPath string, projectFileList []string, deployDisallowPrompt bool) ([]schema.DeployResult, error) {
func Deploy(env cliconfig.Environment, configPath string, projectFileList []string, disallowPrompt bool) ([]schema.DeployResult, error) {
configFileName := filepath.Base(configPath)

_, err := docker.GetDockerClient()
Expand Down Expand Up @@ -61,10 +61,10 @@ func Deploy(env cliconfig.Environment, configPath string, projectFileList []stri
return nil, err
}

return deploy(env, apiConfigs, projectFiles, deployDisallowPrompt)
return deploy(env, apiConfigs, projectFiles, disallowPrompt)
}

func deploy(env cliconfig.Environment, apiConfigs []userconfig.API, projectFiles ProjectFiles, deployDisallowPrompt bool) ([]schema.DeployResult, error) {
func deploy(env cliconfig.Environment, apiConfigs []userconfig.API, projectFiles ProjectFiles, disallowPrompt bool) ([]schema.DeployResult, error) {
var err error
var awsClient *aws.Client
var gcpClient *gcp.Client
Expand Down Expand Up @@ -104,7 +104,7 @@ func deploy(env cliconfig.Environment, apiConfigs []userconfig.API, projectFiles
results := make([]schema.DeployResult, len(apiConfigs))
for i := range apiConfigs {
apiConfig := apiConfigs[i]
api, msg, err := UpdateAPI(&apiConfig, models, projectFiles.projectRoot, projectID, deployDisallowPrompt, awsClient)
api, msg, err := UpdateAPI(&apiConfig, models, projectFiles.projectRoot, projectID, disallowPrompt, awsClient)
results[i].Message = msg
if err != nil {
results[i].Error = errors.Message(err)
Expand Down
6 changes: 3 additions & 3 deletions pkg/lib/cast/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -715,15 +715,15 @@ func JSONMarshallable(in interface{}) (interface{}, bool) {
}
return out, true
} else if inSlice, ok := InterfaceToInterfaceSlice(in); ok {
result := make([]interface{}, 0, len(inSlice))
out := make([]interface{}, 0, len(inSlice))
for _, inValue := range inSlice {
castedInValue, ok := JSONMarshallable(inValue)
if !ok {
return nil, false
}
result = append(result, castedInValue)
out = append(out, castedInValue)
}
return result, true
return out, true
}
return in, true
}
Expand Down