Project

Profile

Help

Issue #3852

closed

Pulp3 traceback when listing a task

Added by bmbouter over 6 years ago. Updated about 5 years ago.

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

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
Actions #1

Updated by dkliban@redhat.com over 6 years ago

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

Actions #2

Updated by daviddavis over 6 years ago

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

Actions #3

Updated by daviddavis over 6 years ago

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

Added by daviddavis over 6 years ago

Revision 6411f8a3 | View on GitHub

Update code for new release of django-filter 2.0

fixes #3852 https://pulp.plan.io/issues/3852

Required PR: https://github.com/PulpQE/pulp-smash/pull/1105

Added by daviddavis over 6 years ago

Revision 6411f8a3 | View on GitHub

Update code for new release of django-filter 2.0

fixes #3852 https://pulp.plan.io/issues/3852

Required PR: https://github.com/PulpQE/pulp-smash/pull/1105

Actions #4

Updated by daviddavis over 6 years ago

  • Status changed from POST to MODIFIED
Actions #5

Updated by daviddavis over 5 years ago

  • Sprint/Milestone set to 3.0.0
Actions #6

Updated by bmbouter over 5 years ago

  • Tags deleted (Pulp 3)
Actions #7

Updated by bmbouter about 5 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF