Skip to content

[PM-1178] Add --kill flag for astro dev restart#2010

Merged
jlaneve merged 1 commit intomainfrom
agent/pm-1178
Feb 13, 2026
Merged

[PM-1178] Add --kill flag for astro dev restart#2010
jlaneve merged 1 commit intomainfrom
agent/pm-1178

Conversation

@jlaneve
Copy link
Contributor

@jlaneve jlaneve commented Feb 13, 2026

Summary

  • Adds a --kill flag (-k) to the astro dev restart command
  • When used, kills all running containers and removes all data before restarting (equivalent to running astro dev kill && astro dev start)
  • Useful for users who want to completely reset their local environment during restart

Changes

  • Added forceKill boolean flag variable
  • Added --kill/-k flag to newAirflowRestartCmd()
  • Modified airflowRestart() to call Kill() instead of Stop() when flag is set
  • Added comprehensive tests for the new flag

Test plan

  • Run astro dev restart --help and verify --kill flag appears with description
  • Run astro dev start to start local environment
  • Run astro dev restart --kill and verify containers are killed and data is removed
  • Run astro dev restart (without flag) and verify normal stop/start behavior

🤖 Generated with Claude Code

Add a --kill flag (-k) to the `astro dev restart` command that kills all
running containers and removes all data before restarting. This allows users
to run `astro dev restart --kill` instead of having to run `astro dev kill &&
astro dev start` separately.

When the --kill flag is used, the command calls containerHandler.Kill()
instead of containerHandler.Stop(true), which permanently deletes all
container data before starting fresh.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coveralls-official
Copy link

Pull Request Test Coverage Report for Build df3b1cb5-a3bb-48cd-b868-a8714aaf56de

Details

  • 6 of 6 (100.0%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.007%) to 33.159%

Files with Coverage Reduction New Missed Lines %
docker/docker.go 2 46.81%
Totals Coverage Status
Change from base Build e7f3543a-ee47-45c6-b0ae-d1b47b618aa7: 0.007%
Covered Lines: 20873
Relevant Lines: 62949

💛 - Coveralls

@jlaneve jlaneve marked this pull request as ready for review February 13, 2026 16:48
@jlaneve jlaneve requested a review from a team as a code owner February 13, 2026 16:48
@jlaneve jlaneve merged commit 134239a into main Feb 13, 2026
6 of 7 checks passed
@jlaneve jlaneve deleted the agent/pm-1178 branch February 13, 2026 16:50
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.

2 participants