volumes/local: remove legacy migration code, and some cleanups #43591
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)