Skip to content

Conversation

@ereslibre
Copy link
Collaborator

@ereslibre ereslibre commented Sep 1, 2025

Add a new stop command that allows users to gracefully stop running tasks and clean up associated resources including Docker containers, Git worktrees, and branches.

The command provides granular control over what resources to clean up through options, making it flexible for different use cases while providing a sensible default behavior.

Changes

  • New stop command: Added rover stop <taskId> command with comprehensive cleanup options
  • Resource cleanup: Supports stopping Docker containers, removing Git worktrees, and deleting branches
  • Flexible options: Added --remove-all, --remove-container, and --remove-git-worktree-and-branch flags
  • JSON output support: Added --json option for programmatic usage
  • Telemetry integration: Added stop task event tracking to telemetry package
  • Error handling: Proper error handling for missing tasks and cleanup failures
  • User feedback: Clear success messages and helpful tips for next steps

Notes

The stop command integrates with the existing task lifecycle by updating the task status to "cancelled" and providing users with helpful next steps like viewing logs, restarting, or completely deleting the task.

Closes: #78

@ereslibre ereslibre self-assigned this Sep 1, 2025
@ereslibre ereslibre force-pushed the rover/task-9-c6KPTIBrF-Sn branch 2 times, most recently from 575497a to 94bcd33 Compare September 2, 2025 13:50
@ereslibre ereslibre marked this pull request as ready for review September 3, 2025 06:38
@ereslibre ereslibre added this to the beta milestone Sep 3, 2025
Copy link
Contributor

@Angelmmiguel Angelmmiguel left a comment

Choose a reason for hiding this comment

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

Added a few comments here.

@ereslibre
Copy link
Collaborator Author

@Angelmmiguel By default, stop just runs docker stop, however, you can provide more flags:

  • -a: effectively the same as -c and -g; clean docker container if it exists, git worktree and branch
  • -c: clean container if it exists
  • -g: clean git worktree and branch

@ereslibre ereslibre force-pushed the rover/task-9-c6KPTIBrF-Sn branch from 6b0ed98 to ce572b3 Compare September 3, 2025 14:06
@ereslibre
Copy link
Collaborator Author

Sorry, had to force push because I had to rebase to include launch and launchSync

Copy link
Contributor

@Angelmmiguel Angelmmiguel left a comment

Choose a reason for hiding this comment

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

LGTM!

@ereslibre ereslibre changed the title feat: Include a stop command that stops the current running container and cleans up feat: add stop command to stop running tasks and clean up resources Sep 4, 2025
@ereslibre ereslibre merged commit aea60c0 into main Sep 4, 2025
4 checks passed
@ereslibre ereslibre deleted the rover/task-9-c6KPTIBrF-Sn branch September 4, 2025 13:06
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.

Include a stop command that stops the current running container and cleans up

3 participants