cleanup: move VolumeRemove to correct code path#1760
Open
lukemarsden wants to merge 3 commits into
Open
Conversation
VolumeRemove("docker-data-{sessionID}") was running on every container
stop, but when CONTAINER_DOCKER_PATH is set (always, in practice), the
docker data uses a bind mount, not a named volume. So VolumeRemove was
always a no-op that logged a spurious warning.
Move it into the else branch (no CONTAINER_DOCKER_PATH) where named
volumes are actually used, and consolidate the comments to make the
two code paths clear.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CONTAINER_DOCKER_PATH is set in every deployment path (docker-compose, install.sh, for-mac provisioning). The named-volume fallback was dead, untested code that would silently do the wrong thing if someone forgot to set it. - Hydra now fatals on startup if CONTAINER_DOCKER_PATH is not set - Removed all conditional guards and named-volume fallback paths - Removed VolumeRemove call (was always a no-op with bind mounts) - Simplified BuildKit state setup (was also conditional, now direct) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…nstant
The docker data volume was identified by matching m.Destination ==
"/var/lib/docker" — a fragile coupling between hydra_executor (creator)
and devcontainer (consumer). If either side changed the path, the other
would silently break.
Now uses DockerDataVolumePrefix ("docker-data-") constant shared by
both sides, matching on the source name prefix instead of the
destination path.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
VolumeRemove("docker-data-{sessionID}")was running on every container stop, butCONTAINER_DOCKER_PATHis always set (dev.env+ production provisioning), so docker data uses bind mounts, not named volumes. TheVolumeRemovewas a no-op logging a spurious warning on every stop.elsebranch (noCONTAINER_DOCKER_PATH) where named volumes would actually be used.Test plan
.last-activemarker🤖 Generated with Claude Code