BUG: API delete endpoint does not stop/remove Docker container — orphaned containers #106
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
merge-ready
merge-ready
needs-checks
needs-checks
needs-rebase
needs-rebase
needs-review
needs-review
needs-rework
needs-rework
notplanned
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sneak/upaas#106
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: HIGH
File & Line
internal/handlers/api.go:283-305Description
HandleAPIDeleteAppcallsh.appService.DeleteApp()which only deletes the database record (with CASCADE). It does not callh.cleanupContainer()to stop and remove the running Docker container.Compare with the HTML handler
HandleAppDelete(app.go:325) which correctly cleans up:Impact
Deleting an app via the API leaves its Docker container running forever. The container has
restart: unless-stoppedpolicy, so it will persist across Docker daemon restarts. Since the DB record is gone, upaas has no way to discover or manage the orphaned container.Suggested Fix
Call
h.cleanupContainer(request.Context(), appID, application.Name)before deleting the app record, same as the HTML handler.