Skip to content

feat: Add uninstall demo/stack feature#429

Open
xeniape wants to merge 33 commits intomainfrom
feat/add-demo-stack-deletion
Open

feat: Add uninstall demo/stack feature#429
xeniape wants to merge 33 commits intomainfrom
feat/add-demo-stack-deletion

Conversation

@xeniape
Copy link
Copy Markdown
Member

@xeniape xeniape commented Mar 12, 2026

Description

Part of #187

This PR adds the uninstall subcommands to demo and stack commands. It implements the MVP features mentioned here #187 (comment)

The flag of skipping operators and CRD deletion was optional and I wasn't sure about the naming or if needs to be one command or two. Can also be just removed, added it because it was not much additional work.

Tested with all current demos/stacks. Some demos have edge cases in the deletion, will document that in the parent issue.

This PR also contains the DEMO/STACK parameter addition for stackabletech/demos#374 (comment) stripped out into #432

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes

Author

  • Changes are OpenShift compatible
  • CRD changes approved
  • Helm chart can be installed and deployed operator works
  • Integration tests passed (for non trivial changes)

Reviewer

  • Code contains useful comments
  • (Integration-)Test cases added
  • Documentation added or updated
  • Changelog updated
  • Cargo.toml only contains references to git tags (not specific commits or branches)

Acceptance

  • Feature Tracker has been updated
  • Proper release label has been added

@xeniape xeniape self-assigned this Mar 12, 2026
@xeniape xeniape moved this to Development: Waiting for Review in Stackable Engineering Mar 12, 2026
@Techassi Techassi self-requested a review March 23, 2026 15:32
@NickLarsenNZ NickLarsenNZ moved this from Development: Waiting for Review to Development: In Review in Stackable Engineering Mar 25, 2026
Copy link
Copy Markdown
Member

@NickLarsenNZ NickLarsenNZ left a comment

Choose a reason for hiding this comment

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

Left a couple of comments about namespace deletion.

Copy link
Copy Markdown
Member

@Techassi Techassi left a comment

Choose a reason for hiding this comment

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

Left a few comments and questions.

Copy link
Copy Markdown
Member

@Techassi Techassi left a comment

Choose a reason for hiding this comment

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

Only a few small comments left, mostly looks nice!

};

for object in object_list {
if let Some(value) = object.labels().get(&label.key().to_string()) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

note: This is kinda cumbersome to use, but could be improved by stackabletech/operator-rs#1182 (if we decide to move forward with it).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The linked PR was merged btw, but not yet released.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@xeniape xeniape requested a review from Techassi March 30, 2026 13:31
Techassi
Techassi previously approved these changes Apr 7, 2026
Comment on lines +517 to +530
let proceed_with_uninstall = tracing_indicatif::suspend_tracing_indicatif(
|| -> Result<bool, CmdError> {
Confirm::new()
.with_prompt(
format!(
"Uninstalling the demo {demo_name:?} will delete the {demo_namespace:?} namespace. This action cannot be undone. Proceed?",
demo_name = args.demo_name.clone(),
demo_namespace = args.namespaces.namespace.clone())
)
.default(true)
.interact()
.context(ConfirmDialogSnafu)
},
)?;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Curious what happens when this runs in a script? Does indicative choose something, or just hang?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Development: In Review

Development

Successfully merging this pull request may close these issues.

3 participants