Skip to content

Work around buggy end_time

Emanuele Aina requested to merge wip/em/workaround-missing-end-time into master

After the update to LAVA 2021.05 the end_time field of the callback data got mis-populated as None. Since it's not a valid date value it ends up causing an exception in the handler:

    lava_end_time         = get_timeobj(job.data['end_time']),
  File "/app/save.py", line 32, in get_timeobj
    return datetime.strptime(time_str_fixed_tz, '%Y-%m-%d %H:%M:%S.%f%z')
  File "/usr/lib/python3.7/_strptime.py", line 577, in _strptime_datetime
    tt, fraction, gmtoff_fraction = _strptime(data_string, format)
  File "/usr/lib/python3.7/_strptime.py", line 359, in _strptime
    (data_string, format))
ValueError: time data 'Nne' does not match format '%Y-%m-%d %H:%M:%S.%f%z'

The issue has bee reported upstream: https://git.lavasoftware.org/lava/lava/-/issues/493

In the meantime, handle the error and carry on so that submitted test results can be stored again.

Edited by Emanuele Aina

Merge request reports