Skip to content

feat: add ps restart command with --force flag#160

Open
blsmth wants to merge 2 commits into
mainfrom
agent/go-engineer/adhoc-0a5e6e32
Open

feat: add ps restart command with --force flag#160
blsmth wants to merge 2 commits into
mainfrom
agent/go-engineer/adhoc-0a5e6e32

Conversation

@blsmth

@blsmth blsmth commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds apppack ps restart <process_type> CLI command (closes Add ps restart command #39)
  • Graceful path (default): calls ECS UpdateService with ForceNewDeployment: true for a zero-downtime rolling restart
  • Forced path (--force): stops all running containers matching the apppack:processType tag via StopTask; ECS relaunches them automatically
  • Pipelines without a review app are blocked (same guard as ps scale)

Implementation

  • app/app.go: new RestartProcess(processType string, force bool) error method + unexported getTagFromTask helper
  • cmd/ps.go: new psRestartCmd registered under psCmd, with --force bool flag

Notes

The required IAM permissions (ecs:UpdateService, ecs:StopTask, ecs:ListTasks, ecs:DescribeTasks scoped by ecs:cluster) were already added to WebOperatorRole in apppack-backend commit 45261d2 - this is CLI-only work.

Closes #39

blsmth added 2 commits July 23, 2026 13:03
Implements #39. Adds `apppack ps restart <process_type>`
with two modes:

- Graceful (default): calls ECS UpdateService with ForceNewDeployment=true
  to trigger a rolling restart without downtime.
- Forced (--force): calls DescribeTasks to find running tasks matching the
  apppack:processType tag, then stops each via StopTask so ECS relaunches
  them immediately.

The required IAM permissions (ecs:UpdateService, ecs:StopTask, ecs:ListTasks,
ecs:DescribeTasks scoped by ecs:cluster) were already added to WebOperatorRole
in apppack-backend commit 45261d2.
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 ps restart command

1 participant