Skip to content

Require confirmation for spacetime delete#4770

Open
clockwork-labs-bot wants to merge 1 commit intomasterfrom
bot/delete-requires-confirmation
Open

Require confirmation for spacetime delete#4770
clockwork-labs-bot wants to merge 1 commit intomasterfrom
bot/delete-requires-confirmation

Conversation

@clockwork-labs-bot
Copy link
Copy Markdown
Collaborator

Summary

  • require an explicit confirmation before spacetime delete sends an irreversible delete request
  • preserve --yes as the non-interactive override
  • add smoketests for aborting on n, deleting on y, and skipping the prompt with --yes

Closes #4679.

History note

spacetime delete has never required confirmation for ordinary deletes. The command was added in commit 44df6c6e7 (Initial commit, 2023-08-01) without a prompt. Later, commit a36f7091d ([teams 3/5] API authorization, CLI, smoketests, 2025-11-11) added a confirmation flow only for the special case where deleting a database would also delete its children, but plain deletes still executed immediately until this change.

Testing

  • cargo check -p spacetimedb-cli
  • cargo build --release -p spacetimedb-cli -p spacetimedb-standalone --features spacetimedb-standalone/allow_loopback_http_for_tests
  • cd crates/smoketests/modules && cargo build --release --target wasm32-unknown-unknown -p smoketest-module-delete-database
  • cargo test -p spacetimedb-smoketests --test integration delete_database -- --nocapture

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.

spacetime delete should require confirmation

1 participant