Question
Orphaned docker volumes whose workspace is already gone: reclaim them, or write down why not?
Since devlaunch#325 a delete removes the named volumes its devcontainer created, and the names come from devpod's own record of what it substituted, never guessed from a pattern. That closed the leak going forward. It leaves a population behind: 39 orphaned volumes holding 37.28 GB measured on one machine (devlaunch#324), plus anything a bare devpod delete outside dl strands from here on.
The bind: an orphan has no surviving record, because the record died with the workspace. So the one mechanism the codebase trusts is unavailable exactly where the bytes are, and the alternative is matching <basename>-pixi and dind-var-lib-docker-<id> patterns against docker volume ls, which is the guessing the existing design refuses on the grounds that a made-up name is somebody else's disk. Principle 1 is on the side of that refusal; principle 2 wants the 37 GB.
Three candidate answers, and the third is the one worth thinking hardest about:
- Leave them, and say so in
docs/cleanup.md with the measurement, so the bytes are documented rather than silent. Cheapest, and principle 1's default.
- Reclaim from the pattern behind an explicit flag, reporting every name before removing it. Principle 1 permits an explicit human answer; the question is whether a pattern is ever a good enough basis to offer, given
dind-var-lib-docker-<devcontainerId> could plausibly belong to a devcontainer devlaunch never opened.
- Write our own record at create time, so the orphans of the future are reclaimable by reading rather than guessing, and the existing 39 stay case 1. This is the only option that gets principle 2 without weakening principle 1, at the cost of new state devlaunch has to keep correct. Weigh what happens when that record and reality disagree, since a record that can be wrong is a guess with better manners.
Note a volume is unlike an image: deleting one that still matters is data loss, not a rebuild.
How the answer gets tested: whichever way it goes, a test asserts no docker volume rm is issued for a name that came from anywhere other than the sanctioned source, and the docs guard covers the new paragraph.
Question
Orphaned docker volumes whose workspace is already gone: reclaim them, or write down why not?
Since devlaunch#325 a delete removes the named volumes its devcontainer created, and the names come from devpod's own record of what it substituted, never guessed from a pattern. That closed the leak going forward. It leaves a population behind: 39 orphaned volumes holding 37.28 GB measured on one machine (devlaunch#324), plus anything a bare
devpod deleteoutsidedlstrands from here on.The bind: an orphan has no surviving record, because the record died with the workspace. So the one mechanism the codebase trusts is unavailable exactly where the bytes are, and the alternative is matching
<basename>-pixianddind-var-lib-docker-<id>patterns againstdocker volume ls, which is the guessing the existing design refuses on the grounds that a made-up name is somebody else's disk. Principle 1 is on the side of that refusal; principle 2 wants the 37 GB.Three candidate answers, and the third is the one worth thinking hardest about:
docs/cleanup.mdwith the measurement, so the bytes are documented rather than silent. Cheapest, and principle 1's default.dind-var-lib-docker-<devcontainerId>could plausibly belong to a devcontainer devlaunch never opened.Note a volume is unlike an image: deleting one that still matters is data loss, not a rebuild.
How the answer gets tested: whichever way it goes, a test asserts no
docker volume rmis issued for a name that came from anywhere other than the sanctioned source, and the docs guard covers the new paragraph.