From 0466dd2f15083b92cf5646ad3254e3519b693d22 Mon Sep 17 00:00:00 2001 From: penghaoh Date: Wed, 12 Jun 2019 23:55:55 -0700 Subject: [PATCH 1/6] first edit --- .gitignore | 3 ++ ecs-cli/modules/cli/local/down_app.go | 31 ++++++++++--- ecs-cli/modules/cli/local/ps_app.go | 44 ++++++++++++++----- ecs-cli/modules/commands/flags/flags.go | 1 + .../modules/commands/local/local_command.go | 20 ++++++++- 5 files changed, 80 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index 423c55157..b3f7091be 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,6 @@ ecs-cli/vendor/pkg ecs-cli/.vscode/* ecs-cli/.idea .idea/* +*.DS_Store +*.yml +Dockerfile \ No newline at end of file diff --git a/ecs-cli/modules/cli/local/down_app.go b/ecs-cli/modules/cli/local/down_app.go index 43ec7a040..be949826a 100644 --- a/ecs-cli/modules/cli/local/down_app.go +++ b/ecs-cli/modules/cli/local/down_app.go @@ -42,8 +42,28 @@ func Down(c *cli.Context) error { network.Teardown(client) }() + if err := psOptionsPreCheck(c); err != nil { + logrus.Fatalf("Tasks can be either created by local files or remote files") + } + // if c.Bool(flags.AllFlag) { + // return downLocalContainersWithFilters() + // } + // return downComposeLocalContainers() + + if c.String(flags.TaskDefinitionFileFlag) != "" { + return downLocalContainersWithFilters(filters.NewArgs( + filters.Arg("label", taskDefinitionLabelValue+"="+c.String(flags.TaskDefinitionFileFlag)), + )) + } + if c.String(flags.TaskDefinitionTaskFlag) != "" { + return downLocalContainersWithFilters(filters.NewArgs( + filters.Arg("label", taskDefinitionLabelValue+"="+c.String(flags.TaskDefinitionTaskFlag)), + )) + } if c.Bool(flags.AllFlag) { - return downAllLocalContainers() + return downLocalContainersWithFilters(filters.NewArgs( + filters.Arg("label", taskDefinitionLabelValue), + )) } return downComposeLocalContainers() } @@ -65,19 +85,16 @@ func downComposeLocalContainers() error { return nil } -func downAllLocalContainers() error { +func downLocalContainersWithFilters(args filters.Args) error { ctx, cancel := context.WithTimeout(context.Background(), docker.TimeoutInS) defer cancel() client := docker.NewClient() containers, err := client.ContainerList(ctx, types.ContainerListOptions{ - Filters: filters.NewArgs( - filters.Arg("label", taskDefinitionLabelKey), - ), - All: true, + Filters: args, }) if err != nil { - logrus.Fatalf("Failed to list containers with label=%s due to %v", taskDefinitionLabelKey, err) + logrus.Fatalf("Failed to list containers with label=%s due to %v", taskDefinitionLabelValue, err) } if len(containers) == 0 { logrus.Warn("No running ECS local tasks found") diff --git a/ecs-cli/modules/cli/local/ps_app.go b/ecs-cli/modules/cli/local/ps_app.go index 9b252ab8d..71eff298a 100644 --- a/ecs-cli/modules/cli/local/ps_app.go +++ b/ecs-cli/modules/cli/local/ps_app.go @@ -15,6 +15,7 @@ package local import ( "encoding/json" + "errors" "fmt" "os" "os/exec" @@ -35,9 +36,13 @@ import ( // Refactor to import these constants instead of re-defining them here. // Docker object labels associated with containers created with "ecs-cli local". const ( - // taskDefinitionLabelKey represents the value of the option used to - // transform a task definition to a compose file e.g. file path, arn, family. - taskDefinitionLabelKey = "ecsLocalTaskDefinition" + // taskDefinitionLabelType represents the type of option used to + // transform a task definition to a compose file e.g. remoteFile, localFile. + // taskDefinitionLabelValue represents the value of the option + // e.g. file path, arn, family. + taskDefinitionLabelKey = "ecsLocalTaskDefinition" + taskDefinitionLabelType = "ecsLocalTaskDefType" + taskDefinitionLabelValue = "ecsLocalTaskDefVal" ) // Table formatting settings used by the Docker CLI. @@ -63,18 +68,37 @@ const ( // If the --all flag is provided, then list all local ECS task containers. // If the --json flag is provided, then output the format as JSON instead. func Ps(c *cli.Context) { + if err := psOptionsPreCheck(c); err != nil { + logrus.Fatalf("Tasks can be either created by local files or remote files") + } containers := listContainers(c) displayContainers(c, containers) } +func psOptionsPreCheck(c *cli.Context) error { + if (c.String(flags.TaskDefinitionFileFlag) != "") && (c.String(flags.TaskDefinitionTaskFlag) != "") { + return errors.New("Tasks can be either created by local files or remote files") + } + return nil +} + func listContainers(c *cli.Context) []types.Container { - if !c.Bool(flags.AllFlag) { - return listLocalComposeContainers() + if c.String(flags.TaskDefinitionFileFlag) != "" { + return listContainersWithFilters(filters.NewArgs( + filters.Arg("label", taskDefinitionLabelValue+"="+c.String(flags.TaskDefinitionFileFlag)), + )) + } + if c.String(flags.TaskDefinitionTaskFlag) != "" { + return listContainersWithFilters(filters.NewArgs( + filters.Arg("label", taskDefinitionLabelValue+"="+c.String(flags.TaskDefinitionTaskFlag)), + )) + } + if c.Bool(flags.AllFlag) { + return listContainersWithFilters(filters.NewArgs( + filters.Arg("label", taskDefinitionLabelValue), + )) } - // Task containers running locally all have a local label - return listContainersWithFilters(filters.NewArgs( - filters.Arg("label", taskDefinitionLabelKey), - )) + return listLocalComposeContainers() } func listLocalComposeContainers() []types.Container { @@ -144,7 +168,7 @@ func displayAsTable(containers []types.Container) { container.Status, prettifyPorts(container.Ports), prettifyNames(container.Names), - container.Labels[taskDefinitionLabelKey]) + container.Labels[taskDefinitionLabelValue]) fmt.Fprintln(w, row) } w.Flush() diff --git a/ecs-cli/modules/commands/flags/flags.go b/ecs-cli/modules/commands/flags/flags.go index af7892909..8ff3c10c6 100644 --- a/ecs-cli/modules/commands/flags/flags.go +++ b/ecs-cli/modules/commands/flags/flags.go @@ -150,6 +150,7 @@ const ( // Local TaskDefinitionFileFlag = "file" TaskDefinitionArnFlag = "arn" + TaskDefinitionTaskFlag = "task-def" LocalOutputFlag = "output" JsonFlag = "json" AllFlag = "all" diff --git a/ecs-cli/modules/commands/local/local_command.go b/ecs-cli/modules/commands/local/local_command.go index f468b4669..f6496749a 100644 --- a/ecs-cli/modules/commands/local/local_command.go +++ b/ecs-cli/modules/commands/local/local_command.go @@ -60,12 +60,20 @@ func upCommand() cli.Command { func downCommand() cli.Command { return cli.Command{ Name: "down", - Usage: "Stop and remove a running local ECS task.", + Usage: "Stop and remove a running ECS task container.", Action: local.Down, Flags: []cli.Flag{ cli.BoolFlag{ Name: flags.AllFlag, - Usage: "Stop and remove all running local ECS tasks.", + Usage: "Stops and removes all running containers", + }, + cli.StringFlag{ + Name: flags.TaskDefinitionTaskFlag, + Usage: "Stops and removes all running containers matching the task family or ARN", + }, + cli.StringFlag{ + Name: flags.TaskDefinitionFileFlag, + Usage: "Stops and removes all running containers matching the path", }, }, } @@ -81,6 +89,14 @@ func psCommand() cli.Command { Name: flags.AllFlag, Usage: "Lists all running local ECS tasks.", }, + cli.StringFlag{ + Name: flags.TaskDefinitionTaskFlag, + Usage: "Lists all running containers matching the task family or ARN", + }, + cli.StringFlag{ + Name: flags.TaskDefinitionFileFlag, + Usage: "Lists all running containers matching the path", + }, cli.BoolFlag{ Name: flags.JsonFlag, Usage: "Output in JSON format.", From 551e12cb13565df8332ccd776ac82c6ba5ef09ad Mon Sep 17 00:00:00 2001 From: penghaoh Date: Thu, 13 Jun 2019 09:25:41 -0700 Subject: [PATCH 2/6] add Type filter --- ecs-cli/modules/cli/local/down_app.go | 2 ++ ecs-cli/modules/cli/local/ps_app.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/ecs-cli/modules/cli/local/down_app.go b/ecs-cli/modules/cli/local/down_app.go index be949826a..6e58411ca 100644 --- a/ecs-cli/modules/cli/local/down_app.go +++ b/ecs-cli/modules/cli/local/down_app.go @@ -53,11 +53,13 @@ func Down(c *cli.Context) error { if c.String(flags.TaskDefinitionFileFlag) != "" { return downLocalContainersWithFilters(filters.NewArgs( filters.Arg("label", taskDefinitionLabelValue+"="+c.String(flags.TaskDefinitionFileFlag)), + filters.Arg("label", taskDefinitionLabelType+"="+"localFile"), )) } if c.String(flags.TaskDefinitionTaskFlag) != "" { return downLocalContainersWithFilters(filters.NewArgs( filters.Arg("label", taskDefinitionLabelValue+"="+c.String(flags.TaskDefinitionTaskFlag)), + filters.Arg("label", taskDefinitionLabelType+"="+"remoteFile"), )) } if c.Bool(flags.AllFlag) { diff --git a/ecs-cli/modules/cli/local/ps_app.go b/ecs-cli/modules/cli/local/ps_app.go index 71eff298a..1b769e7cd 100644 --- a/ecs-cli/modules/cli/local/ps_app.go +++ b/ecs-cli/modules/cli/local/ps_app.go @@ -86,11 +86,13 @@ func listContainers(c *cli.Context) []types.Container { if c.String(flags.TaskDefinitionFileFlag) != "" { return listContainersWithFilters(filters.NewArgs( filters.Arg("label", taskDefinitionLabelValue+"="+c.String(flags.TaskDefinitionFileFlag)), + filters.Arg("label", taskDefinitionLabelType+"="+"localFile"), )) } if c.String(flags.TaskDefinitionTaskFlag) != "" { return listContainersWithFilters(filters.NewArgs( filters.Arg("label", taskDefinitionLabelValue+"="+c.String(flags.TaskDefinitionTaskFlag)), + filters.Arg("label", taskDefinitionLabelType+"="+"remoteFile"), )) } if c.Bool(flags.AllFlag) { From 46b8b94a056bf851f1ffd1154a889e7765f9999b Mon Sep 17 00:00:00 2001 From: penghaoh Date: Thu, 13 Jun 2019 14:17:09 -0700 Subject: [PATCH 3/6] changed the name for optionsPreCheck and added back the ALL to down filter --- ecs-cli/modules/cli/local/down_app.go | 3 ++- ecs-cli/modules/cli/local/ps_app.go | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ecs-cli/modules/cli/local/down_app.go b/ecs-cli/modules/cli/local/down_app.go index 6e58411ca..a73ff63e3 100644 --- a/ecs-cli/modules/cli/local/down_app.go +++ b/ecs-cli/modules/cli/local/down_app.go @@ -42,7 +42,7 @@ func Down(c *cli.Context) error { network.Teardown(client) }() - if err := psOptionsPreCheck(c); err != nil { + if err := optionsPreCheck(c); err != nil { logrus.Fatalf("Tasks can be either created by local files or remote files") } // if c.Bool(flags.AllFlag) { @@ -94,6 +94,7 @@ func downLocalContainersWithFilters(args filters.Args) error { client := docker.NewClient() containers, err := client.ContainerList(ctx, types.ContainerListOptions{ Filters: args, + All: true, }) if err != nil { logrus.Fatalf("Failed to list containers with label=%s due to %v", taskDefinitionLabelValue, err) diff --git a/ecs-cli/modules/cli/local/ps_app.go b/ecs-cli/modules/cli/local/ps_app.go index 1b769e7cd..922dd75ba 100644 --- a/ecs-cli/modules/cli/local/ps_app.go +++ b/ecs-cli/modules/cli/local/ps_app.go @@ -68,14 +68,14 @@ const ( // If the --all flag is provided, then list all local ECS task containers. // If the --json flag is provided, then output the format as JSON instead. func Ps(c *cli.Context) { - if err := psOptionsPreCheck(c); err != nil { + if err := optionsPreCheck(c); err != nil { logrus.Fatalf("Tasks can be either created by local files or remote files") } containers := listContainers(c) displayContainers(c, containers) } -func psOptionsPreCheck(c *cli.Context) error { +func optionsPreCheck(c *cli.Context) error { if (c.String(flags.TaskDefinitionFileFlag) != "") && (c.String(flags.TaskDefinitionTaskFlag) != "") { return errors.New("Tasks can be either created by local files or remote files") } From 88383b069d83e00fd2f513bcf865ff0d1b220d21 Mon Sep 17 00:00:00 2001 From: penghaoh Date: Thu, 13 Jun 2019 15:38:10 -0700 Subject: [PATCH 4/6] remove Dockerfile from .gitignore and renamed functions --- .gitignore | 3 +-- ecs-cli/modules/cli/local/down_app.go | 2 +- ecs-cli/modules/cli/local/ps_app.go | 6 +++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index b3f7091be..3ef2a825e 100644 --- a/.gitignore +++ b/.gitignore @@ -9,5 +9,4 @@ ecs-cli/.vscode/* ecs-cli/.idea .idea/* *.DS_Store -*.yml -Dockerfile \ No newline at end of file +*.yml \ No newline at end of file diff --git a/ecs-cli/modules/cli/local/down_app.go b/ecs-cli/modules/cli/local/down_app.go index a73ff63e3..a0a7e56a9 100644 --- a/ecs-cli/modules/cli/local/down_app.go +++ b/ecs-cli/modules/cli/local/down_app.go @@ -42,7 +42,7 @@ func Down(c *cli.Context) error { network.Teardown(client) }() - if err := optionsPreCheck(c); err != nil { + if err := validateOptions(c); err != nil { logrus.Fatalf("Tasks can be either created by local files or remote files") } // if c.Bool(flags.AllFlag) { diff --git a/ecs-cli/modules/cli/local/ps_app.go b/ecs-cli/modules/cli/local/ps_app.go index 922dd75ba..0a6f94952 100644 --- a/ecs-cli/modules/cli/local/ps_app.go +++ b/ecs-cli/modules/cli/local/ps_app.go @@ -68,14 +68,14 @@ const ( // If the --all flag is provided, then list all local ECS task containers. // If the --json flag is provided, then output the format as JSON instead. func Ps(c *cli.Context) { - if err := optionsPreCheck(c); err != nil { - logrus.Fatalf("Tasks can be either created by local files or remote files") + if err := validateOptions(c); err != nil { + logrus.Fatalf(err.Error()) } containers := listContainers(c) displayContainers(c, containers) } -func optionsPreCheck(c *cli.Context) error { +func validateOptions(c *cli.Context) error { if (c.String(flags.TaskDefinitionFileFlag) != "") && (c.String(flags.TaskDefinitionTaskFlag) != "") { return errors.New("Tasks can be either created by local files or remote files") } From 0329378ab93deacd37377fe76735d6083752481a Mon Sep 17 00:00:00 2001 From: penghaoh Date: Fri, 14 Jun 2019 09:32:20 -0700 Subject: [PATCH 5/6] changed format for string; fatal error text; moved const to create_app.go --- .gitignore | 5 +-- ecs-cli/modules/cli/local/create_app.go | 27 ++++++++++++++ ecs-cli/modules/cli/local/down_app.go | 27 ++++++-------- ecs-cli/modules/cli/local/ps_app.go | 35 +++++-------------- .../modules/commands/local/local_command.go | 4 +-- 5 files changed, 48 insertions(+), 50 deletions(-) diff --git a/.gitignore b/.gitignore index b3f7091be..e1595e138 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,4 @@ ecs-cli/vendor/pkg .vscode/* ecs-cli/.vscode/* ecs-cli/.idea -.idea/* -*.DS_Store -*.yml -Dockerfile \ No newline at end of file +.idea/* \ No newline at end of file diff --git a/ecs-cli/modules/cli/local/create_app.go b/ecs-cli/modules/cli/local/create_app.go index b0b642059..5bbedeef9 100644 --- a/ecs-cli/modules/cli/local/create_app.go +++ b/ecs-cli/modules/cli/local/create_app.go @@ -18,12 +18,39 @@ package local import ( "fmt" + "github.com/aws/amazon-ecs-cli/ecs-cli/modules/commands/flags" "github.com/urfave/cli" ) +const ( + // taskDefinitionLabelType represents the type of option used to + // transform a task definition to a compose file e.g. remoteFile, localFile. + // taskDefinitionLabelValue represents the value of the option + // e.g. file path, arn, family. + taskDefinitionLabelType = "ecsLocalTaskDefType" + taskDefinitionLabelValue = "ecsLocalTaskDefVal" +) + +const ( + localTaskDefType = "localFile" + remoteTaskDefType = "remoteFile" +) + +const ( + ecsLocalDockerComposeFileName = "docker-compose.local.yml" +) + func Create(c *cli.Context) { // 1. read in task def (from file or arn) // 2. parse task def into go object // 3. write to docker-compose.local.yml file fmt.Println("foo") // placeholder } + +func validateOptions(c *cli.Context) error { + if (c.String(flags.TaskDefinitionFileFlag) != "") && (c.String(flags.TaskDefinitionTaskFlag) != "") { + return fmt.Errorf("%s and %s can not be used together", + flags.TaskDefinitionTaskFlag, flags.TaskDefinitionFileFlag) + } + return nil +} diff --git a/ecs-cli/modules/cli/local/down_app.go b/ecs-cli/modules/cli/local/down_app.go index a73ff63e3..096d4722d 100644 --- a/ecs-cli/modules/cli/local/down_app.go +++ b/ecs-cli/modules/cli/local/down_app.go @@ -14,6 +14,7 @@ package local import ( + "fmt" "os" "os/exec" "path/filepath" @@ -28,12 +29,6 @@ import ( "golang.org/x/net/context" ) -// TODO These labels should be defined part of the local.Create workflow. -// Refactor to import these constants instead of re-defining them here. -const ( - ecsLocalDockerComposeFileName = "docker-compose.local.yml" -) - // Down stops and removes running local ECS tasks. // If the user stops the last running task in the local network then also remove the network. func Down(c *cli.Context) error { @@ -42,24 +37,22 @@ func Down(c *cli.Context) error { network.Teardown(client) }() - if err := optionsPreCheck(c); err != nil { - logrus.Fatalf("Tasks can be either created by local files or remote files") + if err := validateOptions(c); err != nil { + logrus.Fatal(err.Error()) } - // if c.Bool(flags.AllFlag) { - // return downLocalContainersWithFilters() - // } - // return downComposeLocalContainers() if c.String(flags.TaskDefinitionFileFlag) != "" { return downLocalContainersWithFilters(filters.NewArgs( - filters.Arg("label", taskDefinitionLabelValue+"="+c.String(flags.TaskDefinitionFileFlag)), - filters.Arg("label", taskDefinitionLabelType+"="+"localFile"), + filters.Arg("label", fmt.Sprintf("%s=%s", taskDefinitionLabelValue, + c.String(flags.TaskDefinitionFileFlag))), + filters.Arg("label", fmt.Sprintf("%s=%s", taskDefinitionLabelType, localTaskDefType)), )) } if c.String(flags.TaskDefinitionTaskFlag) != "" { return downLocalContainersWithFilters(filters.NewArgs( - filters.Arg("label", taskDefinitionLabelValue+"="+c.String(flags.TaskDefinitionTaskFlag)), - filters.Arg("label", taskDefinitionLabelType+"="+"remoteFile"), + filters.Arg("label", fmt.Sprintf("%s=%s", taskDefinitionLabelValue, + c.String(flags.TaskDefinitionTaskFlag))), + filters.Arg("label", fmt.Sprintf("%s=%s", taskDefinitionLabelType, remoteTaskDefType)), )) } if c.Bool(flags.AllFlag) { @@ -97,7 +90,7 @@ func downLocalContainersWithFilters(args filters.Args) error { All: true, }) if err != nil { - logrus.Fatalf("Failed to list containers with label=%s due to %v", taskDefinitionLabelValue, err) + logrus.Fatalf("Failed to list containers with filters %v due to %v", args, err) } if len(containers) == 0 { logrus.Warn("No running ECS local tasks found") diff --git a/ecs-cli/modules/cli/local/ps_app.go b/ecs-cli/modules/cli/local/ps_app.go index 922dd75ba..78f56608a 100644 --- a/ecs-cli/modules/cli/local/ps_app.go +++ b/ecs-cli/modules/cli/local/ps_app.go @@ -15,7 +15,6 @@ package local import ( "encoding/json" - "errors" "fmt" "os" "os/exec" @@ -32,19 +31,6 @@ import ( "golang.org/x/net/context" ) -// TODO These labels should be defined part of the local.Create workflow. -// Refactor to import these constants instead of re-defining them here. -// Docker object labels associated with containers created with "ecs-cli local". -const ( - // taskDefinitionLabelType represents the type of option used to - // transform a task definition to a compose file e.g. remoteFile, localFile. - // taskDefinitionLabelValue represents the value of the option - // e.g. file path, arn, family. - taskDefinitionLabelKey = "ecsLocalTaskDefinition" - taskDefinitionLabelType = "ecsLocalTaskDefType" - taskDefinitionLabelValue = "ecsLocalTaskDefVal" -) - // Table formatting settings used by the Docker CLI. // See https://github.com/docker/cli/blob/0904fbfc77dbd4b6296c56e68be573b889d049e3/cli/command/formatter/formatter.go#L74 const ( @@ -68,31 +54,26 @@ const ( // If the --all flag is provided, then list all local ECS task containers. // If the --json flag is provided, then output the format as JSON instead. func Ps(c *cli.Context) { - if err := optionsPreCheck(c); err != nil { - logrus.Fatalf("Tasks can be either created by local files or remote files") + if err := validateOptions(c); err != nil { + logrus.Fatal(err.Error()) } containers := listContainers(c) displayContainers(c, containers) } -func optionsPreCheck(c *cli.Context) error { - if (c.String(flags.TaskDefinitionFileFlag) != "") && (c.String(flags.TaskDefinitionTaskFlag) != "") { - return errors.New("Tasks can be either created by local files or remote files") - } - return nil -} - func listContainers(c *cli.Context) []types.Container { if c.String(flags.TaskDefinitionFileFlag) != "" { return listContainersWithFilters(filters.NewArgs( - filters.Arg("label", taskDefinitionLabelValue+"="+c.String(flags.TaskDefinitionFileFlag)), - filters.Arg("label", taskDefinitionLabelType+"="+"localFile"), + filters.Arg("label", fmt.Sprintf("%s=%s", taskDefinitionLabelValue, + c.String(flags.TaskDefinitionFileFlag))), + filters.Arg("label", fmt.Sprintf("%s=%s", taskDefinitionLabelType, localTaskDefType)), )) } if c.String(flags.TaskDefinitionTaskFlag) != "" { return listContainersWithFilters(filters.NewArgs( - filters.Arg("label", taskDefinitionLabelValue+"="+c.String(flags.TaskDefinitionTaskFlag)), - filters.Arg("label", taskDefinitionLabelType+"="+"remoteFile"), + filters.Arg("label", fmt.Sprintf("%s=%s", taskDefinitionLabelValue, + c.String(flags.TaskDefinitionTaskFlag))), + filters.Arg("label", fmt.Sprintf("%s=%s", taskDefinitionLabelType, remoteTaskDefType)), )) } if c.Bool(flags.AllFlag) { diff --git a/ecs-cli/modules/commands/local/local_command.go b/ecs-cli/modules/commands/local/local_command.go index f6496749a..2ff1401d1 100644 --- a/ecs-cli/modules/commands/local/local_command.go +++ b/ecs-cli/modules/commands/local/local_command.go @@ -73,7 +73,7 @@ func downCommand() cli.Command { }, cli.StringFlag{ Name: flags.TaskDefinitionFileFlag, - Usage: "Stops and removes all running containers matching the path", + Usage: "Stops and removes all running containers matching the task definition file path", }, }, } @@ -95,7 +95,7 @@ func psCommand() cli.Command { }, cli.StringFlag{ Name: flags.TaskDefinitionFileFlag, - Usage: "Lists all running containers matching the path", + Usage: "Lists all running containers matching the task definition file path", }, cli.BoolFlag{ Name: flags.JsonFlag, From 520d17719be12bec1cf797dcabb677d48f47761d Mon Sep 17 00:00:00 2001 From: penghaoh Date: Fri, 14 Jun 2019 15:15:00 -0700 Subject: [PATCH 6/6] fixed Timeout Error for TestCreateClusterWithFargateService --- ecs-cli/integ/cmd/compose.go | 1 + 1 file changed, 1 insertion(+) diff --git a/ecs-cli/integ/cmd/compose.go b/ecs-cli/integ/cmd/compose.go index 94015b464..43cfeb89d 100644 --- a/ecs-cli/integ/cmd/compose.go +++ b/ecs-cli/integ/cmd/compose.go @@ -85,6 +85,7 @@ func TestServiceUp(t *testing.T, p *Project) { "up", "--cluster-config", p.ConfigName, + "--create-log-groups", } cmd := integ.GetCommand(args)