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(bin): Nuke Subcommand #19

Open
Tracked by #17
refcell opened this issue Oct 3, 2023 · 0 comments
Open
Tracked by #17

feat(bin): Nuke Subcommand #19

refcell opened this issue Oct 3, 2023 · 0 comments
Labels
A-bin Area: Binary related alpha C-feature Category: Features M-good-first-issue Meta: Good first issue

Comments

@refcell
Copy link
Collaborator

refcell commented Oct 3, 2023

Description

As part of #17, this task is to introduce a convenience nuke subcommand that nukes all running op-up stack components (including cleaning/pruning any docker containers, images, and volumes). Since this is a destructive command, it should use inquire to prompt the user to confirm that they want to perform the given actions (described in detail before the confirmation prompt).

Nuking logic should be entirely handled by the StageManager system orchestrator.

The extent of how to nuke stacks should be managed through cli flags and passed into the StageManager when executing the nuke() call. Since nuking also involves the local stack, the opup cli binary should build the StageManager from the config, and then call nuke() -> eyre::Result<()>. How the nuke cli flags are configured in the StageManager when building from the config or passing them directly in the nuke() call as arguments is an implementation detail, that is up to the implementor.

For example

StageManager::from(config).nuke()?;

Since the cli binary logic is minimal, it should be placed inside the cli.rs file where subcommand dispatching is handled.

@refcell refcell added A-bin Area: Binary related alpha M-good-first-issue Meta: Good first issue labels Oct 3, 2023
@refcell refcell mentioned this issue Oct 3, 2023
6 tasks
@refcell refcell added the C-feature Category: Features label Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-bin Area: Binary related alpha C-feature Category: Features M-good-first-issue Meta: Good first issue
Projects
None yet
Development

No branches or pull requests

1 participant