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

feat(remove): Require confirmation prompt or -f before removing a resource #100

Merged
merged 16 commits into from
Mar 30, 2021

Conversation

raulb
Copy link
Member

@raulb raulb commented Mar 30, 2021

Description of change

Fixes https://meroxa.atlassian.net/browse/PLATFORM-31

Before removing a resource, we want to prompt for confirmation unless the -f or --force was specified. This pull-request adds that feature. See demo below.

This pull request also includes some new tests more inline with the recently added in #98.

Type of change

  • New feature
  • Bug fix
  • Refactor
  • Documentation

How was this tested?

  • Unit Tests
  • Deployed to staging

Demo

With --force \ -f

❯ .m remove resource resource-729906 --force
Resource resource-729906 removed

❯ .m remove resource resource-729906 -f
Resource resource-729906 removed

With an incorrect confirmation value

❯ .m remove resource resource-729906
To proceed, type resource-729906 or re-run this command with --force
▸ foo
Error: removing resource not confirmed

With a correct confirmation value

❯ .m remove resource resource-729906
To proceed, type resource-729906 or re-run this command with --force
▸ resource-729906
Resource resource-729906 removed

@raulb
Copy link
Member Author

raulb commented Mar 30, 2021

Once we ship https://github.com/meroxa/acceptance/pull/25, this one should be good to go.

@raulb raulb force-pushed the raul/force-remove branch from 491df78 to 128721f Compare March 30, 2021 17:13
@raulb raulb force-pushed the raul/force-remove branch from 128721f to 0b2b667 Compare March 30, 2021 17:14
@raulb raulb merged commit e94c881 into master Mar 30, 2021
@raulb raulb deleted the raul/force-remove branch March 30, 2021 17:20
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.

3 participants