Repository navigation
fix(tools): compare container mounts in a fixed order in cleanup - #721
Closed
yifanxuaaa wants to merge 1 commit into
Closed
yifanxuaaa wants to merge 1 commit into
yifanxuaaa wants to merge 1 commit into
Conversation
docker container inspect lists a container's Mounts in no fixed order; the same stopped container came back with a different order in about one of six inspects. cleanup_docker.identity compared the list as given, so container retirement failed at random with "Container identity or execution state changed since plan" or "Container changed during recovery capture", leaving the container (and, in the second case, its recovery image) behind. identity() now sorts Mounts by Destination, which is unique within a container; twelve inspects of one container then give one identity. Production LOC: 102,831 -> 102,831 (delta 0) core 38,395 -> 38,395 (0) engine 61,777 -> 61,777 (0) api 2,659 -> 2,659 (0) reference absent (retired R9c; last counted 65,417 at tree 498dd19) Method: tools/production_loc.py --detail; tooling-only change, parent 7d42d0b and the staged tree count the same Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
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.
Problem
docker container inspectlists a container'sMountsin no fixed order. The same stopped container came back in a different order in 1 of 6 inspects.tools/cleanup_docker.pycompared the list as Docker returned it, so retiring a container failed at random, with either of these errors:Fix
identity()now sortsMountsbyDestination, which is unique within a container. Plan, apply and the post-capture check all go throughidentity(), so all three now see the same order.Checks
format --checkandcheck: clean.Production LOC: 102,831 -> 102,831 (delta 0). This changes tooling only.
🤖 Generated with Claude Code