Skip to content

Fix #22240 do not pull all the tags implicitely#22247

Merged
LK4D4 merged 2 commits into
moby:masterfrom
vdemeester:22240-implicit-pull
May 2, 2016
Merged

Fix #22240 do not pull all the tags implicitely#22247
LK4D4 merged 2 commits into
moby:masterfrom
vdemeester:22240-implicit-pull

Conversation

@vdemeester

@vdemeester vdemeester commented Apr 22, 2016

Copy link
Copy Markdown
Member

This fixes #22240 (docker run -it busybox /bin/sh will, on master, pull any tag if busybox:latest was not present) in a weird and quick way. I would really prefer the fix in docker-archive-public/docker.engine-api#205 (in one of the option) — it is now cleaner and uses engine-api.

Depends on docker-archive-public/docker.engine-api#205 👼

/cc @stevvooe @calavera @tonistiigi

Signed-off-by: Vincent Demeester vincent@sbr.pm

@vdemeester

Copy link
Copy Markdown
Member Author

Updated and build fixed (only vendor is red but that's expected before the related engine-api PR is merged).

ping @tonistiigi @stevvooe

@vdemeester vdemeester force-pushed the 22240-implicit-pull branch from dec8e54 to c96c9b4 Compare April 26, 2016 17:01

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be called IsTrusted. This field has no bearing on the trust state of an image. Not sure if we need a PR in engine-api to handle this.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum, it's already in engine-api, and I guess it's for golint, is the attribute is named IsTrusted 👼

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be fixed. These images are not trusted; they are official.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the comment for the IsTrusted flag, not IsOfficial. The comment referenced the incorrect variable.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC IsTrusted was only there for backward compatibility, as it was the old name for official images on Docker Hub; can we officially deprecate and remove it?

@stevvooe stevvooe Apr 28, 2016

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aaronlehmann This was IsTrusted, which changed to IsOfficial in the code, but had to stay is_trusted on the wire. I am not sure about the deprecation status, but let's do so.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow. Then it definitely is misleading. I thought this referred to content trust. You're right that it needs to be changed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I'm wrong: https://docs.docker.com/engine/reference/api/docker_remote_api_v1.19/.

"This API returns both is_trusted and is_automated images. Currently, they are considered identical. In the future, the is_trusted property will be deprecated and replaced by the is_automated property."

Seems to have been deprecated between 1.19 and 1.20. I propose we remove this from engine-api.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed #215

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stevvooe thanks 😉

@tonistiigi

Copy link
Copy Markdown
Member

We should add a test for it so we don't break it in the future.

@vdemeester

Copy link
Copy Markdown
Member Author

@tonistiigi yes, I'll work on that next few days 👼

@vdemeester vdemeester mentioned this pull request Apr 30, 2016
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
@vdemeester

vdemeester commented Apr 30, 2016

Copy link
Copy Markdown
Member Author

@tonistiigi from looking at https://github.com/docker/docker/blob/master/integration-cli/docker_cli_pull_test.go#L17 TestPullFromCentralRegistry should already cover this case, this sounds strang it didn't.. Nevermind, it's on pull, not on run..

@vdemeester vdemeester force-pushed the 22240-implicit-pull branch from c96c9b4 to 0134fd8 Compare April 30, 2016 19:04
@vdemeester

Copy link
Copy Markdown
Member Author

@tonistiigi Added a regression test ; it fails on master, and succeed locally.

Comment thread integration-cli/docker_cli_pull_test.go Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think this can be removed?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Damn you're right 😅

@thaJeztah

Copy link
Copy Markdown
Member

LGTM, thanks!

ping @aaronlehmann @tonistiigi PTAL

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
@vdemeester vdemeester force-pushed the 22240-implicit-pull branch from 0134fd8 to 54ebe42 Compare May 1, 2016 12:46
@thaJeztah

Copy link
Copy Markdown
Member

and ping @cpuguy83 as this is blocking your PR 😇


// ImagePullOptions holds information to pull images.
type ImagePullOptions struct {
All bool

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would benefit from an explanatory comment.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aaronlehmann true. I'll add a comment on this next PR I do on engine-api 😉. It should get in docker/docker before next release but we shouldn't block this PR for it 👼

@aaronlehmann

Copy link
Copy Markdown

LGTM

1 similar comment
@cpuguy83

cpuguy83 commented May 2, 2016

Copy link
Copy Markdown
Member

LGTM

@tonistiigi

Copy link
Copy Markdown
Member

LGTM

@LK4D4 LK4D4 merged commit 7bb23f7 into moby:master May 2, 2016
@vdemeester vdemeester deleted the 22240-implicit-pull branch May 2, 2016 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implicit pull on run broken on master

8 participants