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

Pull image regardless of whether it exists locally if tag=latest #9781

Merged
merged 1 commit into from Aug 23, 2022

Conversation

laurazard
Copy link
Member

@laurazard laurazard commented Aug 23, 2022

... and pull policy is missing or if_not_present

Signed-off-by: Laura Brehm laurabrehm@hey.com

What I did

Note: I also moved the compose pull related tests from compose_test.go to pull_test.go.

Related issue

(not mandatory) A picture of a cute animal, if possible in relation with what you did

NOV25_WATERBEAR_POST01

... and pull policy is `missing` or `if_not_present`

Signed-off-by: Laura Brehm <laurabrehm@hey.com>

assert.Assert(t, strings.Contains(output, "simple Skipped - Image is already present locally"))
// image with :latest tag gets pulled regardless if pull_policy: missing or if_not_present
assert.Assert(t, strings.Contains(output, "latest Pulled"))
Copy link
Member Author

Choose a reason for hiding this comment

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

For ease of review, this was the change in the test, with the preceding comment and the accompanying change in the compose.yaml used for the test

Copy link
Contributor

@milas milas left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@nicksieger nicksieger left a comment

Choose a reason for hiding this comment

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

LGTM

return false
}
_, ok = localImages[serviceImage]
return ok && tagged.Tag() != "latest"
Copy link
Member

Choose a reason for hiding this comment

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

Does ParseDockerRef normalize a missing tag to latest?

Copy link
Member Author

Choose a reason for hiding this comment

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

yup!

@laurazard laurazard merged commit e5eb00f into docker:v2 Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants