Skip to content

Add --force flag to cloud service delete#65

Merged
sdairs merged 4 commits intomainfrom
issue-64-force-delete
Mar 30, 2026
Merged

Add --force flag to cloud service delete#65
sdairs merged 4 commits intomainfrom
issue-64-force-delete

Conversation

@sdairs
Copy link
Copy Markdown
Collaborator

@sdairs sdairs commented Mar 29, 2026

Summary

  • Adds --force flag to cloud service delete
  • When set, stops the service first (if running/idle/starting), polls until stopped, then deletes
  • Without --force, behavior is unchanged

Usage

# Fails if service is running
clickhousectl cloud service delete <id>

# Stops and deletes in one step
clickhousectl cloud service delete <id> --force

Test plan

  • delete without --force still fails on a running service
  • delete --force on a running service stops then deletes
  • delete --force on an already stopped service deletes directly
  • All existing tests pass

Closes #64

🤖 Generated with Claude Code

When --force is set, stops the service first (if running) and waits
for it to reach a stopped state before deleting. Without --force,
behavior is unchanged — delete fails if the service is still running.

Closes #64

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sdairs sdairs requested a review from iskakaushik as a code owner March 29, 2026 12:19
@sdairs sdairs temporarily deployed to cloud-integration March 29, 2026 12:19 — with GitHub Actions Inactive
sdairs and others added 2 commits March 29, 2026 13:23
Creates a single-node service, waits for it to be running, then
runs delete --force and confirms the service is gone.

Also updates CI to run all cloud integration tests in parallel
since each test uses its own service.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sdairs sdairs temporarily deployed to cloud-integration March 29, 2026 12:28 — with GitHub Actions Inactive
Adds a step before the force delete that verifies a plain delete
is rejected when the service is still running.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sdairs sdairs temporarily deployed to cloud-integration March 29, 2026 13:32 — with GitHub Actions Inactive
@sdairs sdairs merged commit aaafde7 into main Mar 30, 2026
1 check passed
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.

Add force flag to cloud service delete to stop and delete

2 participants