Skip to content

don't apply default pull policy from command line if one is define in service configuration#9720

Merged
glours merged 1 commit intodocker:v2from
glours:respect-pull-policy-build
Aug 5, 2022
Merged

don't apply default pull policy from command line if one is define in service configuration#9720
glours merged 1 commit intodocker:v2from
glours:respect-pull-policy-build

Conversation

@glours
Copy link
Contributor

@glours glours commented Aug 4, 2022

What I did
Don't override service pull policy if the value from the command line is the default one

Related issue
fix #9717

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

@glours glours requested a review from a team August 4, 2022 22:29
@glours glours self-assigned this Aug 4, 2022
@glours glours force-pushed the respect-pull-policy-build branch from fa743a3 to 6401f0d Compare August 4, 2022 22:47
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

Don't think this is the right fix (see my comment)

@glours glours force-pushed the respect-pull-policy-build branch 2 times, most recently from cd63858 to 4bd6c61 Compare August 4, 2022 23:33
@glours glours force-pushed the respect-pull-policy-build branch 2 times, most recently from 478b6ce to 7ac17c3 Compare August 4, 2022 23:43
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM (assuming green)

We should probably have a test for this (as a follow-up?)

@glours glours force-pushed the respect-pull-policy-build branch from 7ac17c3 to 2fe6e4b Compare August 4, 2022 23:48
@thaJeztah
Copy link
Member

Installed Go in 80ms
Requested golangci-lint 'latest', using 'v1.48.0', calculation took 119ms
Installing golangci-lint v1.48.0...
Downloading https://github.com/golangci/golangci-lint/releases/download/v1.48.0/golangci-lint-1.48.0-linux-amd64.tar.gz ...
/usr/bin/tar xz --overwrite --warning=no-unknown-keyword -C /home/runner -f /home/runner/work/_temp/7b3cfb22-e5a6-4959-a3f7-bbd4f340c7e4
Installed golangci-lint into /home/runner/golangci-lint-1.48.0-linux-amd64/golangci-lint in 647ms

Odd failures in CI during linting; I see we're not pinning golang-ci-lint to a version, which may mean it's not compatible with the go version we're using 🤔

@thaJeztah
Copy link
Member

unrelated; looks like CI is using a pretty old version of docker 20.10; https://github.com/docker/compose/blob/v2/.github/workflows/ci.yml#L104

@glours glours force-pushed the respect-pull-policy-build branch from e0929e5 to b79b293 Compare August 5, 2022 08:05
… service configuration

Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
@glours glours force-pushed the respect-pull-policy-build branch from b79b293 to c47079e Compare August 5, 2022 10:01
Copy link
Member

@laurazard laurazard left a comment

Choose a reason for hiding this comment

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

LGTM!

@glours glours merged commit 359133b into docker:v2 Aug 5, 2022
@glours glours deleted the respect-pull-policy-build branch January 11, 2023 14:22
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.

pull_policy: build pulls anyway before building

3 participants