From e6ec77047bf50abc34d5f08781bb36f75d424b59 Mon Sep 17 00:00:00 2001 From: Nicolas De Loof Date: Thu, 21 Nov 2019 11:09:49 +0100 Subject: [PATCH] Revert "only pull images that can't build" This reverts commit c6dd7da15eb3d85a1f7634e8ded9fe42c9035669. Signed-off-by: Nicolas De Loof --- compose/project.py | 7 ++----- tests/acceptance/cli_test.py | 7 ------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/compose/project.py b/compose/project.py index 094ce4d7a..d7dcb6bd6 100644 --- a/compose/project.py +++ b/compose/project.py @@ -619,9 +619,6 @@ class Project(object): def pull(self, service_names=None, ignore_pull_failures=False, parallel_pull=False, silent=False, include_deps=False): services = self.get_services(service_names, include_deps) - images_to_build = {service.image_name for service in services if service.can_be_built()} - services_to_pull = [service for service in services if service.image_name not in images_to_build] - msg = not silent and 'Pulling' or None if parallel_pull: @@ -647,7 +644,7 @@ class Project(object): ) _, errors = parallel.parallel_execute( - services_to_pull, + services, pull_service, operator.attrgetter('name'), msg, @@ -660,7 +657,7 @@ class Project(object): raise ProjectError(combined_errors) else: - for service in services_to_pull: + for service in services: service.pull(ignore_pull_failures, silent=silent) def push(self, service_names=None, ignore_push_failures=False): diff --git a/tests/acceptance/cli_test.py b/tests/acceptance/cli_test.py index a03d56567..25f426d5b 100644 --- a/tests/acceptance/cli_test.py +++ b/tests/acceptance/cli_test.py @@ -661,13 +661,6 @@ class CLITestCase(DockerClientTestCase): 'image library/nonexisting-image:latest not found' in result.stderr or 'pull access denied for nonexisting-image' in result.stderr) - def test_pull_with_build(self): - result = self.dispatch(['-f', 'pull-with-build.yml', 'pull']) - - assert 'Pulling simple' not in result.stderr - assert 'Pulling from_simple' not in result.stderr - assert 'Pulling another ...' in result.stderr - def test_pull_with_quiet(self): assert self.dispatch(['pull', '--quiet']).stderr == '' assert self.dispatch(['pull', '--quiet']).stdout == ''