[PR #27] [MERGED] Drop stale records for missing LXC containers #28

Closed
opened 2026-10-15 12:51:26 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/games-on-whales/LXC2Docker/pull/27
Author: @JBailes
Created: 5/17/2026
Status: ✅ Merged
Merged: 5/17/2026
Merged by: @JBailes

Base: main ← Head: fix/delete-missing-lxc


📝 Commits (1)

  • 3f3a849 fix: drop stale records for missing lxc containers

📊 Changes

2 files changed (+51 additions, -2 deletions)

View changed files

📝 internal/lxc/manager.go (+18 -2)
📝 internal/lxc/manager_test.go (+33 -0)

📄 Description

Summary

  • treat missing LXC configs as already removed when deleting containers
  • recognize lxc-destroy's 'Container is not defined' output and remove the stale store record
  • cover both cleanup paths with unit tests

Verification

  • go test ./internal/store
  • go test ./internal/lxc ./internal/store cannot compile locally because this workstation is missing lxc.pc; CI should cover it.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/games-on-whales/LXC2Docker/pull/27 **Author:** [@JBailes](https://github.com/JBailes) **Created:** 5/17/2026 **Status:** ✅ Merged **Merged:** 5/17/2026 **Merged by:** [@JBailes](https://github.com/JBailes) **Base:** `main` ← **Head:** `fix/delete-missing-lxc` --- ### 📝 Commits (1) - [`3f3a849`](https://github.com/games-on-whales/LXC2Docker/commit/3f3a8494f6f8fc8e4329e491512beab9b0b0714e) fix: drop stale records for missing lxc containers ### 📊 Changes **2 files changed** (+51 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `internal/lxc/manager.go` (+18 -2) 📝 `internal/lxc/manager_test.go` (+33 -0) </details> ### 📄 Description ## Summary - treat missing LXC configs as already removed when deleting containers - recognize lxc-destroy's 'Container is not defined' output and remove the stale store record - cover both cleanup paths with unit tests ## Verification - go test ./internal/store - go test ./internal/lxc ./internal/store cannot compile locally because this workstation is missing lxc.pc; CI should cover it. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 12:51:26 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
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
games-on-whales/LXC2Docker#28
No description provided.