Open fsteggink opened 3 years ago
first_run
and last_run
are first and last Run
s over all Resources
. These are used in the overall_status.html
template, e.g. used/included by resources.html
. It appears in top of web-UIs that list Resources, as e.g.
Monitoring Period: 2021-08-23T15:16:07Z - 2021-08-31T10:04:14Z
, basically the time-window for retention days.
The comparison operator <
translates to comparison of the identifier
Column of Run
, but the comparison for last_run
may be wrong: it will render the youngest last_run
of all Resources. Think must be >
. In terms of days that is usually not directly visible in the Monitoring Period.
The thing that is the most striking is that the comparison operator is <
for both the first_run and last_run comparisons. One must be definitely wrong, unless first_run and last_run have different data types, which would be 😱
When trying to come up with a fix for issue #326, I noticed some code in which all kinds of info about resources is gathered in a loop. In this code the first and last runs of all (filtered) resources is determined as well. However, I've noticed that the comparison operator is "less than" in both cased.
See the following code in views.py, function
list_resources
:I've also noticed that, although first_run and last_run are stored in the response object, they don't appear to be used anywhere. This might also be the case for other variables collected in
list_resources
and other functions. Cleaning this up should also improve the performance, as reported in issue #326.