Project

Profile

Help

Issue #3852

Pulp3 traceback when listing a task

Added by bmbouter over 1 year ago. Updated 6 months ago.

Status:
MODIFIED
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
Severity:
2. Medium
Version:
Platform Release:
Blocks Release:
OS:
Backwards Incompatible:
No
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:

Description

HEAD of pulp/pulp and pulp/pulp_file are 9bfc50d90 and 552e282 respectively.

Create a repo, create a remote, sync the repo using the remote, then view the sync task and you'll see an exception:

Internal Server Error: /pulp/api/v3/tasks/29565c4d-a408-472c-8da1-3cded5414fde/
Traceback (most recent call last):
  File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/django/core/handlers/exception.py", line 35, in inner
    response = get_response(request)
  File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/django/core/handlers/base.py", line 128, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/django/core/handlers/base.py", line 126, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/rest_framework/viewsets.py", line 103, in view
    return self.dispatch(request, *args, **kwargs)
  File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/rest_framework/views.py", line 483, in dispatch
    response = self.handle_exception(exc)
  File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/rest_framework/views.py", line 443, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/rest_framework/views.py", line 480, in dispatch
    response = handler(request, *args, **kwargs)
  File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/rest_framework/mixins.py", line 56, in retrieve
    instance = self.get_object()
  File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/rest_framework/generics.py", line 85, in get_object
    queryset = self.filter_queryset(self.get_queryset())
  File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/rest_framework/generics.py", line 152, in filter_queryset
    queryset = backend().filter_queryset(self.request, queryset, self)
  File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/django_filters/rest_framework/backends.py", line 94, in filter_queryset
    if not filterset.is_valid() and self.raise_exception:
  File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/django_filters/filterset.py", line 206, in is_valid
    return self.is_bound and self.form.is_valid()
  File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/django_filters/rest_framework/filterset.py", line 24, in form
    form = super().form
  File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/django_filters/filterset.py", line 258, in form
    Form = self.get_form_class()
  File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/django_filters/filterset.py", line 250, in get_form_class
    for name, filter_ in self.filters.items()])
  File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/django_filters/filterset.py", line 250, in <listcomp>
    for name, filter_ in self.filters.items()])
  File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/django_filters/filters.py", line 138, in field
    self._field = self.field_class(label=self.label, **field_kwargs)
  File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/django/forms/fields.py", line 374, in __init__
    super().__init__(**kwargs)
TypeError: __init__() got an unexpected keyword argument 'name'

To reproduce use:

http POST http://localhost:8000/pulp/api/v3/repositories/ name=foo

export REPO_HREF=$(http :8000/pulp/api/v3/repositories/ | jq -r '.results[] | select(.name == "foo") | ._href')

# Create a remote, 'bar'

http POST http://localhost:8000/pulp/api/v3/remotes/file/ name='bar' url='file:///home/vagrant/devel/file/PULP_MANIFEST'

export REMOTE_HREF=$(http :8000/pulp/api/v3/remotes/file/ | jq -r '.results[] | select(.name == "bar") | ._href')

# Sync 'foo' using 'bar'

http POST $REMOTE_HREF'sync/' repository=$REPO_HREF

# view the task status

Associated revisions

History

#1 Updated by dkliban@redhat.com over 1 year ago

I was not able to reproduce. I checked out the same commits for pulp and pulp_file. The sync task completes successfully.

#2 Updated by daviddavis over 1 year ago

I was able to reproduce this. It looks like the cause is the new version of django-filter (2.0.0).

#3 Updated by daviddavis over 1 year ago

  • Status changed from NEW to POST
  • Assignee set to daviddavis

#4 Updated by daviddavis over 1 year ago

  • Status changed from POST to MODIFIED

#5 Updated by daviddavis 6 months ago

  • Sprint/Milestone set to 3.0

#6 Updated by bmbouter 6 months ago

  • Tags deleted (Pulp 3)

Please register to edit this issue

Also available in: Atom PDF