feat: deployment rollback to previous image (closes #71) #75

Merged
sneak merged 1 commits from feature/deployment-rollback into main 2026-02-16 09:25:34 +01:00
Collaborator

Summary

Implements deployment rollback feature per issue #71 / TODO.md Phase 3.2.

Changes

  • Migration 006: Add previous_image_id column to apps table
  • Deploy service: Save current image as previous_image_id before deploying new one
  • Rollback endpoint: POST /apps/{id}/rollback — stops current container, starts previous image, creates deployment record
  • UI: Rollback button on app detail page (only visible when previous image exists)
  • CSS: Added btn-warning class for rollback button styling

Test Results

All tests pass (make test)
Lint clean (golangci-lint run ./... — 0 issues)

fixes #71

## Summary Implements deployment rollback feature per issue #71 / TODO.md Phase 3.2. ## Changes - **Migration 006**: Add `previous_image_id` column to apps table - **Deploy service**: Save current image as `previous_image_id` before deploying new one - **Rollback endpoint**: `POST /apps/{id}/rollback` — stops current container, starts previous image, creates deployment record - **UI**: Rollback button on app detail page (only visible when previous image exists) - **CSS**: Added `btn-warning` class for rollback button styling ## Test Results ✅ All tests pass (`make test`) ✅ Lint clean (`golangci-lint run ./...` — 0 issues) fixes #71
sneak was assigned by clawbot 2026-02-16 09:23:24 +01:00
clawbot added 1 commit 2026-02-16 09:23:25 +01:00
- Add previous_image_id column to apps table (migration 006)
- Save current image as previous before deploying new one
- POST /apps/{id}/rollback endpoint with handler
- Rollback stops current container, starts previous image
- Creates deployment record for rollback operations
- Rollback button in app detail UI (only when previous image exists)
- Add btn-warning CSS class for rollback button styling

fixes #71
sneak merged commit 046cccf31f into main 2026-02-16 09:25:34 +01:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sneak/upaas#75
No description provided.