-
Notifications
You must be signed in to change notification settings - Fork 950
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
refactor: eliminate containerMeta in daemon manager #1300
refactor: eliminate containerMeta in daemon manager #1300
Conversation
2a4014b
to
e9426cb
Compare
With this PR, I think api image deletion test fails:
I am wondering if this is related to the reference struct. Could you help to take a look at the failure? @fuweid Thanks a lot. |
Got it @allencloud |
066cbfc
to
7c6363c
Compare
It also reports panic error like:
|
7c6363c
to
17d4408
Compare
Codecov Report
@@ Coverage Diff @@
## master #1300 +/- ##
==========================================
+ Coverage 16.42% 16.46% +0.03%
==========================================
Files 182 182
Lines 11303 11277 -26
==========================================
Hits 1857 1857
+ Misses 9310 9284 -26
Partials 136 136
|
apis/server/container_bridge.go
Outdated
container.NetworkSettings = &types.ContainerNetworkSettings{ | ||
Networks: m.NetworkSettings.Networks, | ||
} | ||
container := types.Container{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
types.Container
and ContainerMgr.Container
may be confused, can we named different to distinct this two containers struct ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated, PTAL @HusterWan
Signed-off-by: Allen Sun <allensun.shl@alibaba-inc.com>
17d4408
to
6920221
Compare
I have reviewed part of pouchd, LGTM . cri part need @YaoZengzeng to review |
Only name changing ( So LGTM. |
Thanks a lot for your review. @HusterWan @YaoZengzeng 🍻 |
Signed-off-by: Allen Sun allensun.shl@alibaba-inc.com
Ⅰ. Describe what this PR did
In the ContainerMgr of original code, we have two structs which describe container instance, one is Container, and the other is ContainerMeta. While we have the following relationship between them:
So, we can find that ContainerMeta has a very similar construction of Container. So we could only make use of Container to eliminate one to make code and data structure much more simplified.
Ⅱ. Does this pull request fix one issue?
none
Ⅲ. Describe how you did it
none
Ⅳ. Describe how to verify it
none
Ⅴ. Special notes for reviews
none