Skip to content

Fix test logs

Ahmed Ilyas requested to merge fix-tests-logs into develop

We encountered issues in tests with the newer version of pymongo, as seen in the logs (https://gitlab.mpcdf.mpg.de/nomad-lab/nomad-FAIR/-/jobs/2952628):

Message: <pymongo.logger.LogMessage object at 0x7faf2d7c49a0>
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/logging/__init__.py", line 1110, in emit
    msg = self.format(record)
          ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/logging/__init__.py", line 953, in format
    return fmt.format(record)
           ^^^^^^^^^^^^^^^^^^
  File "/builds/nomad-lab/nomad-FAIR/nomad/utils/structlogging.py", line 112, in format
    'event': structlog['event'],
             ~~~~~~~~~^^^^^^^^^
KeyError: 'event'
Call stack:

To resolve this we are downgrading pymongo to the version previously used in nomad.

Edited by Ahmed Ilyas

Merge request reports