Uploaded image for project: 'Motor'
  1. Motor
  2. MOTOR-1218

Investigate & Report: AIOHTTP 3.8.6 failures against our motor tests

    • Type: Icon: Build Failure Build Failure
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.4
    • Affects Version/s: None
    • Component/s: None
    • None

      Detailed steps to reproduce the problem?

      Task: https://spruce.mongodb.com/task/motor_main__ssl~nossl_tox_env~test_pymongo_latest_os~rhel84_test_6.0_standalone_8f71800c4a891ed11b8f70efb3116ecc3d50db50_23_11_08_16_13_38/tests?execution=0&sortBy=STATUS&sortDir=ASC

      Include full traceback, if possible

       [2023/11/08 11:25:53.741] FAILURE: aiohttp.client_exceptions.ClientResponseError: 400, message="Expected HTTP/:\n\n  b'0'\n    ^", url=URL('http://localhost:8088/fs/foo') ()
       [2023/11/08 11:25:53.741] self = <ClientResponse(http://localhost:8088/fs/foo) [None None]>
       [2023/11/08 11:25:53.741] None
       [2023/11/08 11:25:53.741] connection = Connection<ConnectionKey(host='localhost', port=8088, is_ssl=False, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=None)>
       [2023/11/08 11:25:53.741]     async def start(self, connection: "Connection") -> "ClientResponse":
       [2023/11/08 11:25:53.741]         """Start response processing."""
       [2023/11/08 11:25:53.741]         self._closed = False
       [2023/11/08 11:25:53.741]         self._protocol = connection.protocol
       [2023/11/08 11:25:53.741]         self._connection = connection
       [2023/11/08 11:25:53.741] 
       [2023/11/08 11:25:53.741]         with self._timer:
       [2023/11/08 11:25:53.741]             while True:
       [2023/11/08 11:25:53.741]                 # read response
       [2023/11/08 11:25:53.741]                 try:
       [2023/11/08 11:25:53.741]                     protocol = self._protocol
       [2023/11/08 11:25:53.741] >                   message, payload = await protocol.read()  # type: ignore[union-attr]
       [2023/11/08 11:25:53.741] .tox/test-pymongo-latest/lib/python3.7/site-packages/aiohttp/client_reqrep.py:905:
       [2023/11/08 11:25:53.741] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
       [2023/11/08 11:25:53.741] .tox/test-pymongo-latest/lib/python3.7/site-packages/aiohttp/streams.py:616: in read
       [2023/11/08 11:25:53.741]     await self._waiter
       [2023/11/08 11:25:53.741] .tox/test-pymongo-latest/lib/python3.7/site-packages/aiohttp/client_proto.py:213: in data_received
       [2023/11/08 11:25:53.741]     messages, upgraded, tail = self._parser.feed_data(data)
       [2023/11/08 11:25:53.741] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
       [2023/11/08 11:25:53.741] >   ???
       [2023/11/08 11:25:53.741] E   aiohttp.http_exceptions.BadHttpMessage: 400, message:
       [2023/11/08 11:25:53.741] E     Expected HTTP/:
       [2023/11/08 11:25:53.741] E
       [2023/11/08 11:25:53.741] E       b'0'
       [2023/11/08 11:25:53.741] E         ^
       [2023/11/08 11:25:53.741] aiohttp/_http_parser.pyx:557: BadHttpMessage
       [2023/11/08 11:25:53.741] The above exception was the direct cause of the following exception:
       [2023/11/08 11:25:53.741] self = <test.asyncio_tests.test_aiohttp_gridfs.AIOHTTPGridFSHandlerTest testMethod=test_basic>
       [2023/11/08 11:25:53.741]     @asyncio_test
       [2023/11/08 11:25:53.741]     async def test_basic(self):
       [2023/11/08 11:25:53.741]         await self.start_app()
       [2023/11/08 11:25:53.741]         # First request
       [2023/11/08 11:25:53.741]         response = await self.get("/fs/foo")
       [2023/11/08 11:25:53.741] 
       [2023/11/08 11:25:53.741]         self.assertEqual(200, response.status)
       [2023/11/08 11:25:53.741]         self.assertEqual(self.contents, (await response.read()))
       [2023/11/08 11:25:53.741]         self.assertEqual(len(self.contents), int(response.headers["Content-Length"]))
       [2023/11/08 11:25:53.741]         self.assertEqual("my type", response.headers["Content-Type"])
       [2023/11/08 11:25:53.741]         self.assertEqual("public", response.headers["Cache-Control"])
       [2023/11/08 11:25:53.741]         self.assertTrue("Expires" not in response.headers)
       [2023/11/08 11:25:53.741] 
       [2023/11/08 11:25:53.741]         etag = response.headers["Etag"]
       [2023/11/08 11:25:53.741]         last_mod_dt = parse_date(response.headers["Last-Modified"])
       [2023/11/08 11:25:53.741]         self.assertEqual(self.contents_hash, etag.strip('"'))
       [2023/11/08 11:25:53.741]         self.assertTrue(self.put_start <= last_mod_dt <= self.put_end)
       [2023/11/08 11:25:53.741] 
       [2023/11/08 11:25:53.741]         # Now check we get 304 NOT MODIFIED responses as appropriate
       [2023/11/08 11:25:53.741]         for ims_value in (last_mod_dt, last_mod_dt + datetime.timedelta(seconds=1)):
       [2023/11/08 11:25:53.741] >           response = await self.get("/fs/foo", if_modified_since=ims_value)
       [2023/11/08 11:25:53.741] test/asyncio_tests/test_aiohttp_gridfs.py:149:
       [2023/11/08 11:25:53.741] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
       [2023/11/08 11:25:53.741] test/asyncio_tests/test_aiohttp_gridfs.py:107: in request
       [2023/11/08 11:25:53.741]     resp = await method("http://localhost:8088%s" % path, headers=headers)
       [2023/11/08 11:25:53.741] .tox/test-pymongo-latest/lib/python3.7/site-packages/aiohttp/client.py:586: in _request
       [2023/11/08 11:25:53.741]     await resp.start(conn)
       [2023/11/08 11:25:53.741] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
       [2023/11/08 11:25:53.741] self = <ClientResponse(http://localhost:8088/fs/foo) [None None]>
       [2023/11/08 11:25:53.741] None
       [2023/11/08 11:25:53.741] connection = Connection<ConnectionKey(host='localhost', port=8088, is_ssl=False, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=None)>
       [2023/11/08 11:25:53.741]     async def start(self, connection: "Connection") -> "ClientResponse":
       [2023/11/08 11:25:53.741]         """Start response processing."""
       [2023/11/08 11:25:53.741]         self._closed = False
       [2023/11/08 11:25:53.741]         self._protocol = connection.protocol
       [2023/11/08 11:25:53.741]         self._connection = connection
       [2023/11/08 11:25:53.741] 
       [2023/11/08 11:25:53.741]         with self._timer:
       [2023/11/08 11:25:53.741]             while True:
       [2023/11/08 11:25:53.741]                 # read response
       [2023/11/08 11:25:53.741]                 try:
       [2023/11/08 11:25:53.741]                     protocol = self._protocol
       [2023/11/08 11:25:53.741]                     message, payload = await protocol.read()  # type: ignore[union-attr]
       [2023/11/08 11:25:53.741]                 except http.HttpProcessingError as exc:
       [2023/11/08 11:25:53.741]                     raise ClientResponseError(
       [2023/11/08 11:25:53.741]                         self.request_info,
       [2023/11/08 11:25:53.741]                         self.history,
       [2023/11/08 11:25:53.741]                         status=exc.code,
       [2023/11/08 11:25:53.741]                         message=exc.message,
       [2023/11/08 11:25:53.741]                         headers=exc.headers,
       [2023/11/08 11:25:53.741] >                   ) from exc
       [2023/11/08 11:25:53.741] E                   aiohttp.client_exceptions.ClientResponseError: 400, message="Expected HTTP/:\n\n  b'0'\n    ^", url=URL('http://localhost:8088/fs/foo')
       [2023/11/08 11:25:53.741] .tox/test-pymongo-latest/lib/python3.7/site-packages/aiohttp/client_reqrep.py:913: ClientResponseError
       

      Definition of done: what must be done to consider the task complete?

      Run motor tests using pinned version of aiohttp 3.8.5. If this version passes tests, we then need to file a bug against aiohttp that 3.8.6 introduced a breaking change.

            Assignee:
            jib.adegunloye@mongodb.com Jib Adegunloye
            Reporter:
            jib.adegunloye@mongodb.com Jib Adegunloye
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: