Skip to content

Adding option to pass --yes to copilot deploy --diff #4825

@raethlo

Description

@raethlo

Hey all👋🏻 When using the new --diff it would be nice to be able to automatically say --yes and be able to see the diff as well.

copilot svc deploy --diff --yes

Alternatively it could work similarly to how tf plan lets you save the plan to a file which you can then reference when you are ready to tf apply (probably a lot more work to implement tho).

Does that sound like sth you'd consider adding?

additional notes

We've checked if we can pipe yes to copliot env/svc deploy but looks like it currently does not work as expected.

Continue with the deployment? (y/N) 25l25hpanic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1117423]

goroutine 1 [running]:
github.com/AlecAivazis/survey/v2/terminal.(*RuneReader).ReadLineWithDefault.func2(...)
	/go/pkg/mod/github.com/!alec!aivazis/survey/v2@v2.3.2/terminal/runereader.go:65
github.com/AlecAivazis/survey/v2/terminal.(*RuneReader).ReadLineWithDefault(0xc0005b9408, 0x0?, {0x2f67e40, 0x0, 0x0}, {0x0?, 0x0?, 0x0?})
	/go/pkg/mod/github.com/!alec!aivazis/survey/v2@v2.3.2/terminal/runereader.go:321 +0x5a3
github.com/AlecAivazis/survey/v2/terminal.(*RuneReader).ReadLine(...)
	/go/pkg/mod/github.com/!alec!aivazis/survey/v2@v2.3.2/terminal/runereader.go:37
github.com/AlecAivazis/survey/v2.(*Confirm).getBool(0xc0000d2000, 0x0, 0xc0004b0728)
	/go/pkg/mod/github.com/!alec!aivazis/survey/v2@v2.3.2/confirm.go:57 +0x217
github.com/AlecAivazis/survey/v2.(*Confirm).Prompt(0xc0000d2000, 0xc0004b0728)
	/go/pkg/mod/github.com/!alec!aivazis/survey/v2@v2.3.2/confirm.go:136 +0xf6
github.com/AlecAivazis/survey/v2.Ask({0xc0005b[98](https://github.com/intellcre/intellcre/actions/runs/4864643273/jobs/8673920407?pr=1998#step:5:99)b0, 0x1, 0x1750320?}, {0x16d2880?, 0xc0007cbcae}, {0xc0003f4930, 0x2, 0x2f39580?})
	/go/pkg/mod/github.com/!alec!aivazis/survey/v2@v2.3.2/survey.go:308 +0x217
github.com/AlecAivazis/survey/v2.AskOne({0x20f77a0?, 0xc0002480c0?}, {0x16d2880?, 0xc0007cbcae?}, {0xc0003f4930?, 0xc00065e020?, 0x1955160?})
	/go/pkg/mod/github.com/!alec!aivazis/survey/v2@v2.3.2/survey.go:251 +0x90
github.com/aws/copilot-cli/internal/pkg/term/prompt.Prompt.Confirm(0x1db6110, {0x1cd4528, 0x1d}, {0x0, 0x0}, {0x0, 0x0, 0xa?})
	/codebuild/output/src690859215/src/internal/pkg/term/prompt/prompt.go:247 +0x308
github.com/aws/copilot-cli/internal/pkg/cli.(*deploySvcOpts).Execute(0xc0000c0160)
	/codebuild/output/src690859215/src/internal/pkg/cli/svc_deploy.go:263 +0x6e3
github.com/aws/copilot-cli/internal/pkg/cli.run({0x20f7020, 0xc0000c0160})
	/codebuild/output/src690859215/src/internal/pkg/cli/cli.go:98 +0x59
github.com/aws/copilot-cli/internal/pkg/cli.buildSvcDeployCmd.func1(0x0?, {0x0?, 0x0?, 0x0?})
	/codebuild/output/src690859215/src/internal/pkg/cli/svc_deploy.go:632 +0x5c
github.com/aws/copilot-cli/internal/pkg/cli.runCmdE.func1(0xc000452f00?, {0xc000088960?, 0x6?, 0x6?})
	/codebuild/output/src690859215/src/internal/pkg/cli/cli.go:72 +0x7b
github.com/spf13/cobra.(*Command).execute(0xc000452f00, {0xc000088900, 0x6, 0x6})
	/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:916 +0x862
github.com/spf13/cobra.(*Command).ExecuteC(0xc000188600)
	/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:4 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
	/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:968
main.main()
	/codebuild/output/src690859215/src/cmd/copilot/main.go:34 +0x25
yes: standard output: Broken pipe

Metadata

Metadata

Assignees

No one assigned

    Labels

    size/SWe should be able to deliver roughly 2 small issues in a sprint.type/featureIssues that are new feature requests.type/requestIssues that are created by customers.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions