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: pouch copy in client and daemon side #2182
Conversation
@@ -0,0 +1,30 @@ | |||
package types |
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.
We do not manually edit this file, but generate it by swagger, you could see the reference: https://github.com/alibaba/pouch/blob/master/apis/README.md
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.
ok
cli/cp.go
Outdated
"strings" | ||
"path/filepath" | ||
|
||
"github.com/spf13/cobra" |
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.
We should improve the import sequence by https://github.com/alibaba/pouch/blob/master/docs/contributions/code_styles.md#rule003---import-packages
And please keep this in mind in imports of all this pull request.
daemon/mgr/container.go
Outdated
// We need to rebase the archive entries if the last element of the | ||
// resolved path was a symlink that was evaluated and is now different | ||
// than the requested path. For example, if the given path was "/foo/bar/", | ||
// but it resolved to "/var/lib/docker/containers/{id}/foo/baz/", we want |
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 do not think the details here are proper.
apis/server/container_bridge.go
Outdated
@@ -19,6 +19,9 @@ import ( | |||
"github.com/gorilla/mux" | |||
"github.com/pkg/errors" | |||
"github.com/sirupsen/logrus" | |||
"encoding/base64" |
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.
import sequence.
client/container_copy.go
Outdated
return getContainerPathStatFromHeader(response.Header) | ||
} | ||
|
||
func ensureReaderClosed(response *Response) { |
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.
This function is redudant with https://github.com/alibaba/pouch/blob/master/client/utils.go#L18.
Maybe we can re-use that.
pkg/httputils/http_utils.go
Outdated
@@ -5,6 +5,7 @@ import ( | |||
"strings" | |||
) | |||
|
|||
|
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.
Please remove this blank line.
I only add some initial comment. For this valuable part, I think we need to spend more time and patience to make this move on. @knightXun |
Any update on this? @knightXun |
2bfa6b1
to
fa32481
Compare
Codecov Report
@@ Coverage Diff @@
## master #2182 +/- ##
==========================================
- Coverage 66.5% 66.12% -0.38%
==========================================
Files 208 208
Lines 16755 16985 +230
==========================================
+ Hits 11143 11232 +89
- Misses 4282 4403 +121
- Partials 1330 1350 +20
|
now working on e2e test |
a726b1b
to
b1fe729
Compare
ping @allencloud |
I am afraid that we need to add more details in swagger.yml to define the API side. For adding new APIs, we should add definition in swagger.yml, like https://github.com/alibaba/pouch/blob/master/apis/README.md . So please help to add that as well. I think we are almost there. Keep going. Thanks a lot. @knightXun |
I will split this pr into 4 or 5 parts. |
ping @knightXun |
thanks @knightXun . And I close it and looking forward to the new PR :) |
Ⅰ. Describe what this PR did
Ⅱ. 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