prune chokes on invalid JSON / invalid cache data
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lazr.restfulclient |
New
|
Undecided
|
Unassigned |
Bug Description
Traceback (most recent call last):
File "bin/prune", line 61, in <module>
oopstools.
File "/srv/oops.
options.
File "/srv/oops.
lp_project = lp_projects[
File "/srv/oops.
shim_resource.
File "/srv/oops.
representation = simplejson.
File "/srv/oops.
return _default_
File "/srv/oops.
raise JSONDecodeError
simplejson.
We failed to identify the offending input data, but the prune job shouldn't choke on such data but rather handle it gracefully.
Emptying the cache in /home/oops_
Maybe the cache could be cleaned up / invalidated on a regular basis as well.
I think this is a lazr.restfulclient bug. If a cached version of a resource is invalid, we should remove that entry from the cache and try fetching a fresh version.