-
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
feature: add exec resize router #2105
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2105 +/- ##
==========================================
+ Coverage 60.47% 65.12% +4.64%
==========================================
Files 208 208
Lines 16411 16427 +16
==========================================
+ Hits 9925 10698 +773
+ Misses 5296 4402 -894
- Partials 1190 1327 +137
|
apis/swagger.yml
Outdated
description: "bad parameter" | ||
schema: | ||
$ref: "#/definitions/Error" | ||
500: |
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.
I think here we have a 404 status code since errors.Wrap(errtypes.ErrNotfound, "exec process "+execid)
:
// GetExecConfig returns execonfig of a exec process inside container.
func (mgr *ContainerManager) GetExecConfig(ctx context.Context, execid string) (*ContainerExecConfig, error) {
v, ok := mgr.ExecProcesses.Get(execid).Result()
if !ok {
return nil, errors.Wrap(errtypes.ErrNotfound, "exec process "+execid)
}
execConfig, ok := v.(*ContainerExecConfig)
if !ok {
return nil, fmt.Errorf("invalid exec config type")
}
return execConfig, nil
}
@@ -37,15 +38,29 @@ type HistoryResultItem struct { | |||
// Required: true | |||
EmptyLayer bool `json:"EmptyLayer"` | |||
|
|||
// ID of every layer image. |
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.
using different type swagger here? 🤔
Signed-off-by: Michael Wan <zirenwan@gmail.com>
Any Advice? @allencloud @fuweid 😆 |
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 but @HusterWan we need test case in the following PR.
@fuweid Yes Sir ! |
Signed-off-by: Michael Wan zirenwan@gmail.com
Ⅰ. Describe what this PR did
add exec resize router, this api is used by k8s exec
Ⅱ. 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