content/local: inline sys.StatATimeAsTime()#5633
Merged
estesp merged 1 commit intocontainerd:mainfrom Jun 22, 2021
Merged
Conversation
The sys.StatATimeAsTime() utility is currently only used in a single place, but because it's living in the "sys" package, also brings in other dependencies, such as Microsoft/hcsshim. This patch inlines the code from sys.StatATimeAsTime(), to remove that dependency. Signed-off-by: Sebastiaan van Stijn <[email protected]>
Member
Author
|
@AkihiroSuda @samuelkarp @estesp PTAL I'd like to cherry-pick this into the 1.5 release branch, as it's a minor refactor and (see docker/cli#3154) makes a big difference on the dependency-tree in our CLI (assuming we want to stick to consuming the releases / release-branches of containerd in the code there) |
|
Build succeeded.
|
AkihiroSuda
approved these changes
Jun 22, 2021
Member
Author
|
opened #5634 as draft |
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.
relates to docker/cli#3154
The sys.StatATimeAsTime() utility is currently only used in a single place, but because it's living in the "sys" package, also brings in other dependencies, such as Microsoft/hcsshim.
This patch inlines the code from sys.StatATimeAsTime(), to remove that dependency.
We can consider removing the utilities in
sysin favor of their copy in containerd/continuity;containerd/sys/stat_unix.go
Lines 26 to 44 in b12c321
https://github.com/containerd/continuity/blob/33a84563724b68f70fc71fbb632cf9e0ad60ba5d/fs/stat_linuxopenbsd.go#L26-L45
(I'll have a look at that in a follow-up)