From e6a64e36712f4505d77c6853d5b1606e598fcb2f Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 7 Aug 2020 16:45:20 +0200 Subject: [PATCH] Update default API version to v1.39 (#2512) * Update default API version to v1.39 When running the docker-py integration tests in the Moby repository, some tests were skipped because the API version used was too low: SKIPPED [1] tests/integration/api_service_test.py:882: API version is too low (< 1.38) SKIPPED [1] tests/integration/api_swarm_test.py:59: API version is too low (< 1.39) SKIPPED [1] tests/integration/api_swarm_test.py:38: API version is too low (< 1.39) SKIPPED [1] tests/integration/api_swarm_test.py:45: API version is too low (< 1.39) SKIPPED [1] tests/integration/api_swarm_test.py:52: API version is too low (< 1.39) While it's possible to override the API version to use for testing using the `DOCKER_TEST_API_VERSION` environment variable, we may want to set the default to a version that supports all features that were added. This patch updates the default API version to v1.39, which is the minimum version required for those features, and corresponds with Docker 18.09. Note that the API version of the current (19.03) Docker release is v1.40, but using that version as default would exclude users that did not update their Docker version yet (and would not be needed yet for the features provided). Signed-off-by: Sebastiaan van Stijn * Makefile: set DOCKER_TEST_API_VERSION to v1.39 Signed-off-by: Sebastiaan van Stijn --- Makefile | 2 +- docker/constants.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4795c63c..6765d4d7 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,7 @@ integration-test: build integration-test-py3: build-py3 docker run -t --rm -v /var/run/docker.sock:/var/run/docker.sock docker-sdk-python3 py.test -v tests/integration/${file} -TEST_API_VERSION ?= 1.35 +TEST_API_VERSION ?= 1.39 TEST_ENGINE_VERSION ?= 19.03.12 .PHONY: setup-network diff --git a/docker/constants.py b/docker/constants.py index e4daed5d..c09eedab 100644 --- a/docker/constants.py +++ b/docker/constants.py @@ -1,7 +1,7 @@ import sys from .version import version -DEFAULT_DOCKER_API_VERSION = '1.35' +DEFAULT_DOCKER_API_VERSION = '1.39' MINIMUM_DOCKER_API_VERSION = '1.21' DEFAULT_TIMEOUT_SECONDS = 60 STREAM_HEADER_SIZE_BYTES = 8