aio-libs / aiodocker

Python Docker API client based on asyncio and aiohttp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Event streaming hangs waiting for newline in Docker Desktop for Mac 2.2.0

bjd183 opened this issue · comments

As currently written, aiodocker expects docker events to be separated by newlines -- jsonstream.py calls response.content.readline(). For reference, docker-py reads chunked data and uses JSONDecoder.raw_decode() in case there are extra characters.

The downsides of this assumption (newline delimiters) are documented in this moby issue (20119).

In any case, Docker Desktop for Mac 2.2.0.0 causes aiodocker to hang waiting for a newline which never occurs even while multiple events are received.

Docker Desktop for Mac 2.1.0.5 works without issue and apparently separates events by newlines.

Python 3.7.5
MacOS 10.15.3
Docker Desktop for Mac 2.2.0
aiodocker 3.6.2