Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-2537

Fix benchmark failures on Python 3

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.0
    • None
    • None

    Description

      Our benchmarks are failing after the change from "python2.7" to "python3" in PYTHON-2133:

       [2021/01/21 19:47:04.112] Running TestGridFsUpload. MEDIAN=0.24435001611709595
       [2021/01/21 19:52:21.776] .........EFtest/performance/perf_test.py:114: UserWarning: Test timed out, completed 39 iterations.
       [2021/01/21 19:52:21.776]   warnings.warn('Test timed out, completed %s iterations.' % i)
       [2021/01/21 20:05:36.939] .....test/performance/perf_test.py:114: UserWarning: Test timed out, completed 82 iterations.
       [2021/01/21 20:05:36.939]   warnings.warn('Test timed out, completed %s iterations.' % i)
       [2021/01/21 20:05:36.942] .
       [2021/01/21 20:05:36.942] ======================================================================
       [2021/01/21 20:05:36.942] ERROR: runTest (__main__.TestJsonMultiExport)
       [2021/01/21 20:05:36.942] ----------------------------------------------------------------------
       [2021/01/21 20:05:36.942] multiprocessing.pool.RemoteTraceback:
       [2021/01/21 20:05:36.942] """
       [2021/01/21 20:05:36.942] Traceback (most recent call last):
       [2021/01/21 20:05:36.942]   File "/opt/mongodbtoolchain/revisions/94dac13bc8c0b50beff286acac77adeb2e81761e/stow/python3-v2.Cuo/lib/python3.6/multiprocessing/pool.py", line 119, in worker
       [2021/01/21 20:05:36.942]     result = (True, func(*args, **kwds))
       [2021/01/21 20:05:36.942]   File "/opt/mongodbtoolchain/revisions/94dac13bc8c0b50beff286acac77adeb2e81761e/stow/python3-v2.Cuo/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar
       [2021/01/21 20:05:36.942]     return list(map(*args))
       [2021/01/21 20:05:36.942]   File "test/performance/perf_test.py", line 406, in read_json_file
       [2021/01/21 20:05:36.942]     doc in coll.find({'file': filename}, {'_id': False})])
       [2021/01/21 20:05:36.942] TypeError: a bytes-like object is required, not 'str'
       [2021/01/21 20:05:36.942] """
       [2021/01/21 20:05:36.942] The above exception was the direct cause of the following exception:
       [2021/01/21 20:05:36.942] Traceback (most recent call last):
       [2021/01/21 20:05:36.942]   File "test/performance/perf_test.py", line 118, in runTest
       [2021/01/21 20:05:36.942]     self.do_task()
       [2021/01/21 20:05:36.942]   File "test/performance/perf_test.py", line 469, in do_task
       [2021/01/21 20:05:36.942]     mp_map(read_json_file, self.files)
       [2021/01/21 20:05:36.942]   File "test/performance/perf_test.py", line 379, in mp_map
       [2021/01/21 20:05:36.942]     pool.map(map_func, files)
       [2021/01/21 20:05:36.942]   File "/opt/mongodbtoolchain/revisions/94dac13bc8c0b50beff286acac77adeb2e81761e/stow/python3-v2.Cuo/lib/python3.6/multiprocessing/pool.py", line 260, in map
       [2021/01/21 20:05:36.942]     return self._map_async(func, iterable, mapstar, chunksize).get()
       [2021/01/21 20:05:36.942]   File "/opt/mongodbtoolchain/revisions/94dac13bc8c0b50beff286acac77adeb2e81761e/stow/python3-v2.Cuo/lib/python3.6/multiprocessing/pool.py", line 608, in get
       [2021/01/21 20:05:36.942]     raise self._value
       [2021/01/21 20:05:36.942] TypeError: a bytes-like object is required, not 'str'
       [2021/01/21 20:05:36.942] ======================================================================
       [2021/01/21 20:05:36.942] FAIL: runTest (__main__.TestJsonMultiExport)
       [2021/01/21 20:05:36.942] ----------------------------------------------------------------------
       [2021/01/21 20:05:36.942] Traceback (most recent call last):
       [2021/01/21 20:05:36.942]   File "test/performance/perf_test.py", line 472, in tearDown
       [2021/01/21 20:05:36.942]     super(TestJsonMultiExport, self).tearDown()
       [2021/01/21 20:05:36.942]   File "test/performance/perf_test.py", line 81, in tearDown
       [2021/01/21 20:05:36.942]     median = self.percentile(50)
       [2021/01/21 20:05:36.942]   File "test/performance/perf_test.py", line 106, in percentile
       [2021/01/21 20:05:36.942]     self.fail('Test execution failed')
       [2021/01/21 20:05:36.942] AssertionError: Test execution failed
       [2021/01/21 20:05:36.942] ----------------------------------------------------------------------
       [2021/01/21 20:05:36.942] Ran 19 tests in 2265.210s
       [2021/01/21 20:05:36.942] FAILED (failures=1, errors=1)
      

      https://evergreen.mongodb.com/task/mongo_python_driver_perf_perf_tests_perf_4.0_standalone_fb4c20adfaf64fe9b2a5c8a7f84b2a38dc12d6b2_21_01_14_00_30_21

      Attachments

        Activity

          People

            shane.harvey@mongodb.com Shane Harvey
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: