volumes/local: remove legacy migration code, and some cleanups#43591
Merged
cpuguy83 merged 4 commits intomoby:masterfrom May 13, 2022
Merged
volumes/local: remove legacy migration code, and some cleanups#43591cpuguy83 merged 4 commits intomoby:masterfrom
cpuguy83 merged 4 commits intomoby:masterfrom
Conversation
This was added in bd9814f to support downgrading docker 1.7 to 1.6. The related migration code was removed in 0023abb (Docker 18.05), which was also the last consumer of VolumeDataPathName outside of the package, so that const can be un-exported. Signed-off-by: Sebastiaan van Stijn <[email protected]>
Now that there's no differentiation between Linux and Windows for this check, we can remove the two implementations and move the code inline as it's only used in a single location and moving it inline makes it more transparent on what's being checked. As part of this change, the now unused "scope" field is also removed. Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
FileInfo.Name() returns the base name, so no need to remove path information. Signed-off-by: Sebastiaan van Stijn <[email protected]>
tianon
approved these changes
May 13, 2022
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.
This is part of a branch that I had locally (and recalled I had after Today's maintainers meeting)
More to come, including some (potential) bugs on Windows
volume/local: remove hack for downgrading docker 1.7 to 1.6
This was added in bd9814f (#13699) to support downgrading
docker 1.7 to 1.6.
The related migration code was removed in 0023abb (#36637)
(Docker 18.05), which was also the last consumer of VolumeDataPathName outside
of the package, so that const can be un-exported.
volume/local: remove redundant Root.scopedPath(), Root.scope
Now that there's no differentiation between Linux and Windows
for this check, we can remove the two implementations and move
the code inline as it's only used in a single location and moving
it inline makes it more transparent on what's being checked.
As part of this change, the now unused "scope" field is also removed.
volume/local.New(): remove some intermediate variables
volume/local.New(): remove redundant filepath.Base()
FileInfo.Name() returns the base name, so no need to remove path information.
- A picture of a cute animal (not mandatory but encouraged)