Project

Profile

Help

Issue #8276

0.7.0 V3 collection list endpoint errors when repository is empty

Added by bmbouter 8 months ago. Updated 8 months ago.

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

Description

  1. Create a repository and distribution
  2. Try to GET the collection list endpoint, e.g. /pulp_ansible/galaxy/foo/api/v3/collections/
pulp [d8f15dfe9e274d98a60bcdac824eb502]: django.request:ERROR: Internal Server Error: /pulp_ansible/galaxy/foo/api/v3/collections/
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/lib/python3.6/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/rest_framework/viewsets.py", line 125, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py", line 509, in dispatch
    response = self.handle_exception(exc)
  File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py", line 469, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
    raise exc
  File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py", line 506, in dispatch
    response = handler(request, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/rest_framework/mixins.py", line 42, in list
    serializer = self.get_serializer(page, many=True)
  File "/usr/local/lib/python3.6/site-packages/rest_framework/generics.py", line 109, in get_serializer
    kwargs.setdefault('context', self.get_serializer_context())
  File "/usr/local/lib/python3.6/site-packages/pulp_ansible/app/galaxy/v3/views.py", line 275, in get_serializer_context
    super_data["deprecated_collections"] = self.deprecated_collections_context
AttributeError: 'CollectionViewSet' object has no attribute 'deprecated_collections_context'

Associated revisions

Revision 292d1589 View on GitHub
Added by Fabricio Aguiar 8 months ago

Fix V3 collection list endpoint

https://pulp.plan.io/issues/8276 closes #8276

Revision 9f1d7e0c View on GitHub
Added by Fabricio Aguiar 8 months ago

Fix V3 collection list endpoint

https://pulp.plan.io/issues/8276 closes #8276

(cherry picked from commit 292d158987928a7c2e7f6539dc21fbb147bb253e)

History

#1 Updated by pulpbot 8 months ago

  • Status changed from NEW to POST

#2 Updated by Anonymous 8 months ago

  • Status changed from POST to MODIFIED

#3 Updated by fao89 8 months ago

  • Sprint/Milestone set to 0.7.1

#5 Updated by pulpbot 8 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF