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

refactor: abstract common api client #740

Merged
merged 1 commit into from
Feb 23, 2018
Merged

refactor: abstract common api client #740

merged 1 commit into from
Feb 23, 2018

Conversation

Ace-Tang
Copy link
Contributor

Signed-off-by: Ace-Tang aceapril@126.com

Ⅰ. Describe what this PR did

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how you did it

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@allencloud
Copy link
Collaborator

CI fails

# github.com/alibaba/pouch/test/request
request/request.go:118:2: cannot use client.CommonAPIClient as type *client.APIClient in return argument: need type assertion
make: *** [test] Error 2

And could you tell us more about the reason why you did this? @Ace-Tang

@Ace-Tang
Copy link
Contributor Author

I did this pr for two reason.

  1. In package client , someone has abstracted container and image api client as ContainerAPIClient and ImageAPIClient
  2. I thought that abstract these api client as a common interface is a good idead, so I did this.

WDYT, @allencloud , the pr is not necessary.

@allencloud
Copy link
Collaborator

To be honest, I would definitely say that this PR is very important for the project. Although it brings less effect compared to the original one, consistency and reader-friendly is very important for an open source project. I must 👍 for your idea. @Ace-Tang

Signed-off-by: Ace-Tang <aceapril@126.com>
@codecov-io
Copy link

Codecov Report

Merging #740 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #740   +/-   ##
=======================================
  Coverage   13.43%   13.43%           
=======================================
  Files          99       99           
  Lines        5992     5992           
=======================================
  Hits          805      805           
  Misses       5133     5133           
  Partials       54       54
Impacted Files Coverage Δ
client/container.go 0% <ø> (ø) ⬆️
cli/cli.go 0% <ø> (ø) ⬆️
client/image.go 0% <ø> (ø) ⬆️
client/client.go 80% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c31211f...9f3c119. Read the comment docs.

@allencloud
Copy link
Collaborator

LGTM, thanks a lot for the work. @Ace-Tang

@pouchrobot pouchrobot added the LGTM one maintainer or community participant agrees to merge the pull reuqest. label Feb 23, 2018
@allencloud allencloud merged commit b41c5f0 into AliyunContainerService:master Feb 23, 2018
@Ace-Tang Ace-Tang deleted the client_backend branch February 26, 2018 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/refactor LGTM one maintainer or community participant agrees to merge the pull reuqest. size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants