Web app: issue when trying to list save code now requests
The request querying the list of submitted save code now requests now ends up with error 500 in production.
This is the associated stack trace:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/django/core/handlers/exception.py", line 42, in inner
response = get_response(request)
File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python3/dist-packages/swh/web/browse/views/origin_save.py", line 74, in _browse_origin_save_requests_list
save_requests = get_save_origin_requests_from_queryset(save_requests)
File "/usr/lib/python3/dist-packages/swh/web/common/origin_save.py", line 325, in get_save_origin_requests_from_queryset
tasks = scheduler.get_tasks([sor.loading_task_id])
File "/usr/lib/python3/dist-packages/swh/scheduler/api/client.py", line 51, in get_tasks
return self.post('get_tasks', {'task_ids': task_ids})
File "/usr/lib/python3/dist-packages/swh/core/api.py", line 128, in post
return self._decode_response(response)
File "/usr/lib/python3/dist-packages/swh/core/api.py", line 165, in _decode_response
return decode_response(response)
File "/usr/lib/python3/dist-packages/swh/core/serializers.py", line 29, in decode_response
r = msgpack_loads(response.content)
File "/usr/lib/python3/dist-packages/swh/core/serializers.py", line 175, in msgpack_loads
return msgpack.unpackb(data, encoding='utf-8', object_hook=decode_types)
File "msgpack/_unpacker.pyx", line 139, in msgpack._unpacker.unpackb (msgpack/_unpacker.cpp:2068)
File "/usr/lib/python3/dist-packages/swh/core/serializers.py", line 170, in decode_types
return eval(obj[b's'])
TypeError: eval() arg 1 must be a string, bytes or code object
I can not reproduce the issue in my local environment. Any idea what's going on here ?
Migrated from T1281 (view on Phabricator)