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

bugfix: do not append latest to image name having a tag already #1110

Merged
merged 1 commit into from
Apr 12, 2018

Conversation

yyb196
Copy link
Collaborator

@yyb196 yyb196 commented Apr 11, 2018

Ⅰ. Describe what this PR did

when using swarm to pull an image, it post a request with a param named fromImage, which already include a tag, then we shouldn't append a 'latest' to it.

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how you did it

fixes #1109

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@pouchrobot pouchrobot added areas/test kind/bug This is bug report for project size/XS labels Apr 11, 2018
@allencloud
Copy link
Collaborator

Could we add a test case to cover to avoid future change still make the error happen again?

@yyb196
Copy link
Collaborator Author

yyb196 commented Apr 12, 2018

@allencloud yes, I will setup some test case to protect it.

Signed-off-by: Frank Yang <yyb196@gmail.com>
@codecov-io
Copy link

Codecov Report

Merging #1110 into master will decrease coverage by 1.23%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1110      +/-   ##
==========================================
- Coverage   16.67%   15.43%   -1.24%     
==========================================
  Files         165      171       +6     
  Lines        8912     9569     +657     
==========================================
- Hits         1486     1477       -9     
- Misses       7320     7984     +664     
- Partials      106      108       +2
Impacted Files Coverage Δ
apis/server/image_bridge.go 21.53% <100%> (ø)
pkg/kernel/kernel.go 50% <0%> (-22.73%) ⬇️
daemon/mgr/container_utils.go 56.19% <0%> (-1.85%) ⬇️
daemon/mgr/container.go 5% <0%> (-0.01%) ⬇️
client/container.go 0% <0%> (ø) ⬆️
daemon/mgr/spec.go 0% <0%> (ø) ⬆️
daemon/mgr/spec_linux.go 0% <0%> (ø) ⬆️
client/container_create.go
apis/server/server.go 0% <0%> (ø)
apis/server/volume_bridge.go 0% <0%> (ø)
... and 7 more

@yyb196
Copy link
Collaborator Author

yyb196 commented Apr 12, 2018

@allencloud I have added an unit test case to protect this modification, PTAL again.

@allencloud
Copy link
Collaborator

Actually I could not follow the unit test you add. Maybe I need your guidance offline. @yyb196

@allencloud
Copy link
Collaborator

LGTM, this is for swarm part legacy API calling.

@allencloud allencloud merged commit 6a70012 into AliyunContainerService:master Apr 12, 2018
@pouchrobot pouchrobot added the LGTM one maintainer or community participant agrees to merge the pull reuqest. label Apr 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
areas/test kind/bug This is bug report for project LGTM one maintainer or community participant agrees to merge the pull reuqest. size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug]: using swarm api to pull an image failed
4 participants