Skip to content

copilot [env/svc] init should be idempotent within a workspace #5065

@Lou1415926

Description

@Lou1415926

Today, people can't run copilot [env/svc] init --name abc twice - the second execution will return an error [env/svc] "abc" already exists. This is to remind users that "abc" might have been managed by another workspace, and it is not recommended to manage the same env/svc via. 2+ different workspace.

However, Copilot don't have to error out if "abc" is managed by the current workspace. i.e. a succeed execution of svc init won't result in multiple workspaces managing the same env/svc.

In this case, Copilot should:

  1. Skip updating stack set.
  2. Skip the manifest creation.
  3. Not error out.

One benefit that this brings is that - new users that are just trying out copilot init sometimes have to exit in the middle of the program to tweak/understand the manifest. However, once they exit init, they wouldn't be able to run it again because of the said error. This allows them to do that, and provides a better onboarding experience.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/UIIssues about UIarea/svcIssues about services.good first issueIssues for newcomers.size/SWe should be able to deliver roughly 2 small issues in a sprint.type/enhancementIssues that are improvements for existing features.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions