Skip to content

etl/ci-quality: fix duration checks

We can't compare queued and start times if the latter is not available. Add a check for this, otherwise we will get:

Error: unsupported operand type(s) for -: 'NoneType' and
'datetime.timedelta' (<ProjectPipelineJob id:43533384>, 'mesa/mesa')
Traceback (most recent call last):
  File
  "/var/home/guilherme/projects/goo0026/mesa-performance-tracking/./etl/ci-quality-stats.py",
line 281, in wrapper_thread func(*args) File
  "/var/home/guilherme/projects/goo0026/mesa-performance-tracking/./etl/ci-quality-stats.py",
line 227, in populate_influxdb_points_from_jobs (st -
  timedelta(seconds=job.queued_duration)).isoformat() TypeError:
unsupported operand type(s) for -: 'NoneType' and 'datetime.timedelta'

Which will kill the threads and skip some data points.

Merge request reports

Loading