Update Docker Compose integration to use v2 CLI and get container name#168
Update Docker Compose integration to use v2 CLI and get container name#168
Conversation
|
@EDITD/platform This PR allows developers using Podman to use Kubetools for development. It was tested by some of the developers already and we didn't stumble upon any issues. |
| import yaml | ||
|
|
||
| from pkg_resources import parse_version | ||
| from packaging.version import parse as parse_version |
There was a problem hiding this comment.
Where is packaging coming from? It's not in setup.py so I guess it's a dep of one of our other deps which over time might not be a safe assumption.
| 'ktd=kubetools.dev.__main__:main', | ||
| ), | ||
| }, | ||
| python_requires='>=3.6', |
There was a problem hiding this comment.
If we're dropping python 3.7 support then shouldn't this be updated?
|
https://edited.atlassian.net/browse/PFM-827 this will break http with |
|
@fmcwalters-edited As I mentioned in my previous comment, we’ve been using it for the past couple of months with Podman without any issues. Also if I remember correctly @svedbg tested it on his machine with docker and it worked. Is it possible someone from platform to test with Docker Desktop if it works or not, as we already moved to Podman? |
|
moving my comment over from the other branch: I'm very happy someone else is interested in modernising kubetools 😄 would love to work together on this if we're able to get past the insecure registry blocker/other blockers. I've been using my own custom version locally for a little while now, that I've shared with other members of the team. I plan to try to test this out with podman - it would be great if we don't run into the same issue that we do with docker/rancher desktop with insecure registries & the underscore/hyphen breaking changes. I do believe that some devs are still using docker desktop, so we should keep this in mind. As @fmcwalters-edited mentioned, I've also been doing some work here on this too 😅 most of these were fairly similar (dropping support for 3.6, 3.7), I tried to minimise the changes I made while still modernising kubetools over a few branches (that I haven't pushed yet):
|
from labels
This pull request introduces several important updates in preparation for version 14.0.0, including support for Docker Compose v2, removal of Python 3.7 support, and modernization of some dependencies and internal APIs. The changes also update the GitHub Actions test matrix and streamline Docker Compose integration.
Key changes:
Docker Compose v2 support and related improvements:
docker composeCLI (instead of the Python module ordocker-compose), enabling support for Docker Compose v2. This includes changing how compose processes are run and how container service names are extracted, ensuring compatibility across Compose versions. [1] [2] [3]docker-compose<2dependency and related comments fromsetup.py, reflecting the move to Compose v2 and the CLI approach.Python version and dependency updates:
Dependency and import modernization:
pkg_resourcesusage withimportlib.metadatafor version retrieval in__init__.py.pkg_resources.parse_versiontopackaging.version.parsefor version parsing inconfig.py.Changelog:
CHANGELOG.mddocumenting Docker Compose v2 support and Python 3.7 deprecation.