Ver Fonte

Revert "only pull images that can't build"

This reverts commit c6dd7da15eb3d85a1f7634e8ded9fe42c9035669.

Signed-off-by: Nicolas De Loof <[email protected]>
Nicolas De Loof há 6 anos atrás
pai
commit
e6ec77047b
2 ficheiros alterados com 2 adições e 12 exclusões
  1. 2 5
      compose/project.py
  2. 0 7
      tests/acceptance/cli_test.py

+ 2 - 5
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):

+ 0 - 7
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 == ''