Merge pull request from docker/bump-1.9.0

Bump 1.9.0
This commit is contained in:
Joffrey F 2016-11-16 11:20:18 -08:00 committed by GitHub
commit ae26fdf916
9 changed files with 34 additions and 15 deletions

View File

@ -1,7 +1,7 @@
Change log
==========
1.9.0 (2016-10-20)
1.9.0 (2016-11-16)
-----------------
**Breaking changes**

4
Jenkinsfile vendored
View File

@ -10,7 +10,7 @@ def checkDocs = { ->
}
def buildImage = { ->
wrappedNode(label: "linux && !zfs") {
wrappedNode(label: "ubuntu && !zfs", cleanWorkspace: true) {
stage("build image") {
deleteDir(); checkout(scm)
def imageName = "dockerbuildbot/compose:${gitCommit()}"
@ -37,7 +37,7 @@ def runTests = { Map settings ->
}
{ ->
wrappedNode(label: "linux && !zfs") {
wrappedNode(label: "ubuntu && !zfs", cleanWorkspace: true) {
stage("test python=${pythonVersions} / docker=${dockerVersions}") {
deleteDir(); checkout(scm)
def storageDriver = sh(script: 'docker info | awk -F \': \' \'$1 == "Storage Driver" { print $2; exit }\'', returnStdout: true).trim()

View File

@ -1,4 +1,4 @@
from __future__ import absolute_import
from __future__ import unicode_literals
__version__ = '1.9.0-rc4'
__version__ = '1.9.0'

View File

@ -111,16 +111,17 @@ def create_ipam_config_from_dict(ipam_dict):
def check_remote_network_config(remote, local):
if local.driver and remote['Driver'] != local.driver:
if local.driver and remote.get('Driver') != local.driver:
raise ConfigurationError(
'Network "{}" needs to be recreated - driver has changed'
.format(local.full_name)
)
local_opts = local.driver_opts or {}
for k in set.union(set(remote['Options'].keys()), set(local_opts.keys())):
remote_opts = remote.get('Options') or {}
for k in set.union(set(remote_opts.keys()), set(local_opts.keys())):
if k in OPTS_EXCEPTIONS:
continue
if remote['Options'].get(k) != local_opts.get(k):
if remote_opts.get(k) != local_opts.get(k):
raise ConfigurationError(
'Network "{}" needs to be recreated - options have changed'
.format(local.full_name)

View File

@ -10,6 +10,7 @@ from operator import attrgetter
import enum
import six
from docker.errors import APIError
from docker.errors import NotFound
from docker.utils import LogConfig
from docker.utils.ports import build_port_bindings
from docker.utils.ports import split_port
@ -829,12 +830,11 @@ class Service(object):
repo, tag, separator = parse_repository_tag(self.options['image'])
tag = tag or 'latest'
log.info('Pulling %s (%s%s%s)...' % (self.name, repo, separator, tag))
output = self.client.pull(repo, tag=tag, stream=True)
try:
output = self.client.pull(repo, tag=tag, stream=True)
return progress_stream.get_digest_from_pull(
stream_output(output, sys.stdout))
except StreamOutputError as e:
except (StreamOutputError, NotFound) as e:
if not ignore_pull_failures:
raise
else:

View File

@ -15,7 +15,7 @@
set -e
VERSION="1.9.0-rc4"
VERSION="1.9.0"
IMAGE="docker/compose:$VERSION"

View File

@ -330,12 +330,13 @@ class CLITestCase(DockerClientTestCase):
def test_pull_with_ignore_pull_failures(self):
result = self.dispatch([
'-f', 'ignore-pull-failures.yml',
'pull', '--ignore-pull-failures'])
'pull', '--ignore-pull-failures']
)
assert 'Pulling simple (busybox:latest)...' in result.stderr
assert 'Pulling another (nonexisting-image:latest)...' in result.stderr
assert 'Error: image library/nonexisting-image' in result.stderr
assert 'not found' in result.stderr
assert ('repository nonexisting-image not found' in result.stderr or
'image library/nonexisting-image:latest not found' in result.stderr)
def test_build_plain(self):
self.base_dir = 'tests/fixtures/simple-dockerfile'

View File

@ -2493,6 +2493,15 @@ class EnvTest(unittest.TestCase):
{'ONE': '2', 'TWO': '1', 'THREE': '3', 'FOO': 'bar'},
)
def test_environment_overrides_env_file(self):
self.assertEqual(
resolve_environment({
'environment': {'FOO': 'baz'},
'env_file': ['tests/fixtures/env/one.env'],
}),
{'ONE': '2', 'TWO': '1', 'THREE': '3', 'FOO': 'baz'},
)
def test_resolve_environment_with_multiple_env_files(self):
service_dict = {
'env_file': [

View File

@ -37,7 +37,9 @@ class NetworkTest(unittest.TestCase):
def test_check_remote_network_config_driver_mismatch(self):
net = Network(None, 'compose_test', 'net1', 'overlay')
with pytest.raises(ConfigurationError):
check_remote_network_config({'Driver': 'bridge', 'Options': {}}, net)
check_remote_network_config(
{'Driver': 'bridge', 'Options': {}}, net
)
def test_check_remote_network_config_options_mismatch(self):
net = Network(None, 'compose_test', 'net1', 'overlay')
@ -45,3 +47,9 @@ class NetworkTest(unittest.TestCase):
check_remote_network_config({'Driver': 'overlay', 'Options': {
'com.docker.network.driver.foo': 'baz'
}}, net)
def test_check_remote_network_config_null_remote(self):
net = Network(None, 'compose_test', 'net1', 'overlay')
check_remote_network_config(
{'Driver': 'overlay', 'Options': None}, net
)