Skip to content

split content service gRPC package#2441

Closed
AkihiroSuda wants to merge 1 commit intocontainerd:masterfrom
AkihiroSuda:expose-cs-grpc
Closed

split content service gRPC package#2441
AkihiroSuda wants to merge 1 commit intocontainerd:masterfrom
AkihiroSuda:expose-cs-grpc

Conversation

@AkihiroSuda
Copy link
Copy Markdown
Member

The package should be useful for 3rd party Go projects.

Signed-off-by: Akihiro Suda [email protected]

@dmcgowan @tonistiigi

@codecov-io
Copy link
Copy Markdown

codecov-io commented Jul 6, 2018

Codecov Report

Merging #2441 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2441   +/-   ##
=======================================
  Coverage   44.73%   44.73%           
=======================================
  Files          93       93           
  Lines        9501     9501           
=======================================
  Hits         4250     4250           
  Misses       4566     4566           
  Partials      685      685
Flag Coverage Δ
#linux 48.94% <ø> (ø) ⬆️
#windows 40.98% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 49fb363...7781025. Read the comment docs.

@dmcgowan
Copy link
Copy Markdown
Member

dmcgowan commented Jul 6, 2018

This also seems useful for #2415

I am not a fan of the package name content/grpc, maybe content/api, content/apiservice or something. Just doesn't seem consistent since we have the api package at the top, not the grpc package.

@AkihiroSuda
Copy link
Copy Markdown
Member Author

renamed to content/api

@AkihiroSuda
Copy link
Copy Markdown
Member Author

@dmcgowan PTAL?

Comment thread content/api/api.go Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add some documentation here to make it clear what this package is for?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean we should provide some usecases?

My usecase is to allow buildkitd to send caches to buildctl via the content API over BuildKit session API, but I'm not sure I should mention my usecase here.

The package should be useful for 3rd party Go projects.

Signed-off-by: Akihiro Suda <[email protected]>
@AkihiroSuda
Copy link
Copy Markdown
Member Author

ping @stevvooe

@stevvooe
Copy link
Copy Markdown
Member

Why are we moving this? The only thing left in the service package is a module registration, which doesn't make a lot of sense.

Can we move the registration elsewhere, if that is the problem?

@AkihiroSuda
Copy link
Copy Markdown
Member Author

Can we move the registration elsewhere

It will break existing package consumers such as https://github.com/containerd/cri/blob/master/cmd/containerd/containerd.go then, although probably acceptable

cc @Random-Liu

@AkihiroSuda
Copy link
Copy Markdown
Member Author

Can we move this forward?

@crosbymichael
Copy link
Copy Markdown
Member

Why not just export newService ?

@crosbymichael
Copy link
Copy Markdown
Member

These are core services to containerd. containerd is the no. 1 consumer and user of the internal packages. Others can adapt, we shouldn't have to splitup our codebase or compromise on design because something can be used by 3rd parties. containerd comes first when it comes to packages in this repo. The registration is not that big of a deal and does not break anyone else.

crosbymichael added a commit to crosbymichael/containerd that referenced this pull request Aug 21, 2018
Closes containerd#2441

Signed-off-by: Michael Crosby <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants