Skip to content

[Feature]: Add --dry-run flag to the cleanup subcommand #5

Description

@mrhillsman

Problem Statement

The `run` subcommand supports `--dry-run` (line 74 of main.go) to preview what would be created without making changes. The `cleanup` subcommand has no equivalent flag. Cleanup is a destructive operation that deletes VMs, services, secrets, and optionally namespaces — arguably a stronger candidate for dry-run support than `run`.

Proposed Solution

Add `--dry-run` flag to `cleanup` that lists resources matching the label selector without deleting them.

Alternatives Considered

Not provided

Area

CLI / Configuration, Cleanup

Additional Context

Severity: Medium

Files:

  • `cmd/virtwork/main.go:85-96` — `newCleanupCmd()` function, no `--dry-run` flag

This was noted as potentially useful in the Phase 10 engineering journal.

Metadata

Metadata

Assignees

Labels

good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.kind/featureCategorizes issue or PR as related to a new feature.size/SDenotes a PR that changes 10-29 lines, ignoring generated files.

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions