Compare commits

..

24 Commits

Author SHA1 Message Date
aiordache
67630359cf "Bump 1.28.2"
Signed-off-by: aiordache <anca.iordache@docker.com>
2021-01-26 20:23:53 +01:00
aiordache
c99c1556aa Add cgroup1 label to Release.Jenkinsfile
Signed-off-by: aiordache <anca.iordache@docker.com>
2021-01-26 20:15:15 +01:00
aiordache
0e529bf29b "Bump 1.28.1"
Signed-off-by: aiordache <anca.iordache@docker.com>
2021-01-26 20:15:15 +01:00
Harald Albers
27d039d39a Fix formatting of help output for up|logs --no-log-prefix
Signed-off-by: Harald Albers <github@albersweb.de>
2021-01-26 20:15:15 +01:00
Harald Albers
ad1baff1b3 Add bash completion for logs|up --no-log-prefix
This adds bash completion for https://github.com/docker/compose/pull/7435

Signed-off-by: Harald Albers <github@albersweb.de>
2021-01-26 20:15:15 +01:00
Chris Crone
59e9ebe428 build.linux: Revert to Python 3.7
This allows us to revert from Debian Buster to Stretch which allows
us to relax the glibc version requirements.

Signed-off-by: Chris Crone <christopher.crone@docker.com>
2021-01-26 20:15:15 +01:00
aiordache
90373e9e63 "Bump 1.28.0"
Signed-off-by: aiordache <anca.iordache@docker.com>
2021-01-26 20:15:15 +01:00
Ulysses Souza
786822e921 Update compose-spec
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-01-26 20:15:15 +01:00
Ulysses Souza
95c6adeecf Remove restriction on docker version
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-01-26 20:15:15 +01:00
Mike Seplowitz
b6ddddc31a Improve control over ANSI output (#6858)
* Move global console_handler into function scope

Signed-off-by: Mike Seplowitz <mseplowitz@bloomberg.net>

* Improve control over ANSI output

- Disabled parallel logger ANSI output if not attached to a tty.
  The console handler and progress stream already checked whether the
  output stream is a tty, but ParallelStreamWriter did not.

- Added --ansi=(never|always|auto) option to allow clearer control over
  ANSI output. Since --no-ansi is the same as --ansi=never, --no-ansi is
  now deprecated.

Signed-off-by: Mike Seplowitz <mseplowitz@bloomberg.net>
2021-01-26 20:15:15 +01:00
aiordache
e1fb1e9a3a "Bump 1.28.0-rc3"
Signed-off-by: aiordache <anca.iordache@docker.com>
2021-01-26 20:15:15 +01:00
Mark Gallagher
c27c73efae Remove duplicate values check for build.cache_from
The `docker` command accepts duplicate values, so there is no benefit to
performing this check.

Fixes #7342.

Signed-off-by: Mark Gallagher <mark@fts.scot>
2021-01-26 20:15:15 +01:00
Sebastiaan van Stijn
a5863de31a Make COMPOSE_DOCKER_CLI_BUILD=1 the default
This changes compose to use "native" build through the CLI
by default. With this, docker-compose can take advantage of
BuildKit (which is now enabled by default on Docker Desktop
2.5 and up).

Users that want to use the python client for building can
opt-out of this feature by setting COMPOSE_DOCKER_CLI_BUILD=0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-01-26 20:15:14 +01:00
guillaume.tardif
97056552dc Support windows npipe, set content type & corrrect URL /usage. Also fixed socket name for desktop mac
Signed-off-by: guillaume.tardif <guillaume.tardif@gmail.com>
2021-01-26 20:15:14 +01:00
Ulysses Souza
318741ca5e Add metrics
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-01-26 20:15:14 +01:00
aiordache
aa8b7bb392 "Bump 1.28.0-rc2"
Signed-off-by: aiordache <anca.iordache@docker.com>
2021-01-26 20:15:14 +01:00
Daniil Sigalov
a8ffcfaefb Only attach services we'll read logs from in up
When 'up' is run with explicit list of services, compose will
start them together with their dependencies. It will attach to all
started services, but won't read output from dependencies (their
logs are not printed by 'up') - so the receive buffer of
dependencies will fill and at some point will start blocking those
services. Fix that by only attaching to services given in the
list.
To do that, move logic of choosing which services to attach from
cli/main.py to utils.py and use it from project.py to decide if
service should be attached.

