GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Bump default API version to 1.45 (Moby 26.0/26.1) by thaJeztah · Pull Request #3261 · docker/docker-py

Conversation

@thaJeztah

@thaJeztah thaJeztah commented May 22, 2024

Copy link
Copy Markdown
Member
  • similar to Bump default API version to 1.43 (Moby 24.0) #3199

Update API version to the latest maintained release.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@thaJeztah

thaJeztah commented May 22, 2024

Copy link
Copy Markdown
Member Author

We still need to look at raising the minimum version, but I guess that can wait;

We should also start looking at raising this minimum, but I don't know if there's code specific in docker-py that handles differences between versions @milas ?

We're starting to deprecate old API versions, and the initial step is to disable (by default) API versions < 1.24. API 1.24 is the last version of the API before introduction of API version negotiation, so that's the version the CLI falls back to if it's unable to negotiate.

  • daemon: raise default minimum API version to v1.24 moby/moby#46887
  • ⚠️ there's still some debate on the client-side of that though; client: deprecate old API versions moby/moby#46962
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

krissetto
krissetto approved these changes May 22, 2024
View reviewed changes

@krissetto krissetto left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@thaJeztah

thaJeztah commented May 22, 2024

Copy link
Copy Markdown
Member Author

oh! some failure; let me see if it's related

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thaJeztah

thaJeztah commented May 22, 2024

Copy link
Copy Markdown
Member Author

Looks like it may be, and ISTR @robmry looked at some of that, but now wondering if it needs to be API-version aware (or the test rewritten to take both scenarios into account);

=================================== FAILURES ===================================
___________ ContainerCollectionTest.test_run_with_networking_config ____________
tests/integration/models_containers_test.py:136: in test_run_with_networking_config
    assert attrs['NetworkSettings']['Networks'][net_name]['Aliases'] \
E   AssertionError: assert ['hello'] == ['hello', '90b209030388']
E     Right contains one more item: '90b209030388'
E     Use -v to get more diff
_ ContainerCollectionTest.test_run_with_networking_config_only_undeclared_network _
tests/integration/models_containers_test.py:196: in test_run_with_networking_config_only_undeclared_network
    assert attrs['NetworkSettings']['Networks'][net_name]['Aliases'] == [attrs["Id"][:12]]
E   AssertionError: assert None == ['0ed603731bb5']
=========================== short test summary info ============================
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thaJeztah

thaJeztah commented May 22, 2024

Copy link
Copy Markdown
Member Author

☝️ I think this PR was related to that, but looks like that one wasn't merged; maybe it got included in another PR?

  • Fix tests that look at 'Aliases' #3233
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@krissetto

krissetto commented May 22, 2024

Copy link
Copy Markdown
Contributor

I remember seeing # In API version 1.45, the short-id will be removed..
Looks like that didn't happen? 🤔

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thaJeztah

thaJeztah commented May 22, 2024

Copy link
Copy Markdown
Member Author

Wondering if TEST_API_VERSION is passed through everywhere; I see at least one dockerfiles using DOCKER_API_VERSION (not TEST_.....) 🤔

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thaJeztah

thaJeztah commented May 22, 2024

Copy link
Copy Markdown
Member Author

I remember seeing # In API version 1.45, the short-id will be removed.. Looks like that didn't happen? 🤔

Oh; maybe it is removed, and that's the failure? AssertionError: assert None == ['0ed603731bb5']

But the test doesn't have a conditional on API version, so removing it would mean it'd fail on older API versions? 🤔

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@krissetto

krissetto commented May 22, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

I remember seeing # In API version 1.45, the short-id will be removed.. Looks like that didn't happen? 🤔

Oh; maybe it is removed, and that's the failure? AssertionError: assert None == ['0ed603731bb5']

But the test doesn't have a conditional on API version, so removing it would mean it'd fail on older API versions? 🤔

nah, the test seems to be assert ['hello'] == ['hello', '90b209030388'], indicating it's still present (?)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@krissetto

krissetto commented May 22, 2024

Copy link
Copy Markdown
Contributor

i don't see it when running a docker inspect locally though, with engine and client at 26.0.1

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thaJeztah

thaJeztah commented May 22, 2024

Copy link
Copy Markdown
Member Author

Tried updating the test, but now getting

=================================== FAILURES ===================================
___________ ContainerCollectionTest.test_run_with_networking_config ____________
tests/integration/models_containers_test.py:136: in test_run_with_networking_config
    assert (attrs['NetworkSettings']['Networks'][net_name]['Aliases']
E   AssertionError: assert ['hello'] is None
_ ContainerCollectionTest.test_run_with_networking_config_only_undeclared_network _
tests/integration/models_containers_test.py:202: in test_run_with_networking_config_only_undeclared_network
    assert attrs['NetworkSettings']['Networks'][net_name]['DNSNames'] \
E   AssertionError: assert None == ['hello', 'e293f5effd7e']

So, looks like that wasn't right 🙈

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thaJeztah

thaJeztah commented May 22, 2024

Copy link
Copy Markdown
Member Author

Getting closer; only one failure remaining;

___________ ContainerCollectionTest.test_run_with_networking_config ____________
tests/integration/models_containers_test.py:136: in test_run_with_networking_config
    assert (attrs['NetworkSettings']['Networks'][net_name]['Aliases']
E   AssertionError: assert ['hello'] is None
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@krissetto

krissetto commented May 22, 2024

Copy link
Copy Markdown
Contributor

what is our expectation here? meaning, are the tests "wrong" or is the engine's behavior slightly out-of-spec from what we were expecting?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thaJeztah

thaJeztah commented May 22, 2024

Copy link
Copy Markdown
Member Author

Trying to figure that out honestly; thought let me update the test to see what it actually sees, then check with @robmry and @akerouanton if this is the expected result here. 😂

krissetto reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thaJeztah

thaJeztah commented May 22, 2024

Copy link
Copy Markdown
Member Author

LOL, and now it's back to;

___________ ContainerCollectionTest.test_run_with_networking_config ____________
tests/integration/models_containers_test.py:138: in test_run_with_networking_config
    assert attrs['NetworkSettings']['Networks'][net_name]['DNSNames'] \
E   AssertionError: assert None == ['hello', '34fe1fead4b8']

Is there some race condition? Or did I just broke it again? (the "expected" vs "actual" part is also confusing me for sure here 😂 )

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thaJeztah
thaJeztah force-pushed the bump_engine_versions branch 2 times, most recently from a94f0ac to 2722873 Compare May 22, 2024 16:21
@milas

milas commented May 22, 2024

Copy link
Copy Markdown
Contributor

Unfortunately, I don't actually know anything about version negotiation in the Python code.

However, I would imagine it's mostly only ever been exercised in the other direction, e.g. to avoid sending a newly added field/query param to an older daemon.

The test logic might also be more for broad test suite compatibility rather than comprehensive matrix coverage.

(That is, I'm suggesting it's not unreasonable to be somewhat suspicious of both the library code & tests in this regard.)

krissetto reacted with laugh emoji
All reactions
  • 😄 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thaJeztah

thaJeztah commented May 22, 2024

Copy link
Copy Markdown
Member Author

Oh! Looks like it's green now! Guess it's time for me to squash commits, and to discuss if these changes are all correct with the networking folks 🥹

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thaJeztah
thaJeztah force-pushed the bump_engine_versions branch from 2722873 to 9f8175e Compare May 22, 2024 20:10
@felixfontein felixfontein mentioned this pull request May 23, 2024
Added 7.1.0 changelog #3262
Merged
thaJeztah
thaJeztah commented May 23, 2024
View reviewed changes
Comment thread tests/integration/models_containers_test.py
Comment on lines +193 to 197
# 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)

@thaJeztah thaJeztah May 23, 2024

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

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"
    ]
  }
}

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@thaJeztah
Bump default API version to 1.45 (Moby 26.0/26.1)
e47e966
- Update API version to the latest maintained release.
0 Adjust tests for API 1.45

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah
thaJeztah force-pushed the bump_engine_versions branch from 9f8175e to e47e966 Compare October 27, 2024 16:03
@thaJeztah thaJeztah self-assigned this Oct 27, 2024
@thaJeztah
thaJeztah merged commit bb0edd1 into docker:main Oct 27, 2024
@thaJeztah
thaJeztah deleted the bump_engine_versions branch October 27, 2024 16:09
mergify Bot added a commit to ArcadeData/arcadedb that referenced this pull request Jul 12, 2026
@mergify
chore(deps): update docker requirement from >=7.1.0 to >=7.2.0 in /e2…
698baf0
…e-python [skip ci]

Updates the requirements on [docker](https://github.com/docker/docker-py) to permit the latest version.
Release notes

*Sourced from [docker's releases](https://github.com/docker/docker-py/releases).*

> 7.2.0
> -----
>
> Upgrade Notes
> -------------
>
> * `docker.from_env()` now honors the active Docker CLI context when `DOCKER_HOST` is not set.
>   + This means the client may connect to the daemon selected by `DOCKER_CONTEXT` or the current context in `~/.docker/config.json`, matching Docker CLI behavior more closely.
>   + If your application relied on the previous default connection behavior, set `DOCKER_HOST` explicitly, set `DOCKER_CONTEXT=default`, or pass `use_context=False` to `DockerClient.from_env()`.
> * Added `docker.from_context()` / `DockerClient.from_context()` for explicitly creating a client from a Docker CLI context.
>
> Features
> --------
>
> * Added support for Docker contexts when creating the default client
> * Added subpath support for volumes
>
> Bugfixes
> --------
>
> * Fixed `exec_run` documentation for the `stream` parameter
> * Fixed image loading to avoid depending on the deprecated `JSONMessage.error` field
> * Preserved the rotated unlock key in swarm integration tests
> * Fixed SSL certificate generation in tests
> * Fixed IPv6 integration tests by explicitly enabling IPv6 where required
>
> Miscellaneous
> -------------
>
> * Updated tests for newer Docker Engine behavior
> * CI and build updates
>
> What's Changed
> --------------
>
> * tests/exec: expect 127 exit code for missing executable by [`@​laurazard`](https://github.com/laurazard) in [docker/docker-py#3290](https://redirect.github.com/docker/docker-py/pull/3290)
> * fixing doc for stream param in exec\_run by [`@​yasonk`](https://github.com/yasonk) in [docker/docker-py#3292](https://redirect.github.com/docker/docker-py/pull/3292)
> * Bump default API version to 1.45 (Moby 26.0/26.1) by [`@​thaJeztah`](https://github.com/thaJeztah) in [docker/docker-py#3261](https://redirect.github.com/docker/docker-py/pull/3261)
> * Set a dummy-version if none set, and remove unused APT\_MIRROR build-arg by [`@​thaJeztah`](https://github.com/thaJeztah) in [docker/docker-py#3267](https://redirect.github.com/docker/docker-py/pull/3267)
> * test\_service\_logs: stop testing experimental versions by [`@​thaJeztah`](https://github.com/thaJeztah) in [docker/docker-py#2442](https://redirect.github.com/docker/docker-py/pull/2442)
> * Makefile: fix circular reference for integration-dind by [`@​thaJeztah`](https://github.com/thaJeztah) in [docker/docker-py#3297](https://redirect.github.com/docker/docker-py/pull/3297)
> * image load: don't depend on deprecated JSONMessage.error field by [`@​thaJeztah`](https://github.com/thaJeztah) in [docker/docker-py#3307](https://redirect.github.com/docker/docker-py/pull/3307)
> * integration: test\_create\_volume\_invalid\_driver allow either 400 or 404 by [`@​thaJeztah`](https://github.com/thaJeztah) in [docker/docker-py#3296](https://redirect.github.com/docker/docker-py/pull/3296)
> * integration: adjust tests for omitted "OnBuild" by [`@​thaJeztah`](https://github.com/thaJeztah) in [docker/docker-py#3336](https://redirect.github.com/docker/docker-py/pull/3336)
> * Implement Subpath Support for Volumes in Docker-Py ([#3243](https://redirect.github.com/docker/docker-py/issues/3243)) by [`@​Khushiyant`](https://github.com/Khushiyant) in [docker/docker-py#3270](https://redirect.github.com/docker/docker-py/pull/3270)
> * tests: fix ssl generation by [`@​thaJeztah`](https://github.com/thaJeztah) in [docker/docker-py#3365](https://redirect.github.com/docker/docker-py/pull/3365)
> * test/integration: don't check for deprecated Networks field by [`@​thaJeztah`](https://github.com/thaJeztah) in [docker/docker-py#3362](https://redirect.github.com/docker/docker-py/pull/3362)
> * test: Skip from\_env\_unix tests if DOCKER\_HOST is network socket by [`@​ricardobranco777`](https://github.com/ricardobranco777) in [docker/docker-py#3366](https://redirect.github.com/docker/docker-py/pull/3366)
> * test\_connect\_with\_ipv6\_address: enable IPv6 by [`@​robmry`](https://github.com/robmry) in [docker/docker-py#3372](https://redirect.github.com/docker/docker-py/pull/3372)
> * test\_create\_with\_ipv6\_address: enable IPv6 by [`@​robmry`](https://github.com/robmry) in [docker/docker-py#3373](https://redirect.github.com/docker/docker-py/pull/3373)
> * tests: Migrate off gpg2 and regenerate key ed25519 by [`@​vvoland`](https://github.com/vvoland) in [docker/docker-py#3399](https://redirect.github.com/docker/docker-py/pull/3399)
> * gha: Pin to digests by [`@​vvoland`](https://github.com/vvoland) in [docker/docker-py#3408](https://redirect.github.com/docker/docker-py/pull/3408)
> * Fix integration tests on non-amd64 hosts and add ARM64 CI by [`@​vvoland`](https://github.com/vvoland) in [docker/docker-py#3407](https://redirect.github.com/docker/docker-py/pull/3407)
> * integration/swarm: Preserve rotated unlock key by [`@​vvoland`](https://github.com/vvoland) in [docker/docker-py#3410](https://redirect.github.com/docker/docker-py/pull/3410)
> * [DKP-2535] Honour context if present for default client, add contexts support by [`@​ebriney`](https://github.com/ebriney) in [docker/docker-py#3401](https://redirect.github.com/docker/docker-py/pull/3401)
> * docs: 7.2.0 changelog by [`@​vvoland`](https://github.com/vvoland) in [docker/docker-py#3415](https://redirect.github.com/docker/docker-py/pull/3415)
>
> New Contributors
> ----------------
>
> * [`@​laurazard`](https://github.com/laurazard) made their first contribution in [docker/docker-py#3290](https://redirect.github.com/docker/docker-py/pull/3290)
> * [`@​yasonk`](https://github.com/yasonk) made their first contribution in [docker/docker-py#3292](https://redirect.github.com/docker/docker-py/pull/3292)
> * [`@​ricardobranco777`](https://github.com/ricardobranco777) made their first contribution in [docker/docker-py#3366](https://redirect.github.com/docker/docker-py/pull/3366)

... (truncated)


Commits

* [`5ad5327`](docker/docker-py@5ad5327) Merge pull request [#3415](https://redirect.github.com/docker/docker-py/issues/3415) from vvoland/update-changelog
* [`d242230`](docker/docker-py@d242230) docs: 7.2.0 changelog
* [`ba01cc7`](docker/docker-py@ba01cc7) Merge pull request [#3401](https://redirect.github.com/docker/docker-py/issues/3401) from ebriney/client-from-context
* [`ae5dfe9`](docker/docker-py@ae5dfe9) Merge pull request [#3410](https://redirect.github.com/docker/docker-py/issues/3410) from vvoland/fix-flaky
* [`aa99999`](docker/docker-py@aa99999) integration/swarm: Preserve rotated unlock key
* [`059d371`](docker/docker-py@059d371) Merge pull request [#3407](https://redirect.github.com/docker/docker-py/issues/3407) from vvoland/fix-arm64
* [`9b4b9b8`](docker/docker-py@9b4b9b8) gha: Add arm64 integration CI
* [`9e9f8ff`](docker/docker-py@9e9f8ff) Skip tests incompatible with host architecture
* [`e0542d9`](docker/docker-py@e0542d9) Merge pull request [#3408](https://redirect.github.com/docker/docker-py/issues/3408) from vvoland/gha-pin
* [`578a11d`](docker/docker-py@578a11d) gha: Pin to digests
* Additional commits viewable in [compare view](docker/docker-py@7.1.0...7.2.0)
  
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
  
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot show  ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@krissetto krissetto krissetto approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@thaJeztah thaJeztah

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@thaJeztah @krissetto @milas
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.