Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(cli): update command logging verbiage to include jobs #1552

Merged
merged 2 commits into from
Oct 22, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
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"
Comment on lines -32 to -34
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were the end-of-line extra spaces in textPublicSubnets and textECSCluster intentional? If so I can add them back in.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope they weren't :) so it should be good!

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 "
)