Fixes #6018

Signed-off-by: Daniil Sigalov <asterite@seclab.cs.msu.ru>
2021-01-26 20:15:14 +01:00
Ulysses Souza
97e009a8cb Avoid setting unsuported parameter for subprocess.Popen on Windows
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-01-26 20:15:14 +01:00
aiordache
186e3913f0 "Bump 1.28.0-rc1"
Signed-off-by: aiordache <anca.iordache@docker.com>
2021-01-26 20:15:14 +01:00
dependabot-preview[bot]
7bc945654f Bump virtualenv from 20.0.30 to 20.2.2
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
(cherry picked from commit 8785279ffd)
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-01-26 20:15:14 +01:00
dependabot-preview[bot]
cc299f5cd5 Bump bcrypt from 3.1.7 to 3.2.0
Bumps [bcrypt](https://github.com/pyca/bcrypt) from 3.1.7 to 3.2.0.
- [Release notes](https://github.com/pyca/bcrypt/releases)
- [Changelog](https://github.com/pyca/bcrypt/blob/master/release.py)
- [Commits](https://github.com/pyca/bcrypt/compare/3.1.7...3.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-26 20:15:14 +01:00
Anca Iordache
536bea0859 Revert "Bump virtualenv from 20.0.30 to 20.2.1" (#7975)
This reverts commit 8785279ffd.

Signed-off-by: aiordache <anca.iordache@docker.com>
2021-01-26 20:15:14 +01:00
Anca Iordache
db7b666e40 Revert "Bump gitpython from 3.1.7 to 3.1.11" (#7974)
Signed-off-by: aiordache <anca.iordache@docker.com>
2021-01-26 20:15:14 +01:00
aiordache
945123145f Bump docker-py in setup.py
Signed-off-by: aiordache <anca.iordache@docker.com>
2021-01-26 20:15:14 +01:00
13 changed files with 51 additions and 34 deletions

View File

@@ -17,7 +17,7 @@
sha: v1.3.4
hooks:
- id: reorder-python-imports
language_version: 'python3.9'
language_version: 'python3.7'
args:
- --py3-plus
- repo: https://github.com/asottile/pyupgrade

View File

@@ -1,7 +1,24 @@
Change log
==========
1.28.0 (2020-12-03)
1.28.2 (2021-01-26)
-------------------
### Miscellaneous
- CI setup update
1.28.1 (2021-01-25)
-------------------
### Bugs
- Revert to Python 3.7 bump for Linux static builds
- Add bash completion for `docker-compose logs|up --no-log-prefix`
1.28.0 (2021-01-20)
-------------------
### Features

View File

@@ -1,13 +1,13 @@
ARG DOCKER_VERSION=19.03
ARG PYTHON_VERSION=3.9.0
ARG PYTHON_VERSION=3.7.9
ARG BUILD_ALPINE_VERSION=3.12
ARG BUILD_CENTOS_VERSION=7
ARG BUILD_DEBIAN_VERSION=slim-buster
ARG BUILD_DEBIAN_VERSION=slim-stretch
ARG RUNTIME_ALPINE_VERSION=3.12
ARG RUNTIME_CENTOS_VERSION=7
ARG RUNTIME_DEBIAN_VERSION=buster-slim
ARG RUNTIME_DEBIAN_VERSION=stretch-slim
ARG DISTRO=alpine
@@ -38,7 +38,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
git \
libc-dev \
libffi-dev \
libgcc-8-dev \
libgcc-6-dev \
libssl-dev \
make \
openssl \
@@ -68,8 +68,8 @@ WORKDIR /code/
COPY docker-compose-entrypoint.sh /usr/local/bin/
COPY --from=docker-cli /usr/local/bin/docker /usr/local/bin/docker
RUN pip install \
virtualenv==20.2.2 \
tox==3.20.1
virtualenv==20.4.0 \
tox==3.21.2
COPY requirements-dev.txt .
COPY requirements-indirect.txt .
COPY requirements.txt .
@@ -79,7 +79,7 @@ COPY tox.ini .
COPY setup.py .
COPY README.md .
COPY compose compose/
RUN tox --notest
RUN tox -e py37 --notest
COPY . .
ARG GIT_COMMIT=unknown
ENV DOCKER_COMPOSE_GITSHA=$GIT_COMMIT

2
Jenkinsfile vendored
View File

@@ -2,7 +2,7 @@
def dockerVersions = ['19.03.13']
def baseImages = ['alpine', 'debian']
def pythonVersions = ['py39']
def pythonVersions = ['py37']
pipeline {
agent none

View File

@@ -2,7 +2,7 @@
def dockerVersions = ['19.03.13', '18.09.9']
def baseImages = ['alpine', 'debian']
def pythonVersions = ['py39']
def pythonVersions = ['py37']
pipeline {
agent none
@@ -23,7 +23,7 @@ pipeline {
parallel {
stage('alpine') {
agent {
label 'linux && docker && ubuntu-2004'
label 'linux && docker && ubuntu-2004 && cgroup1'
}
steps {
buildImage('alpine')
@@ -31,7 +31,7 @@ pipeline {
}
stage('debian') {
agent {
label 'linux && docker && ubuntu-2004'
label 'linux && docker && ubuntu-2004 && cgroup1'
}
steps {
buildImage('debian')
@@ -41,7 +41,7 @@ pipeline {
}
stage('Test') {
agent {
label 'linux && docker && ubuntu-2004'
label 'linux && docker && ubuntu-2004 && cgroup1'
}
steps {
// TODO use declarative 1.5.0 `matrix` once available on CI
@@ -61,7 +61,7 @@ pipeline {
}
stage('Generate Changelog') {
agent {
label 'linux && docker && ubuntu-2004'
label 'linux && docker && ubuntu-2004 && cgroup1'
}
steps {
checkout scm
@@ -98,7 +98,7 @@ pipeline {
}
stage('linux binary') {
agent {
label 'linux && docker && ubuntu-2004'
label 'linux && docker && ubuntu-2004 && cgroup1'
}
steps {
checkout scm
@@ -134,7 +134,7 @@ pipeline {
}
stage('alpine image') {
agent {
label 'linux && docker && ubuntu-2004'
label 'linux && docker && ubuntu-2004 && cgroup1'
}
steps {
buildRuntimeImage('alpine')
@@ -142,7 +142,7 @@ pipeline {
}
stage('debian image') {
agent {
label 'linux && docker && ubuntu-2004'
label 'linux && docker && ubuntu-2004 && cgroup1'
}
steps {
buildRuntimeImage('debian')
@@ -157,7 +157,7 @@ pipeline {
parallel {
stage('Pushing images') {
agent {
label 'linux && docker && ubuntu-2004'
label 'linux && docker && ubuntu-2004 && cgroup1'
}
steps {
pushRuntimeImage('alpine')
@@ -166,7 +166,7 @@ pipeline {
}
stage('Creating Github Release') {
agent {
label 'linux && docker && ubuntu-2004'
label 'linux && docker && ubuntu-2004 && cgroup1'
}
environment {
GITHUB_TOKEN = credentials('github-release-token')
@@ -198,7 +198,7 @@ pipeline {
}
stage('Publishing Python packages') {
agent {
label 'linux && docker && ubuntu-2004'
label 'linux && docker && ubuntu-2004 && cgroup1'
}
environment {
PYPIRC = credentials('pypirc-docker-dsg-cibot')
@@ -247,7 +247,7 @@ def buildImage(baseImage) {
def runTests(dockerVersion, pythonVersion, baseImage) {
return {
stage("python=${pythonVersion} docker=${dockerVersion} ${baseImage}") {
node("linux && docker && ubuntu-2004") {
node("linux && docker && ubuntu-2004 && cgroup1") {
def scmvar = checkout(scm)
def imageName = "dockerbuildbot/compose:${baseImage}-${scmvar.GIT_COMMIT}"
def storageDriver = sh(script: "docker info -f \'{{.Driver}}\'", returnStdout: true).trim()

View File

@@ -1 +1 @@
__version__ = '1.28.0'
__version__ = '1.28.2'

View File

@@ -691,7 +691,7 @@ class TopLevelCommand:
-t, --timestamps Show timestamps.
--tail="all" Number of lines to show from the end of the logs
for each container.
--no-log-prefix Don't print prefix in logs.
--no-log-prefix Don't print prefix in logs.
"""
containers = self.project.containers(service_names=options['SERVICE'], stopped=True)
@@ -1109,7 +1109,7 @@ class TopLevelCommand:
container. Implies --abort-on-container-exit.
--scale SERVICE=NUM Scale SERVICE to NUM instances. Overrides the
`scale` setting in the Compose file if present.
--no-log-prefix Don't print prefix in logs.
--no-log-prefix Don't print prefix in logs.
"""
start_deps = not options['--no-deps']
always_recreate_deps = options['--always-recreate-deps']

View File

@@ -294,7 +294,7 @@ _docker_compose_logs() {
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--follow -f --help --no-color --tail --timestamps -t" -- "$cur" ) )
COMPREPLY=( $( compgen -W "--follow -f --help --no-color --no-log-prefix --tail --timestamps -t" -- "$cur" ) )
;;
*)
__docker_compose_complete_services
@@ -549,7 +549,7 @@ _docker_compose_up() {
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--abort-on-container-exit --always-recreate-deps --attach-dependencies --build -d --detach --exit-code-from --force-recreate --help --no-build --no-color --no-deps --no-recreate --no-start --renew-anon-volumes -V --remove-orphans --scale --timeout -t" -- "$cur" ) )
COMPREPLY=( $( compgen -W "--abort-on-container-exit --always-recreate-deps --attach-dependencies --build -d --detach --exit-code-from --force-recreate --help --no-build --no-color --no-deps --no-log-prefix --no-recreate --no-start --renew-anon-volumes -V --remove-orphans --scale --timeout -t" -- "$cur" ) )
;;
*)
__docker_compose_complete_services

View File

@@ -23,6 +23,6 @@ pyrsistent==0.16.0
smmap==3.0.4
smmap2==3.0.1
toml==0.10.1
tox==3.20.1
virtualenv==20.2.2
tox==3.21.2
virtualenv==20.4.0
wcwidth==0.2.5

View File

@@ -3,7 +3,7 @@
set -ex
CODE_PATH=/code
VENV="${CODE_PATH}"/.tox/py39
VENV="${CODE_PATH}"/.tox/py37
cd "${CODE_PATH}"
mkdir -p dist

View File

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

View File

@@ -11,7 +11,7 @@ docker run --rm \
"$TAG" tox -e pre-commit
get_versions="docker run --rm
--entrypoint=/code/.tox/py39/bin/python
--entrypoint=/code/.tox/py37/bin/python
$TAG
/code/script/test/versions.py docker/docker-ce,moby/moby"
@@ -22,7 +22,7 @@ elif [ "$DOCKER_VERSIONS" == "all" ]; then
fi
BUILD_NUMBER=${BUILD_NUMBER-$USER}
PY_TEST_VERSIONS=${PY_TEST_VERSIONS:-py39}
PY_TEST_VERSIONS=${PY_TEST_VERSIONS:-py37}
for version in $DOCKER_VERSIONS; do
>&2 echo "Running tests against Docker $version"

View File

@@ -1,5 +1,5 @@
[tox]
envlist = py39,pre-commit
envlist = py37,py39,pre-commit
[testenv]
usedevelop=True