Skip to content

fix(cli): svc/job delete should select from SSM#2182

Merged
mergify[bot] merged 2 commits intoaws:mainlinefrom
iamhopaul123:svc-deploy-fix
Apr 21, 2021
Merged

fix(cli): svc/job delete should select from SSM#2182
mergify[bot] merged 2 commits intoaws:mainlinefrom
iamhopaul123:svc-deploy-fix

Conversation

@iamhopaul123
Copy link
Copy Markdown
Contributor

Currently our svc/job delete select candidates with local workspace files. However, this is not ideal since delete doesn't require to be in the workspace since we won't delete the local files. Also, this could hurt the idempotency since if the local files are removed, users cannot use svc/job delete to delete their workloads anymore.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@iamhopaul123 iamhopaul123 requested a review from a team as a code owner April 16, 2021 18:27
@iamhopaul123 iamhopaul123 requested a review from bvtujo April 16, 2021 18:27
Copy link
Copy Markdown
Contributor

@huanjani huanjani left a comment

Choose a reason for hiding this comment

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

Thanks for finding this bug and fixing it!

Copy link
Copy Markdown
Contributor

@efekarakus efekarakus left a comment

Choose a reason for hiding this comment

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

LGTM, I think originally we had it only working within a repository so that we delete the copilot/.workspace file.

With these changes, I wonder if we should improve our messages when an application is not found in a workspace 🤔. Right now we display:

✘ get application example: couldn't find an application named example in account 111122223333 and region us-west-2

what do you think of logging some additional context so that the users can unblock themselves?

We detected the application "example" in "copilot/.workspace", to use a different application please delete the file.
✘ get application example: couldn't find an application named example in account 111122223333 and region us-west-2

log.Infof("Only found one service, defaulting to: %s\n", color.HighlightUserInput(services[0]))
return services[0], nil
}
selectedAppName, err := s.prompt.SelectOne(prompt, help, services)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

😂 wow that's an old name that stuck around for a while

@mergify mergify Bot merged commit 7b874e9 into aws:mainline Apr 21, 2021
thrau pushed a commit to localstack/copilot-cli-local that referenced this pull request Dec 9, 2022
<!-- Provide summary of changes -->
Currently our `svc/job delete` select candidates with local workspace files. However, this is not ideal since delete doesn't require to be in the workspace since we won't delete the local files. Also, this could hurt the idempotency since if the local files are removed, users cannot use `svc/job delete` to delete their workloads anymore.
<!-- Issue number, if available. E.g. "Fixes aws#31", "Addresses aws#42, 77" -->

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants