Skip to content

Conversation

@thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Aug 19, 2022

🤞 hope this is gonna work, because the CLI inside the container is 17.06, and docker/docker-py@cd2c35a changed the Dockerfile we build to depend on BuildKit features (--mount)

testing: update docker-py 6.0.1

release notes: https://github.com/docker/docker-py/releases/tag/6.0.1

full diff: docker/docker-py@5.0.3...6.0.1

testing: update docker-py 6.1.3

full diff: docker/docker-py@6.0.1...6.1.3

- A picture of a cute animal (not mandatory but encouraged)

@thaJeztah
Copy link
Member Author

Yup, this won't work;

[2022-08-19T18:48:46.377Z] Removing intermediate container d740ccf379b1
[2022-08-19T18:48:46.377Z]  ---> 8e295f18f46e
[2022-08-19T18:48:46.377Z] Step 18/24 : COPY requirements.txt /src/requirements.txt
[2022-08-19T18:48:46.377Z]  ---> d8982936ed2c
[2022-08-19T18:48:46.377Z] Step 19/24 : RUN --mount=type=cache,target=/root/.cache/pip     pip install -r requirements.txt
[2022-08-19T18:48:46.377Z] the --mount option requires BuildKit. Refer to https://docs.docker.com/go/buildkit/ to learn how to build images with BuildKit enabled

Perhaps it's time to move the docker-py tests outside of docker-in-docker (perhaps even run them on github actions if we already have code there to spin up the docker daemon)

@thaJeztah thaJeztah marked this pull request as ready for review October 3, 2022 21:25
@thaJeztah thaJeztah requested a review from tianon as a code owner October 3, 2022 21:25
@thaJeztah
Copy link
Member Author

building the docker-py image now happens on GitHub actions, so moving this out of draft 👍

@thaJeztah
Copy link
Member Author

building the docker-py image now happens on GitHub actions, so moving this out of draft 👍

Ah, sorry, I was wrong; while it moved to GitHub actions, we're still building the image docker-in-docker, using the classic builder;

make -o build test-docker-py
...
---> Running in 8b073cc8873c
Removing intermediate container 8b073cc8873c
 ---> 64c612d46f69
Step 18/24 : COPY requirements.txt /src/requirements.txt
 ---> 06e121a60a1a
Step 19/24 : RUN --mount=type=cache,target=/root/.cache/pip     pip install -r requirements.txt
the --mount option requires BuildKit. Refer to https://docs.docker.com/go/buildkit/ to learn how to build images with BuildKit enabled
Error: The operation was canceled.

So still some work needed there

@rumpl rumpl modified the milestones: 24.0.0, v-future Apr 24, 2023
@thaJeztah thaJeztah changed the title testing: update docker-py 6.0.0 testing: update docker-py 6.1.3 Jun 20, 2023
@thaJeztah thaJeztah force-pushed the docker_py_6 branch 2 times, most recently from 6b45532 to 803789c Compare June 20, 2023 09:52
@thaJeztah
Copy link
Member Author

1 Failure (and some XFAIL, but those can probably be ignored)

=================================== FAILURES ===================================
___________ AttachContainerTest.test_run_container_reading_socket_ws ___________
tests/integration/api_container_test.py:1245: in test_run_container_reading_socket_ws
    pty_stdout = self.client.attach_socket(container, opts, ws=True)
docker/utils/decorators.py:19: in wrapped
    return f(self, resource_id, *args, **kwargs)
docker/api/container.py:98: in attach_socket
    return self._attach_websocket(container, params)
docker/utils/decorators.py:19: in wrapped
    return f(self, resource_id, *args, **kwargs)
docker/api/client.py:312: in _attach_websocket
    return self._create_websocket_connection(full_url)
docker/api/client.py:315: in _create_websocket_connection
    return websocket.create_connection(url)
/usr/local/lib/python3.7/site-packages/websocket/_core.py:601: in create_connection
    websock.connect(url, **options)
/usr/local/lib/python3.7/site-packages/websocket/_core.py:245: in connect
    options.pop('socket', None))
/usr/local/lib/python3.7/site-packages/websocket/_http.py:117: in connect
    hostname, port, resource, is_secure = parse_url(url)
/usr/local/lib/python3.7/site-packages/websocket/_url.py:62: in parse_url
    raise ValueError("scheme %s is invalid" % scheme)
E   ValueError: scheme http+docker is invalid
------- generated xml file: /src/bundles/test-docker-py/junit-report.xml -------
=========================== short test summary info ============================
XFAIL tests/integration/api_container_test.py::CreateContainerTest::test_create_with_cpu_rt_options
  CONFIG_RT_GROUP_SCHED isn't enabled
XFAIL tests/integration/api_container_test.py::CreateContainerTest::test_create_with_storage_opt
  Not supported on most drivers
XFAIL tests/integration/api_container_test.py::ContainerTopTest::test_top
  Output of docker top depends on host distro, and is not formalized.
XFAIL tests/integration/api_container_test.py::ContainerTopTest::test_top_with_psargs
  Output of docker top depends on host distro, and is not formalized.
XFAIL tests/integration/api_swarm_test.py::SwarmTest::test_init_swarm_data_path_addr
  Can fail if eth0 has multiple IP addresses
XFAIL tests/integration/api_swarm_test.py::SwarmTest::test_init_swarm_with_log_driver
  This doesn't seem to be taken into account by the engine
SKIPPED [1] tests/integration/api_image_test.py:291: Doesn't work inside a container - FIXME
SKIPPED [1] tests/integration/api_swarm_test.py:30: Test stalls the engine on 1.12.0
= 1 failed, 391 passed, 2 skipped, 1 deselected, 6 xfailed, 3 xpassed in 248.00s (0:04:08) =
sys:1: ResourceWarning: unclosed <socket.socket fd=11, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0, raddr=/go/src/github.com/docker/docker/bundles/test-docker-py/docker.sock>
sys:1: ResourceWarning: unclosed <socket.socket fd=12, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0, raddr=/go/src/github.com/docker/docker/bundles/test-docker-py/docker.sock>
sys:1: ResourceWarning: unclosed <socket.socket fd=13, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0, raddr=/go/src/github.com/docker/docker/bundles/test-docker-py/docker.sock>
sys:1: ResourceWarning: unclosed <socket.socket fd=14, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0, raddr=/go/src/github.com/docker/docker/bundles/test-docker-py/docker.sock>
sys:1: ResourceWarning: unclosed <socket.socket fd=15, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0, raddr=/go/src/github.com/docker/docker/bundles/test-docker-py/docker.sock>
sys:1: ResourceWarning: unclosed <socket.socket fd=16, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0, raddr=/go/src/github.com/docker/docker/bundles/test-docker-py/docker.sock>
Error: The operation was canceled.

@thaJeztah
Copy link
Member Author

Remaining skips need a new release of docker-py;

@thaJeztah thaJeztah added area/ux and removed area/ux labels Aug 29, 2023
@thaJeztah
Copy link
Member Author

Right, so that one failure continues:

___________ AttachContainerTest.test_run_container_reading_socket_ws ___________
tests/integration/api_container_test.py:1245: in test_run_container_reading_socket_ws
    pty_stdout = self.client.attach_socket(container, opts, ws=True)
docker/utils/decorators.py:19: in wrapped
    return f(self, resource_id, *args, **kwargs)
docker/api/container.py:98: in attach_socket
    return self._attach_websocket(container, params)
docker/utils/decorators.py:19: in wrapped
    return f(self, resource_id, *args, **kwargs)
docker/api/client.py:312: in _attach_websocket
    return self._create_websocket_connection(full_url)
docker/api/client.py:315: in _create_websocket_connection
    return websocket.create_connection(url)
/usr/local/lib/python3.7/site-packages/websocket/_core.py:601: in create_connection
    websock.connect(url, **options)
/usr/local/lib/python3.7/site-packages/websocket/_core.py:245: in connect
    options.pop('socket', None))
/usr/local/lib/python3.7/site-packages/websocket/_http.py:117: in connect
    hostname, port, resource, is_secure = parse_url(url)
/usr/local/lib/python3.7/site-packages/websocket/_url.py:62: in parse_url
    raise ValueError("scheme %s is invalid" % scheme)
E   ValueError: scheme http+docker is invalid
------- generated xml file: /src/bundles/test-docker-py/junit-report.xml -------

Hm, right, so error is:

E   ValueError: scheme http+docker is invalid

Our dev-container now has buildx installed, so we're no longer
limited to 17.06.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
release notes: https://github.com/docker/docker-py/releases/tag/6.0.1

full diff: docker/docker-py@5.0.3...6.0.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
…socket_ws

Tests are failing with this error:

    E   ValueError: scheme http+docker is invalid

Which is reported in docker-py in docker/docker-py#1478.
Not sure what changed in the tests, but could be due to updated Python
version or dependencies, but let's skip it for now.

Test failure:

    ___________ AttachContainerTest.test_run_container_reading_socket_ws ___________
    tests/integration/api_container_test.py:1245: in test_run_container_reading_socket_ws
        pty_stdout = self.client.attach_socket(container, opts, ws=True)
    docker/utils/decorators.py:19: in wrapped
        return f(self, resource_id, *args, **kwargs)
    docker/api/container.py:98: in attach_socket
        return self._attach_websocket(container, params)
    docker/utils/decorators.py:19: in wrapped
        return f(self, resource_id, *args, **kwargs)
    docker/api/client.py:312: in _attach_websocket
        return self._create_websocket_connection(full_url)
    docker/api/client.py:315: in _create_websocket_connection
        return websocket.create_connection(url)
    /usr/local/lib/python3.7/site-packages/websocket/_core.py:601: in create_connection
        websock.connect(url, **options)
    /usr/local/lib/python3.7/site-packages/websocket/_core.py:245: in connect
        options.pop('socket', None))
    /usr/local/lib/python3.7/site-packages/websocket/_http.py:117: in connect
        hostname, port, resource, is_secure = parse_url(url)
    /usr/local/lib/python3.7/site-packages/websocket/_url.py:62: in parse_url
        raise ValueError("scheme %s is invalid" % scheme)
    E   ValueError: scheme http+docker is invalid
    ------- generated xml file: /src/bundles/test-docker-py/junit-report.xml -------

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
full diff: docker/docker-py@6.0.1...6.1.3

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
Copy link
Member Author

Itsa greeeeeen ✅ ✅ ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants