Update GetTagFromNamedRef to return latest…#205
Conversation
| testCases := []struct { | ||
| ref string | ||
| expectedName string | ||
| expectedTag string |
There was a problem hiding this comment.
I'm not sure we should reinforce the concept of a tag being a digest. Maybe call this expectedTagOrDigest.
|
LGTM This may be more subtle in the engine, but I think this works. |
|
@stevvooe It would also be possible to not change anything in the engine, just handle the |
|
@vdemeester I agree. The engine-api needs to focus on user intent, rather than expose the subtleties of the docker api. |
|
So it means change API, and allow to pass all=1 for |
|
@HackToday there is two solution, one with an API change, one without. I think we'll split it into two, one that fixes the behaviour without the API change, and then proposing the API change. |
… in case of no tag in the reference. This also adds some unit test for this package. Signed-off-by: Vincent Demeester <vincent@sbr.pm>
|
Updated to require no Server API changes for now 👼 |
This make the `--all` option more explicit, API wise. Signed-off-by: Vincent Demeester <vincent@sbr.pm>
|
Updated by also modifying push behavior, was causing trouble to add tag latest automatically… 😅. /cc @stevvooe @tonistiigi |
|
LGTM |
1 similar comment
|
LGTM |
… in case of no tag in the reference 🐰.
Right now, if you pass a reference without a tag will send a request without tag to the daemon and thus the daemon will download all tags for this repository.
docker/dockeradds the defaultlatesttag if it has not been and if--allis not defined.I'm not sure this is the right place for it, waiting for your input. This change would break the way
--allworks, and the 2nd commits adds a more explicit way to specify we want to download all tags (putting it in option). If we decide to go this route, I'll do the PR indocker/dockerto update the server side API./cc @stevvooe @calavera @MHBauer
This also adds some unit test for this package 🐙.
🐸
Signed-off-by: Vincent Demeester vincent@sbr.pm