-
Notifications
You must be signed in to change notification settings - Fork 944
refactor: modify the definition of ContainerPlugin interface #2316
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: modify the definition of ContainerPlugin interface #2316
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2316 +/- ##
==========================================
+ Coverage 67.2% 67.38% +0.17%
==========================================
Files 213 213
Lines 17511 17510 -1
==========================================
+ Hits 11769 11799 +30
+ Misses 4341 4319 -22
+ Partials 1401 1392 -9
|
| // PreCreate defines plugin point where receives a container create request, in this plugin point user | ||
| // could change the container create body passed-in by http request body | ||
| PreCreate(io.ReadCloser) (io.ReadCloser, error) | ||
| PreCreate(*types.ContainerCreateConfig) error |
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.
Interface signature and return value are all different from origin, some files missing?
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.
@xiaoxubeii You are right...
Signed-off-by: zhuangqh <[email protected]>
cda39d5 to
aa4ef5a
Compare
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.
LGTM
Signed-off-by: zhuangqh [email protected]
Signed-off-by: Wei Fu [email protected]
Ⅰ. Describe what this PR did
modify the definition of ContainerPlugin interface: PreCreate
Type
*types.ContainerCreateConfigwould be more generic, whileio.ReadCloserread only stream data.The CRI need to support the rich-mode container so that the create_hook_plugin should be handled in container_mgr.
Ⅱ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)
redesign the interface
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews