Hello community,
here is the log from the commit of package python-docker-compose for
openSUSE:Factory checked in at 2020-01-09 22:53:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-docker-compose (Old)
and /work/SRC/openSUSE:Factory/.python-docker-compose.new.6675 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-docker-compose"
Thu Jan 9 22:53:51 2020 rev:6 rq:762517 version:1.25.1
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-docker-compose/python-docker-compose.changes
2019-12-13 12:05:11.261383731 +0100
+++
/work/SRC/openSUSE:Factory/.python-docker-compose.new.6675/python-docker-compose.changes
2020-01-09 22:54:30.198826653 +0100
@@ -1,0 +2,17 @@
+Thu Jan 9 18:28:21 UTC 2020 - Todd R <[email protected]>
+
+- Update to 1.25.1
+ + Features
+ * Bump `pytest-cov` 2.8.1
+ * Bump `flake8` 3.7.9
+ * Bump `coverage` 4.5.4
+ + Bugfixes
+ * Decode APIError explanation to unicode before usage on start and create
of a container
+ * Reports when images that cannot be pulled and must be built
+ * Discard label `com.docker.compose.filepaths` having None as value.
Typically, when coming from stdin
+ * Added OSX binary as a directory to solve slow start up time caused by
MacOS Catalina binary scan
+ * Passed in HOME env-var in container mode (running with
`script/run/run.sh`)
+ * Reverted behavior of "only pull images that we can't build" and replace
by a warning informing the image we can't pull and must be built
+- Drop python2 subpackage due to dropping backports packages.
+
+-------------------------------------------------------------------
Old:
----
docker-compose-1.25.0.tar.gz
New:
----
docker-compose-1.25.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-docker-compose.spec ++++++
--- /var/tmp/diff_new_pack.1dvkyO/_old 2020-01-09 22:54:32.398827754 +0100
+++ /var/tmp/diff_new_pack.1dvkyO/_new 2020-01-09 22:54:32.402827756 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-docker-compose
#
-# Copyright (c) 2019 SUSE LLC
+# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,9 +17,9 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
-%define mod_name compose
+%define skip_python2 1
Name: python-docker-compose
-Version: 1.25.0
+Version: 1.25.1
Release: 0
Summary: Tool to define and run complex applications using Docker
License: Apache-2.0
@@ -40,12 +40,6 @@
BuildRequires: %{python_module websocket-client >= 0.32.0}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
-BuildRequires: python2-backports.shutil_get_terminal_size >= 1.0.0
-BuildRequires: python2-backports.ssl_match_hostname >= 3.5
-BuildRequires: python2-enum34 >= 1.0.4
-BuildRequires: python2-ipaddress >= 1.0.16
-BuildRequires: python2-mock >= 1.0.1
-BuildRequires: python2-subprocess32 >= 3.5.4
Requires: docker
Requires: python-PySocks >= 1.5.6
Requires: python-PyYAML >= 3.10
@@ -63,18 +57,8 @@
Requires: python-urllib3 >= 1.21.1
Requires: python-websocket-client >= 0.32.0
BuildArch: noarch
-# This is py3 only as we have the binary just there
-%ifpython3
Provides: docker-compose = %{version}
Obsoletes: docker-compose < %{version}
-%endif
-%ifpython2
-Requires: python-backports.shutil_get_terminal_size >= 1.0.0
-Requires: python-backports.ssl_match_hostname >= 3.5
-Requires: python-enum34 >= 1.0.4
-Requires: python-ipaddress >= 1.0.16
-Requires: python-subprocess32 >= 3.5.4
-%endif
%python_subpackages
%description
++++++ docker-compose-1.25.0.tar.gz -> docker-compose-1.25.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/docker-compose-1.25.0/CHANGELOG.md
new/docker-compose-1.25.1/CHANGELOG.md
--- old/docker-compose-1.25.0/CHANGELOG.md 2019-11-18 19:35:13.000000000
+0100
+++ new/docker-compose-1.25.1/CHANGELOG.md 2020-01-06 17:41:10.000000000
+0100
@@ -1,6 +1,32 @@
Change log
==========
+1.25.1 (2020-01-06)
+-------------------
+
+### Features
+
+- Bump `pytest-cov` 2.8.1
+
+- Bump `flake8` 3.7.9
+
+- Bump `coverage` 4.5.4
+
+### Bugfixes
+
+- Decode APIError explanation to unicode before usage on start and create of a
container
+
+- Reports when images that cannot be pulled and must be built
+
+- Discard label `com.docker.compose.filepaths` having None as value.
Typically, when coming from stdin
+
+- Added OSX binary as a directory to solve slow start up time caused by MacOS
Catalina binary scan
+
+- Passed in HOME env-var in container mode (running with `script/run/run.sh`)
+
+- Reverted behavior of "only pull images that we can't build" and replace by a
warning informing the image we can't pull and must be built
+
+
1.25.0 (2019-11-18)
-------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/docker-compose-1.25.0/CHANGES.md
new/docker-compose-1.25.1/CHANGES.md
--- old/docker-compose-1.25.0/CHANGES.md 2019-11-18 19:35:13.000000000
+0100
+++ new/docker-compose-1.25.1/CHANGES.md 2020-01-06 17:41:10.000000000
+0100
@@ -1,6 +1,32 @@
Change log
==========
+1.25.1 (2020-01-06)
+-------------------
+
+### Features
+
+- Bump `pytest-cov` 2.8.1
+
+- Bump `flake8` 3.7.9
+
+- Bump `coverage` 4.5.4
+
+### Bugfixes
+
+- Decode APIError explanation to unicode before usage on start and create of a
container
+
+- Reports when images that cannot be pulled and must be built
+
+- Discard label `com.docker.compose.filepaths` having None as value.
Typically, when coming from stdin
+
+- Added OSX binary as a directory to solve slow start up time caused by MacOS
Catalina binary scan
+
+- Passed in HOME env-var in container mode (running with `script/run/run.sh`)
+
+- Reverted behavior of "only pull images that we can't build" and replace by a
warning informing the image we can't pull and must be built
+
+
1.25.0 (2019-11-18)
-------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/docker-compose-1.25.0/PKG-INFO
new/docker-compose-1.25.1/PKG-INFO
--- old/docker-compose-1.25.0/PKG-INFO 2019-11-18 22:56:23.000000000 +0100
+++ new/docker-compose-1.25.1/PKG-INFO 2020-01-07 10:48:11.525147200 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: docker-compose
-Version: 1.25.0
+Version: 1.25.1
Summary: Multi-container orchestration for Docker
Home-page: https://www.docker.com/
Author: Docker, Inc.
@@ -13,6 +13,8 @@
==============

+ ## :exclamation: The docker-compose project announces that as Python 2
reaches it's EOL, versions 1.25.x will be the last to support it. For more
information, please refer to this
[issue](https://github.com/docker/compose/issues/6890).
+
Compose is a tool for defining and running multi-container Docker
applications.
With Compose, you use a Compose file to configure your application's
services.
Then, using a single command, you create and start all the services
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/docker-compose-1.25.0/README.md
new/docker-compose-1.25.1/README.md
--- old/docker-compose-1.25.0/README.md 2019-11-18 17:45:45.000000000 +0100
+++ new/docker-compose-1.25.1/README.md 2020-01-03 16:00:32.000000000 +0100
@@ -2,6 +2,8 @@
==============

+## :exclamation: The docker-compose project announces that as Python 2 reaches
it's EOL, versions 1.25.x will be the last to support it. For more information,
please refer to this [issue](https://github.com/docker/compose/issues/6890).
+
Compose is a tool for defining and running multi-container Docker applications.
With Compose, you use a Compose file to configure your application's services.
Then, using a single command, you create and start all the services
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/docker-compose-1.25.0/compose/GITSHA
new/docker-compose-1.25.1/compose/GITSHA
--- old/docker-compose-1.25.0/compose/GITSHA 2019-11-18 22:55:15.000000000
+0100
+++ new/docker-compose-1.25.1/compose/GITSHA 2020-01-06 18:55:51.000000000
+0100
@@ -1 +1 @@
-b42d419
\ No newline at end of file
+a82fef0
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/docker-compose-1.25.0/compose/__init__.py
new/docker-compose-1.25.1/compose/__init__.py
--- old/docker-compose-1.25.0/compose/__init__.py 2019-11-18
22:46:43.000000000 +0100
+++ new/docker-compose-1.25.1/compose/__init__.py 2020-01-06
18:17:08.000000000 +0100
@@ -1,4 +1,4 @@
from __future__ import absolute_import
from __future__ import unicode_literals
-__version__ = '1.25.0'
+__version__ = '1.25.1'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/docker-compose-1.25.0/compose/cli/command.py
new/docker-compose-1.25.1/compose/cli/command.py
--- old/docker-compose-1.25.0/compose/cli/command.py 2019-11-05
15:29:48.000000000 +0100
+++ new/docker-compose-1.25.1/compose/cli/command.py 2020-01-03
16:00:32.000000000 +0100
@@ -159,15 +159,25 @@
def execution_context_labels(config_details, environment_file):
extra_labels = [
- '{0}={1}'.format(LABEL_WORKING_DIR,
os.path.abspath(config_details.working_dir)),
- '{0}={1}'.format(LABEL_CONFIG_FILES,
config_files_label(config_details)),
+ '{0}={1}'.format(LABEL_WORKING_DIR,
os.path.abspath(config_details.working_dir))
]
+
+ if not use_config_from_stdin(config_details):
+ extra_labels.append('{0}={1}'.format(LABEL_CONFIG_FILES,
config_files_label(config_details)))
+
if environment_file is not None:
extra_labels.append('{0}={1}'.format(LABEL_ENVIRONMENT_FILE,
os.path.normpath(environment_file)))
return extra_labels
+def use_config_from_stdin(config_details):
+ for c in config_details.config_files:
+ if not c.filename:
+ return True
+ return False
+
+
def config_files_label(config_details):
return ",".join(
map(str, (os.path.normpath(c.filename) for c in
config_details.config_files)))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/docker-compose-1.25.0/compose/progress_stream.py
new/docker-compose-1.25.1/compose/progress_stream.py
--- old/docker-compose-1.25.0/compose/progress_stream.py 2019-09-04
18:33:54.000000000 +0200
+++ new/docker-compose-1.25.1/compose/progress_stream.py 2020-01-03
16:00:32.000000000 +0100
@@ -114,3 +114,13 @@
if digest:
return digest
return None
+
+
+def read_status(event):
+ status = event['status'].lower()
+ if 'progressDetail' in event:
+ detail = event['progressDetail']
+ if 'current' in detail and 'total' in detail:
+ percentage = float(detail['current']) / float(detail['total'])
+ status = '{} ({:.1%})'.format(status, percentage)
+ return status
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/docker-compose-1.25.0/compose/project.py
new/docker-compose-1.25.1/compose/project.py
--- old/docker-compose-1.25.0/compose/project.py 2019-11-05
15:29:48.000000000 +0100
+++ new/docker-compose-1.25.1/compose/project.py 2020-01-03
16:00:32.000000000 +0100
@@ -11,6 +11,8 @@
import enum
import six
from docker.errors import APIError
+from docker.errors import ImageNotFound
+from docker.errors import NotFound
from docker.utils import version_lt
from . import parallel
@@ -25,6 +27,7 @@
from .network import build_networks
from .network import get_networks
from .network import ProjectNetworks
+from .progress_stream import read_status
from .service import BuildAction
from .service import ContainerNetworkMode
from .service import ContainerPidMode
@@ -619,49 +622,68 @@
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:
- def pull_service(service):
- strm = service.pull(ignore_pull_failures, True, stream=True)
- if strm is None: # Attempting to pull service with no `image`
key is a no-op
- return
+ self.parallel_pull(services, silent=silent)
- writer = parallel.get_stream_writer()
+ else:
+ must_build = []
+ for service in services:
+ try:
+ service.pull(ignore_pull_failures, silent=silent)
+ except (ImageNotFound, NotFound):
+ if service.can_be_built():
+ must_build.append(service.name)
+ else:
+ raise
+
+ if len(must_build):
+ log.warning('Some service image(s) must be built from source
by running:\n'
+ ' docker-compose build {}'
+ .format(' '.join(must_build)))
+
+ def parallel_pull(self, services, ignore_pull_failures=False,
silent=False):
+ msg = 'Pulling' if not silent else None
+ must_build = []
+
+ def pull_service(service):
+ strm = service.pull(ignore_pull_failures, True, stream=True)
+ if strm is None: # Attempting to pull service with no `image` key
is a no-op
+ return
+
+ try:
+ writer = parallel.get_stream_writer()
for event in strm:
if 'status' not in event:
continue
- status = event['status'].lower()
- if 'progressDetail' in event:
- detail = event['progressDetail']
- if 'current' in detail and 'total' in detail:
- percentage = float(detail['current']) /
float(detail['total'])
- status = '{} ({:.1%})'.format(status, percentage)
-
+ status = read_status(event)
writer.write(
msg, service.name, truncate_string(status), lambda s: s
)
+ except (ImageNotFound, NotFound):
+ if service.can_be_built():
+ must_build.append(service.name)
+ else:
+ raise
- _, errors = parallel.parallel_execute(
- services_to_pull,
- pull_service,
- operator.attrgetter('name'),
- msg,
- limit=5,
- )
- if len(errors):
- combined_errors = '\n'.join([
- e.decode('utf-8') if isinstance(e, six.binary_type) else e
for e in errors.values()
- ])
- raise ProjectError(combined_errors)
+ _, errors = parallel.parallel_execute(
+ services,
+ pull_service,
+ operator.attrgetter('name'),
+ msg,
+ limit=5,
+ )
- else:
- for service in services_to_pull:
- service.pull(ignore_pull_failures, silent=silent)
+ if len(must_build):
+ log.warning('Some service image(s) must be built from source by
running:\n'
+ ' docker-compose build {}'
+ .format(' '.join(must_build)))
+ if len(errors):
+ combined_errors = '\n'.join([
+ e.decode('utf-8') if isinstance(e, six.binary_type) else e for
e in errors.values()
+ ])
+ raise ProjectError(combined_errors)
def push(self, service_names=None, ignore_push_failures=False):
unique_images = set()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/docker-compose-1.25.0/compose/service.py
new/docker-compose-1.25.1/compose/service.py
--- old/docker-compose-1.25.0/compose/service.py 2019-11-18
17:45:52.000000000 +0100
+++ new/docker-compose-1.25.1/compose/service.py 2020-01-06
16:57:25.000000000 +0100
@@ -60,6 +60,7 @@
from .utils import parse_seconds_float
from .utils import truncate_id
from .utils import unique_everseen
+from compose.cli.utils import binarystr_to_unicode
if six.PY2:
import subprocess32 as subprocess
@@ -343,7 +344,7 @@
return Container.create(self.client, **container_options)
except APIError as ex:
raise OperationFailedError("Cannot create container for service
%s: %s" %
- (self.name, ex.explanation))
+ (self.name,
binarystr_to_unicode(ex.explanation)))
def ensure_image_exists(self, do_build=BuildAction.none, silent=False,
cli=False):
if self.can_be_built() and do_build == BuildAction.force:
@@ -624,9 +625,10 @@
try:
container.start()
except APIError as ex:
- if "driver failed programming external connectivity" in
ex.explanation:
+ expl = binarystr_to_unicode(ex.explanation)
+ if "driver failed programming external connectivity" in expl:
log.warn("Host is already in use by another container")
- raise OperationFailedError("Cannot start service %s: %s" %
(self.name, ex.explanation))
+ raise OperationFailedError("Cannot start service %s: %s" %
(self.name, expl))
return container
@property
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/docker-compose-1.25.0/docker_compose.egg-info/PKG-INFO
new/docker-compose-1.25.1/docker_compose.egg-info/PKG-INFO
--- old/docker-compose-1.25.0/docker_compose.egg-info/PKG-INFO 2019-11-18
22:56:23.000000000 +0100
+++ new/docker-compose-1.25.1/docker_compose.egg-info/PKG-INFO 2020-01-07
10:48:11.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: docker-compose
-Version: 1.25.0
+Version: 1.25.1
Summary: Multi-container orchestration for Docker
Home-page: https://www.docker.com/
Author: Docker, Inc.
@@ -13,6 +13,8 @@
==============

+ ## :exclamation: The docker-compose project announces that as Python 2
reaches it's EOL, versions 1.25.x will be the last to support it. For more
information, please refer to this
[issue](https://github.com/docker/compose/issues/6890).
+
Compose is a tool for defining and running multi-container Docker
applications.
With Compose, you use a Compose file to configure your application's
services.
Then, using a single command, you create and start all the services
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/docker-compose-1.25.0/docker_compose.egg-info/SOURCES.txt
new/docker-compose-1.25.1/docker_compose.egg-info/SOURCES.txt
--- old/docker-compose-1.25.0/docker_compose.egg-info/SOURCES.txt
2019-11-18 22:56:23.000000000 +0100
+++ new/docker-compose-1.25.1/docker_compose.egg-info/SOURCES.txt
2020-01-07 10:48:11.000000000 +0100
@@ -193,6 +193,7 @@
tests/fixtures/run-workdir/docker-compose.yml
tests/fixtures/scale/docker-compose.yml
tests/fixtures/secrets/default
+tests/fixtures/simple-composefile/can-build-pull-failures.yml
tests/fixtures/simple-composefile/digest.yml
tests/fixtures/simple-composefile/docker-compose.yml
tests/fixtures/simple-composefile/ignore-pull-failures.yml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/docker-compose-1.25.0/requirements-dev.txt
new/docker-compose-1.25.1/requirements-dev.txt
--- old/docker-compose-1.25.0/requirements-dev.txt 2019-11-05
15:29:48.000000000 +0100
+++ new/docker-compose-1.25.1/requirements-dev.txt 2020-01-03
16:01:01.000000000 +0100
@@ -1,6 +1,6 @@
-coverage==4.4.2
+coverage==4.5.4
ddt==1.2.0
-flake8==3.5.0
+flake8==3.7.9
mock==3.0.5
pytest==3.6.3
-pytest-cov==2.5.1
+pytest-cov==2.8.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/docker-compose-1.25.0/tests/acceptance/cli_test.py
new/docker-compose-1.25.1/tests/acceptance/cli_test.py
--- old/docker-compose-1.25.0/tests/acceptance/cli_test.py 2019-11-14
15:46:09.000000000 +0100
+++ new/docker-compose-1.25.1/tests/acceptance/cli_test.py 2020-01-03
16:00:32.000000000 +0100
@@ -48,6 +48,7 @@
def start_process(base_dir, options):
proc = subprocess.Popen(
['docker-compose'] + options,
+ stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
cwd=base_dir)
@@ -55,8 +56,8 @@
return proc
-def wait_on_process(proc, returncode=0):
- stdout, stderr = proc.communicate()
+def wait_on_process(proc, returncode=0, stdin=None):
+ stdout, stderr = proc.communicate(input=stdin)
if proc.returncode != returncode:
print("Stderr: {}".format(stderr))
print("Stdout: {}".format(stdout))
@@ -64,10 +65,10 @@
return ProcessResult(stdout.decode('utf-8'), stderr.decode('utf-8'))
-def dispatch(base_dir, options, project_options=None, returncode=0):
+def dispatch(base_dir, options, project_options=None, returncode=0,
stdin=None):
project_options = project_options or []
proc = start_process(base_dir, project_options + options)
- return wait_on_process(proc, returncode=returncode)
+ return wait_on_process(proc, returncode=returncode, stdin=stdin)
def wait_on_condition(condition, delay=0.1, timeout=40):
@@ -156,8 +157,8 @@
self._project = get_project(self.base_dir,
override_dir=self.override_dir)
return self._project
- def dispatch(self, options, project_options=None, returncode=0):
- return dispatch(self.base_dir, options, project_options, returncode)
+ def dispatch(self, options, project_options=None, returncode=0,
stdin=None):
+ return dispatch(self.base_dir, options, project_options, returncode,
stdin)
def execute(self, container, cmd):
# Remove once Hijack and CloseNotifier sign a peace treaty
@@ -241,6 +242,17 @@
self.base_dir = 'tests/fixtures/v2-full'
assert self.dispatch(['config', '--quiet']).stdout == ''
+ def test_config_stdin(self):
+ config = b"""version: "3.7"
+services:
+ web:
+ image: nginx
+ other:
+ image: alpine
+"""
+ result = self.dispatch(['-f', '-', 'config', '--services'],
stdin=config)
+ assert set(result.stdout.rstrip().split('\n')) == {'web', 'other'}
+
def test_config_with_hash_option(self):
self.base_dir = 'tests/fixtures/v2-full'
result = self.dispatch(['config', '--hash=*'])
@@ -661,13 +673,6 @@
'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 == ''
@@ -689,6 +694,14 @@
result.stderr
)
+ def test_pull_can_build(self):
+ result = self.dispatch([
+ '-f', 'can-build-pull-failures.yml', 'pull'],
+ returncode=0
+ )
+ assert 'Some service image(s) must be built from source' in
result.stderr
+ assert 'docker-compose build can_build' in result.stderr
+
def test_pull_with_no_deps(self):
self.base_dir = 'tests/fixtures/links-composefile'
result = self.dispatch(['pull', '--no-parallel', 'web'])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/docker-compose-1.25.0/tests/fixtures/simple-composefile/can-build-pull-failures.yml
new/docker-compose-1.25.1/tests/fixtures/simple-composefile/can-build-pull-failures.yml
---
old/docker-compose-1.25.0/tests/fixtures/simple-composefile/can-build-pull-failures.yml
1970-01-01 01:00:00.000000000 +0100
+++
new/docker-compose-1.25.1/tests/fixtures/simple-composefile/can-build-pull-failures.yml
2020-01-03 16:00:32.000000000 +0100
@@ -0,0 +1,6 @@
+version: '3'
+services:
+ can_build:
+ image: nonexisting-image-but-can-build:latest
+ build: .
+ command: top
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/docker-compose-1.25.0/tests/unit/service_test.py
new/docker-compose-1.25.1/tests/unit/service_test.py
--- old/docker-compose-1.25.0/tests/unit/service_test.py 2019-11-05
15:29:48.000000000 +0100
+++ new/docker-compose-1.25.1/tests/unit/service_test.py 2020-01-06
16:57:25.000000000 +0100
@@ -521,7 +521,37 @@
assert 'was built because it did not already exist' in args[0]
assert self.mock_client.build.call_count == 1
- self.mock_client.build.call_args[1]['tag'] == 'default_foo'
+ assert self.mock_client.build.call_args[1]['tag'] == 'default_foo'
+
+ def test_create_container_binary_string_error(self):
+ service = Service('foo', client=self.mock_client, build={'context':
'.'})
+ service.image = lambda: {'Id': 'abc123'}
+
+ self.mock_client.create_container.side_effect = APIError(None,
+ None,
+ b"Test binary
string explanation")
+ with pytest.raises(OperationFailedError) as ex:
+ service.create_container()
+
+ assert ex.value.msg == "Cannot create container for service foo: Test
binary string explanation"
+
+ def test_start_binary_string_error(self):
+ service = Service('foo', client=self.mock_client)
+ container = Container(self.mock_client, {'Id': 'abc123'})
+
+ self.mock_client.start.side_effect = APIError(None,
+ None,
+ b"Test binary string
explanation with "
+ b"driver failed
programming external "
+ b"connectivity")
+ with mock.patch('compose.service.log', autospec=True) as mock_log:
+ with pytest.raises(OperationFailedError) as ex:
+ service.start_container(container)
+
+ assert ex.value.msg == "Cannot start service foo: " \
+ "Test binary string explanation " \
+ "with driver failed programming external
connectivity"
+ mock_log.warn.assert_called_once_with("Host is already in use by
another container")
def test_ensure_image_exists_no_build(self):
service = Service('foo', client=self.mock_client, build={'context':
'.'})