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

feature: add Mountpoints in containers/json api #2816

Merged

Conversation

HusterWan
Copy link
Contributor

Signed-off-by: Michael Wan zirenwan@gmail.com

Ⅰ. Describe what this PR did

add MountPoint in container body in api containers/json

Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

Signed-off-by: Michael Wan <zirenwan@gmail.com>
@codecov
Copy link

codecov bot commented Apr 29, 2019

Codecov Report

Merging #2816 into master will decrease coverage by 0.01%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2816      +/-   ##
==========================================
- Coverage   69.34%   69.32%   -0.02%     
==========================================
  Files         278      278              
  Lines       17428    17432       +4     
==========================================
  Hits        12085    12085              
- Misses       3994     3996       +2     
- Partials     1349     1351       +2
Flag Coverage Δ
#criv1alpha2_test 39.22% <0%> (-0.01%) ⬇️
#integration_test_0 36.51% <0%> (-0.05%) ⬇️
#integration_test_1 35.3% <0%> (-0.04%) ⬇️
#integration_test_2 36.53% <50%> (-0.02%) ⬇️
#integration_test_3 35.4% <50%> (+0.02%) ⬆️
#node_e2e_test 34.97% <0%> (-0.02%) ⬇️
#unittest 28.77% <0%> (-0.01%) ⬇️
Impacted Files Coverage Δ
apis/server/container_bridge.go 90% <50%> (-0.45%) ⬇️
apis/server/utils.go 71.15% <0%> (-3.85%) ⬇️
daemon/logger/jsonfile/utils.go 71.54% <0%> (-1.63%) ⬇️
ctrd/client.go 69.72% <0%> (-1.63%) ⬇️
pkg/meta/store.go 67.44% <0%> (-1.56%) ⬇️
daemon/mgr/container_utils.go 82.38% <0%> (-1.14%) ⬇️
ctrd/container.go 53.88% <0%> (-0.38%) ⬇️
cri/v1alpha2/cri.go 71.22% <0%> (+0.63%) ⬆️
cri/ocicni/cni_manager.go 70.58% <0%> (+11.76%) ⬆️

@@ -173,6 +178,7 @@ func (s *Server) getContainers(ctx context.Context, rw http.ResponseWriter, req
Labels: c.Config.Labels,
HostConfig: c.HostConfig,
NetworkSettings: netSettings,
Mounts: mounts,
Copy link
Collaborator

@allencloud allencloud May 2, 2019

Choose a reason for hiding this comment

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

FWIW,in terms of compatibility, I compared pouchcontainer's returns struct and

moby's(https://github.com/moby/moby/blob/master/api/swagger.yaml#L3434-L3501), and found that we still miss:

Ports
State
SizeRw
SizeRootfs

Will all these missing fields affect your usecases? @wangforthinker @zjumoon01

Copy link
Contributor

Choose a reason for hiding this comment

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

There are no effect at the moment. But it is better to add missing filed in returns struct. @allencloud

@allencloud
Copy link
Collaborator

LGTM

@pouchrobot pouchrobot added the LGTM one maintainer or community participant agrees to merge the pull reuqest. label May 7, 2019
@allencloud allencloud merged commit 4682150 into AliyunContainerService:master May 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature LGTM one maintainer or community participant agrees to merge the pull reuqest. size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants