Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump default API version to 1.45 (Moby 26.0/26.1) #3261

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
TEST_API_VERSION ?= 1.44
TEST_ENGINE_VERSION ?= 25.0
TEST_API_VERSION ?= 1.45
TEST_ENGINE_VERSION ?= 26.1

ifeq ($(OS),Windows_NT)
PLATFORM := Windows
Expand Down
2 changes: 1 addition & 1 deletion docker/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from .version import __version__

DEFAULT_DOCKER_API_VERSION = '1.44'
DEFAULT_DOCKER_API_VERSION = '1.45'
MINIMUM_DOCKER_API_VERSION = '1.24'
DEFAULT_TIMEOUT_SECONDS = 60
STREAM_HEADER_SIZE_BYTES = 8
Expand Down
4 changes: 2 additions & 2 deletions tests/Dockerfile-ssh-dind
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1

ARG API_VERSION=1.44
ARG ENGINE_VERSION=25.0
ARG API_VERSION=1.45
ARG ENGINE_VERSION=26.1

FROM docker:${ENGINE_VERSION}-dind

Expand Down
11 changes: 5 additions & 6 deletions tests/integration/models_containers_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,9 @@ def test_run_with_networking_config(self):
assert 'NetworkSettings' in attrs
assert 'Networks' in attrs['NetworkSettings']
assert list(attrs['NetworkSettings']['Networks'].keys()) == [net_name]
# Expect Aliases to list 'test_alias' and the container's short-id.
# In API version 1.45, the short-id will be removed.
# Aliases no longer include the container's short-id in API v1.45.
assert attrs['NetworkSettings']['Networks'][net_name]['Aliases'] \
== [test_alias, attrs['Id'][:12]]
== [test_alias]
assert attrs['NetworkSettings']['Networks'][net_name]['DriverOpts'] \
== test_driver_opt

Expand Down Expand Up @@ -191,9 +190,9 @@ def test_run_with_networking_config_only_undeclared_network(self):
assert 'NetworkSettings' in attrs
assert 'Networks' in attrs['NetworkSettings']
assert list(attrs['NetworkSettings']['Networks'].keys()) == [net_name]
# Aliases should include the container's short-id (but it will be removed
# in API v1.45).
assert attrs['NetworkSettings']['Networks'][net_name]['Aliases'] == [attrs["Id"][:12]]
# Aliases no longer include the container's short-id in API v1.45.
assert (attrs['NetworkSettings']['Networks'][net_name]['Aliases']
is None)
assert (attrs['NetworkSettings']['Networks'][net_name]['DriverOpts']
is None)
Comment on lines +193 to 197
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, I think I tried adding an assertion for DNSNames here, but that didn't work; wondering if something needs to be added to make that field being propagated here, and if that should be checked for.

For reference, here's what inspecting a container created with similar options looks like (Aliases is null, and both the short-ID and custom hello alias are shown in DNSNames);

docker inspect --format='{{json .NetworkSettings.Networks }}' hello | jq .
{
  "foo": {
    "IPAMConfig": null,
    "Links": null,
    "Aliases": null,
    "MacAddress": "02:42:ac:15:00:02",
    "NetworkID": "d527fac86492c97c660830566d00d410281b8b67cc2f9d85fc60229d5d5d76ee",
    "EndpointID": "4309540d4d79c6fbd21e883c867657bd5550b54fe55d1a623d9858bbf1846ee5",
    "Gateway": "172.21.0.1",
    "IPAddress": "172.21.0.2",
    "IPPrefixLen": 16,
    "IPv6Gateway": "",
    "GlobalIPv6Address": "",
    "GlobalIPv6PrefixLen": 0,
    "DriverOpts": null,
    "DNSNames": [
      "hello",
      "e9e430344c84"
    ]
  }
}


Expand Down