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
3 changes: 2 additions & 1 deletion cli/cmd/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/cortexlabs/cortex/cli/types/cliconfig"
"github.com/cortexlabs/cortex/pkg/lib/aws"
cr "github.com/cortexlabs/cortex/pkg/lib/configreader"
"github.com/cortexlabs/cortex/pkg/lib/console"
"github.com/cortexlabs/cortex/pkg/lib/docker"
"github.com/cortexlabs/cortex/pkg/lib/errors"
"github.com/cortexlabs/cortex/pkg/lib/exit"
Expand Down Expand Up @@ -159,7 +160,7 @@ var _upCmd = &cobra.Command{
exit.Error(ErrorClusterUp(out + helpStr))
}

fmt.Printf("\nyour cli environment named \"%s\" has been configured to connect to this cluster; append --env=%s in cortex commands to reference it, or set it as your default via `cortex env default %s`\n", _flagClusterEnv, _flagClusterEnv, _flagClusterEnv)
fmt.Printf(console.Bold("\nan environment named \"%s\" has been configured for this cluster; append `--env=%s` to cortex commands to reference it, or set it as your default with `cortex env default %s`\n"), _flagClusterEnv, _flagClusterEnv, _flagClusterEnv)
},
}

Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ var _envListCmd = &cobra.Command{
defaultEnv := getDefaultEnv(_generalCommandType)

for i, env := range cliConfig.Environments {
fmt.Println(env.String(defaultEnv == env.Name))
fmt.Print(env.String(defaultEnv == env.Name))
if i+1 < len(cliConfig.Environments) {
fmt.Println()
}
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const (
ErrEnvironmentNotFound = "cli.environment_not_found"
ErrOperatorEndpointInLocalEnvironment = "cli.operator_endpoint_in_local_environment"
ErrOperatorConfigFromLocalEnvironment = "cli.operater_config_from_local_environment"
ErrFieldNotFoundInEnvironment = "cli.err_field_not_found_in_environment"
ErrFieldNotFoundInEnvironment = "cli.field_not_found_in_environment"
ErrInvalidOperatorEndpoint = "cli.invalid_operator_endpoint"
ErrCortexYAMLNotFound = "cli.cortex_yaml_not_found"
ErrConnectToDockerDaemon = "cli.connect_to_docker_daemon"
Expand Down
2 changes: 0 additions & 2 deletions cli/cmd/lib_cluster_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,6 @@ func confirmInstallClusterConfig(clusterConfig *clusterconfig.Config, awsCreds A
}
fmt.Printf("cortex will also create an s3 bucket (%s) and a cloudwatch log group (%s)%s\n\n", clusterConfig.Bucket, clusterConfig.LogGroup, privateSubnetMsg)

fmt.Printf("your cli environment named \"%s\" will be configured to connect to this cluster\n\n", envName)

if clusterConfig.APILoadBalancerScheme == clusterconfig.InternalLoadBalancerScheme {
fmt.Print("warning: you've configured the API load balancer to be internal; you must configure VPC Peering or an API Gateway VPC Link to connect to your APIs (see www.cortex.dev/guides/vpc-peering or www.cortex.dev/guides/api-gateway)\n\n")
}
Expand Down
8 changes: 4 additions & 4 deletions cli/cmd/lib_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import (
"github.com/docker/docker/api/types/mount"
)

func runManager(containerConfig *container.Config) (string, *int, error) {
func runManager(containerConfig *container.Config, addNewLineAfterPull bool) (string, *int, error) {
containerConfig.Env = append(containerConfig.Env, "CORTEX_CLI_VERSION="+consts.CortexVersion)

// Add a slight delay before running the command to ensure logs don't start until after the container is attached
Expand All @@ -55,7 +55,7 @@ func runManager(containerConfig *container.Config) (string, *int, error) {
return "", nil, err
}

if pulledImage {
if pulledImage && addNewLineAfterPull {
fmt.Println()
}

Expand Down Expand Up @@ -180,7 +180,7 @@ func runManagerUpdateCommand(entrypoint string, clusterConfig *clusterconfig.Con
},
}

output, exitCode, err := runManager(containerConfig)
output, exitCode, err := runManager(containerConfig, false)
if err != nil {
return "", nil, err
}
Expand All @@ -207,7 +207,7 @@ func runManagerAccessCommand(entrypoint string, accessConfig clusterconfig.Acces
},
}

output, exitCode, err := runManager(containerConfig)
output, exitCode, err := runManager(containerConfig, true)
if err != nil {
return "", nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion cli/local/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const (
ErrNotAbsolutePath = "local.not_absolute_path"
ErrAPINotDeployed = "local.api_not_deployed"
ErrAPISpecNotFound = "local.api_specification_not_found"
ErrCortexVersionMismatch = "local.err_cortex_version_mismatch"
ErrCortexVersionMismatch = "local.cortex_version_mismatch"
ErrAPIContainersNotFound = "local.api_containers_not_found"
ErrFoundContainersWithoutAPISpec = "local.found_containers_without_api_spec"
ErrInvalidTensorFlowZip = "local.invalid_tensorflow_zip"
Expand Down
4 changes: 2 additions & 2 deletions cli/local/model_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ func CacheModel(modelPath string, awsClient *aws.Client) (*spec.LocalModelCache,
}

func downloadModel(modelPath string, modelDir string, awsClient *aws.Client) error {
fmt.Printf("downloading model %s ", modelPath)
defer fmt.Print("\n")
fmt.Printf("downloading model %s ", modelPath)
defer fmt.Print("\n")
dotCron := cron.Run(print.Dot, nil, 2*time.Second)
defer dotCron.Cancel()

Expand Down
4 changes: 2 additions & 2 deletions pkg/lib/docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ func PullImage(image string, encodedAuthConfig string, pullVerbosity PullVerbosi
jsonmessage.DisplayJSONMessagesStream(pullOutput, os.Stderr, termFd, isTerm, nil)
fmt.Println()
case PrintDots:
fmt.Printf("downloading docker image %s ", image)
defer fmt.Print("\n")
fmt.Printf("downloading docker image %s ", image)
defer fmt.Print("\n")
dotCron := cron.Run(print.Dot, nil, 2*time.Second)
defer dotCron.Cancel()
// wait until the pull has completed
Expand Down
1 change: 0 additions & 1 deletion pkg/types/clusterconfig/clusterconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,6 @@ func InstallPrompt(clusterConfig *Config, awsClient *aws.Client, disallowPrompt
}

remainingPrompts := &cr.PromptValidation{
SkipNonNilFields: true,
SkipNonEmptyFields: true,
PromptItemValidations: []*cr.PromptItemValidation{
{
Expand Down