Skip to content

Commit

Permalink
chore(cli): update command logging verbiage to include jobs (#1552)
Browse files Browse the repository at this point in the history
Include `jobs` in command logging wording in `env_init` and `app_init`. 

Addresses #1542

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
  • Loading branch information
huanjani authored Oct 22, 2020
1 parent 870a6a7 commit 2256074
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions internal/pkg/cli/app_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ import (
)

const (
fmtAppInitStart = "Creating the infrastructure to manage services under application %s."
fmtAppInitComplete = "Created the infrastructure to manage services under application %s.\n"
fmtAppInitFailed = "Failed to create the infrastructure to manage services under application %s.\n"
fmtAppInitStart = "Creating the infrastructure to manage services and jobs under application %s."
fmtAppInitComplete = "Created the infrastructure to manage services and jobs under application %s.\n"
fmtAppInitFailed = "Failed to create the infrastructure to manage services and jobs under application %s.\n"

fmtAppInitNamePrompt = "What would you like to %s your application?"
fmtAppInitNewNamePrompt = `Ok, let's create a new application then.
What would you like to %s your application?`
appInitNameHelpPrompt = "Services in the same application share the same VPC and ECS Cluster and are discoverable via service discovery."
appInitNameHelpPrompt = "Services and jobs in the same application share the same VPC and ECS Cluster and services are discoverable via service discovery."
)

type initAppVars struct {
Expand Down Expand Up @@ -216,7 +216,7 @@ func (o *initAppOpts) validateDomain(domainName string) error {
// RecommendedActions returns a list of suggested additional commands users can run after successfully executing this command.
func (o *initAppOpts) RecommendedActions() []string {
return []string{
fmt.Sprintf("Run %s to add a new service to your application.", color.HighlightCode("copilot init")),
fmt.Sprintf("Run %s to add a new service or job to your application.", color.HighlightCode("copilot init")),
}
}

Expand All @@ -239,7 +239,7 @@ func (o *initAppOpts) askSelectExistingAppName(existingApps []*config.Applicatio
names = append(names, p.Name)
}
name, err := o.prompt.SelectOne(
fmt.Sprintf("Which %s do you want to add a new service to?", color.Emphasize("existing application")),
fmt.Sprintf("Which %s do you want to add a new service or job to?", color.Emphasize("existing application")),
appInitNameHelpPrompt,
names,
prompt.WithFinalMessage("Application name:"))
Expand Down
4 changes: 2 additions & 2 deletions internal/pkg/cli/env_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const (
envInitDefaultEnvConfirmPrompt = `Would you like to use the default configuration for a new environment?
- A new VPC with 2 AZs, 2 public subnets and 2 private subnets
- A new ECS Cluster
- New IAM Roles to manage services in your environment
- New IAM Roles to manage services and jobs in your environment
`
envInitVPCSelectPrompt = "Which VPC would you like to use?"
envInitPublicSubnetsSelectPrompt = "Which public subnets would you like to use?"
Expand Down Expand Up @@ -377,7 +377,7 @@ func (o *initEnvOpts) askImportResources() error {
}
if !dnsSupport {
log.Errorln(`Looks like you're creating an environment using a VPC with DNS support *disabled*.
Copilot cannot create services in VPCs without DNS support. We recommend enabling this property.
Copilot cannot create services or jobs in VPCs without DNS support. We recommend enabling this property.
To learn more about the issue:
https://aws.amazon.com/premiumsupport/knowledge-center/ecs-pull-container-api-error-ecr/`)
return fmt.Errorf("VPC %s has no DNS support enabled", o.importVPC.ID)
Expand Down
10 changes: 5 additions & 5 deletions internal/pkg/cli/progress.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ var defaultResourceCounts = map[termprogress.Text]int{

// Row descriptions displayed while deploying an environment.
const (
textVPC termprogress.Text = "- Virtual private cloud on 2 availability zones to hold your services"
textVPC termprogress.Text = "- Virtual private cloud on 2 availability zones to hold your services and jobs"
textInternetGateway termprogress.Text = " - Internet gateway to connect the network to the internet"
textPublicSubnets termprogress.Text = " - Public subnets for internet facing services "
textPrivateSubnets termprogress.Text = " - Private subnets for services that can't be reached from the internet"
textRouteTables termprogress.Text = " - Routing tables for services to talk with each other"
textECSCluster termprogress.Text = "- ECS Cluster to hold your services "
textPublicSubnets termprogress.Text = " - Public subnets for internet facing services and jobs"
textPrivateSubnets termprogress.Text = " - Private subnets for services and jobs that can't be reached from the internet"
textRouteTables termprogress.Text = " - Routing tables for services and jobs to talk with each other"
textECSCluster termprogress.Text = "- ECS Cluster to hold your services and jobs"
textALB termprogress.Text = "- Application load balancer to distribute traffic "
)

0 comments on commit 2256074

Please sign in to comment.