Project

Profile

Help

Issue #5511

Failed Task Returns 500 Error

Added by CodeHeeler over 2 years ago. Updated over 2 years ago.

Status:
CLOSED - WORKSFORME
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 60
Quarter:

Description

If a task completes successfully, it is accessible, but if it fails, it only provides a 500 error

Traceback:

Sep 27 14:33:10 pulp3-source-fedora30.localhost.example.com gunicorn[22136]: pulp: django.request:ERROR: Internal Server Error: /pulp/api/v3/tasks/a475e825-75ac-426e-9f50-69ab735df003/
Sep 27 14:33:10 pulp3-source-fedora30.localhost.example.com gunicorn[22136]: Traceback (most recent call last):
Sep 27 14:33:10 pulp3-source-fedora30.localhost.example.com gunicorn[22136]:   File "/usr/local/lib/pulp/lib64/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
Sep 27 14:33:10 pulp3-source-fedora30.localhost.example.com gunicorn[22136]:     response = get_response(request)
Sep 27 14:33:10 pulp3-source-fedora30.localhost.example.com gunicorn[22136]:   File "/usr/local/lib/pulp/lib64/python3.7/site-packages/django/core/handlers/base.py", line 115, in _get_response
Sep 27 14:33:10 pulp3-source-fedora30.localhost.example.com gunicorn[22136]:     response = self.process_exception_by_middleware(e, request)
Sep 27 14:33:10 pulp3-source-fedora30.localhost.example.com gunicorn[22136]:   File "/usr/local/lib/pulp/lib64/python3.7/site-packages/django/core/handlers/base.py", line 113, in _get_response
Sep 27 14:33:10 pulp3-source-fedora30.localhost.example.com gunicorn[22136]:     response = wrapped_callback(request, *callback_args, **callback_kwargs)
Sep 27 14:33:10 pulp3-source-fedora30.localhost.example.com gunicorn[22136]:   File "/usr/local/lib/pulp/lib64/python3.7/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
Sep 27 14:33:10 pulp3-source-fedora30.localhost.example.com gunicorn[22136]:     return view_func(*args, **kwargs)
Sep 27 14:33:10 pulp3-source-fedora30.localhost.example.com gunicorn[22136]:   File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/viewsets.py", line 114, in view
Sep 27 14:33:10 pulp3-source-fedora30.localhost.example.com gunicorn[22136]:     return self.dispatch(request, *args, **kwargs)
Sep 27 14:33:10 pulp3-source-fedora30.localhost.example.com gunicorn[22136]:   File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/views.py", line 497, in dispatch
Sep 27 14:33:10 pulp3-source-fedora30.localhost.example.com gunicorn[22136]:     response = self.handle_exception(exc)
Sep 27 14:33:10 pulp3-source-fedora30.localhost.example.com gunicorn[22136]:   File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/views.py", line 457, in handle_exception
Sep 27 14:33:10 pulp3-source-fedora30.localhost.example.com gunicorn[22136]:     self.raise_uncaught_exception(exc)
Sep 27 14:33:10 pulp3-source-fedora30.localhost.example.com gunicorn[22136]:   File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/views.py", line 468, in raise_uncaught_exception
Sep 27 14:33:10 pulp3-source-fedora30.localhost.example.com gunicorn[22136]:     raise exc
Sep 27 14:33:10 pulp3-source-fedora30.localhost.example.com gunicorn[22136]:   File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/views.py", line 494, in dispatch
Sep 27 14:33:10 pulp3-source-fedora30.localhost.example.com gunicorn[22136]:     response = handler(request, *args, **kwargs)
Sep 27 14:33:10 pulp3-source-fedora30.localhost.example.com gunicorn[22136]:   File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/mixins.py", line 56, in retrieve
Sep 27 14:33:10 pulp3-source-fedora30.localhost.example.com gunicorn[22136]:     return Response(serializer.data)
Sep 27 14:33:10 pulp3-source-fedora30.localhost.example.com gunicorn[22136]:   File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/serializers.py", line 559, in data
Sep 27 14:33:10 pulp3-source-fedora30.localhost.example.com gunicorn[22136]:     ret = super().data
Sep 27 14:33:10 pulp3-source-fedora30.localhost.example.com gunicorn[22136]:   File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/serializers.py", line 261, in data
Sep 27 14:33:10 pulp3-source-fedora30.localhost.example.com gunicorn[22136]:     self._data = self.to_representation(self.instance)
Sep 27 14:33:11 pulp3-source-fedora30.localhost.example.com gunicorn[22136]:   File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/serializers.py", line 526, in to_representation
Sep 27 14:33:11 pulp3-source-fedora30.localhost.example.com gunicorn[22136]:     ret[field.field_name] = field.to_representation(attribute)
Sep 27 14:33:11 pulp3-source-fedora30.localhost.example.com gunicorn[22136]:   File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/fields.py", line 1721, in to_representation
Sep 27 14:33:11 pulp3-source-fedora30.localhost.example.com gunicorn[22136]:     for key, val in value.items()
Sep 27 14:33:11 pulp3-source-fedora30.localhost.example.com gunicorn[22136]: AttributeError: 'str' object has no attribute 'items'
Sep 27 14:33:11 pulp3-source-fedora30.localhost.example.com gunicorn[22136]: 127.0.0.1 - admin [27/Sep/2019:14:33:10 +0000] "GET /pulp/api/v3/tasks/a475e825-75ac-426e-9f50-69ab735df003/ HTTP/1.1" 500 27 "-" "HTTPie/0.9.4"

History

#1 Updated by daviddavis over 2 years ago

  • Description updated (diff)

#3 Updated by fao89 over 2 years ago

  • Triaged changed from No to Yes
  • Sprint set to Sprint 60

#4 Updated by daviddavis over 2 years ago

Steps to reproduce:

http :/pulp/api/v3/repositories/ name=tester
http :/pulp/api/v3/remotes/file/file/ name=tester url="https://repos.fedorapeople.org/pulp/pulp/fixtures/file-mixed/PULP_MANIFEST"
http :${REMOTE_HREF}/sync/ repository=$REPO_HREF

#5 Updated by daviddavis over 2 years ago

After recreating my database, I wasn't able to reproduce. I think the problem is that some data got migrated over that the serializer couldn't handle. I think we can close this out as we're not supporting migrations from RC release to RC release.

#6 Updated by daviddavis over 2 years ago

  • Status changed from NEW to CLOSED - WORKSFORME

Closing out. If you can reproduce after recreating your database, please reopen.

Also available in: Atom PDF