Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mv internal/cri/util/deep_copy.go pkg/marshalutil/ #9919

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AkihiroSuda
Copy link
Member

DeepCopy is depended by nerdctl too

https://github.com/search?q=repo%3Acontainerd%2Fnerdctl%20DeepCopy&type=code

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
@dmcgowan
Copy link
Member

dmcgowan commented Mar 4, 2024

Opened containerd/nerdctl#2854 as an alternative solution. I would put it in the category of better to just copy the function.

@AkihiroSuda AkihiroSuda closed this Mar 4, 2024
@mxpv
Copy link
Member

mxpv commented Mar 5, 2024

@AkihiroSuda closed this 1 hour ago

Well, I think that's still a viable change. cri package maintains its own version of "utils" package which I'd want to splice with containerd's pkg/ package, since its now a single codebase.

@AkihiroSuda AkihiroSuda reopened this Mar 5, 2024
@dmcgowan
Copy link
Member

dmcgowan commented Mar 6, 2024

My thought was that we try to keep "util" only packages as internal but we can add useful helper functions in pkg/core packages. Introducing a package with a single function to marshal/unmarshal an object seems against the "A little copying is better than a little dependency" principle that we loosely follow. @mxpv if you have a plan to move some of those internal CRI helpers into a better places, that would be good. I don't think that should be a 2.0 requirement and for these cases breaking client dependency on these little helpers is good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants