Project

Profile

Help

Issue #8781

/pulp/api/v3/ throws a 500

Added by newswangerd 5 months ago. Updated 5 months ago.

Status:
CLOSED - WORKSFORME
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

It seems like this should be a 404, instead of creating a stack trace.

api_1               | KeyError: 'base_path'
api_1               | pulp [None]: django.request:ERROR: Internal Server Error: /pulp/api/v3/
api_1               | Traceback (most recent call last):
api_1               |   File "/venv/lib64/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
api_1               |     response = get_response(request)
api_1               |   File "/venv/lib64/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response
api_1               |     response = self.process_exception_by_middleware(e, request)
api_1               |   File "/venv/lib64/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response
api_1               |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
api_1               |   File "/venv/lib64/python3.6/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
api_1               |     return view_func(*args, **kwargs)
api_1               |   File "/venv/lib64/python3.6/site-packages/django/views/generic/base.py", line 71, in view
api_1               |     return self.dispatch(request, *args, **kwargs)
api_1               |   File "/venv/lib64/python3.6/site-packages/rest_framework/views.py", line 509, in dispatch
api_1               |     response = self.handle_exception(exc)
api_1               |   File "/venv/lib64/python3.6/site-packages/rest_framework/schemas/views.py", line 48, in handle_exception
api_1               |     return super().handle_exception(exc)
api_1               |   File "/venv/lib64/python3.6/site-packages/rest_framework/views.py", line 469, in handle_exception
api_1               |     self.raise_uncaught_exception(exc)
api_1               |   File "/venv/lib64/python3.6/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
api_1               |     raise exc
api_1               |   File "/venv/lib64/python3.6/site-packages/rest_framework/views.py", line 506, in dispatch
api_1               |     response = handler(request, *args, **kwargs)
api_1               |   File "/venv/lib64/python3.6/site-packages/rest_framework/schemas/views.py", line 37, in get
api_1               |     schema = self.schema_generator.get_schema(request, self.public)
api_1               |   File "/venv/lib64/python3.6/site-packages/pulpcore/openapi/__init__.py", line 438, in get_schema
api_1               |     paths=self.parse(request, public),
api_1               |   File "/venv/lib64/python3.6/site-packages/pulpcore/openapi/__init__.py", line 377, in parse
api_1               |     if not self.has_view_permissions(path, method, view):
api_1               |   File "/venv/lib64/python3.6/site-packages/rest_framework/schemas/generators.py", line 236, in has_view_permissions
api_1               |     view.check_permissions(view.request)
api_1               |   File "/venv/lib64/python3.6/site-packages/rest_framework/views.py", line 332, in check_permissions
api_1               |     if not permission.has_permission(request, self):
api_1               |   File "/venv/lib64/python3.6/site-packages/rest_access_policy/access_policy.py", line 26, in has_permission
api_1               |     return self._evaluate_statements(statements, request, view, action)
api_1               |   File "/venv/lib64/python3.6/site-packages/rest_access_policy/access_policy.py", line 63, in _evaluate_statements
api_1               |     request, view, action, matched
api_1               |   File "/venv/lib64/python3.6/site-packages/rest_access_policy/access_policy.py", line 177, in _get_statements_matching_context_conditions
api_1               |     passed = bool(boolExpr.parseString(condition)[0])
api_1               |   File "/venv/lib64/python3.6/site-packages/pyparsing.py", line 1943, in parseString
api_1               |     loc, tokens = self._parse(instring, 0)
api_1               |   File "/venv/lib64/python3.6/site-packages/pyparsing.py", line 1683, in _parseNoCache
api_1               |     loc, tokens = self.parseImpl(instring, preloc, doActions)
api_1               |   File "/venv/lib64/python3.6/site-packages/pyparsing.py", line 4462, in parseImpl
api_1               |     return self.expr._parse(instring, loc, doActions, callPreParse=False)
api_1               |   File "/venv/lib64/python3.6/site-packages/pyparsing.py", line 1683, in _parseNoCache
api_1               |     loc, tokens = self.parseImpl(instring, preloc, doActions)
api_1               |   File "/venv/lib64/python3.6/site-packages/pyparsing.py", line 4462, in parseImpl
api_1               |     return self.expr._parse(instring, loc, doActions, callPreParse=False)
api_1               |   File "/venv/lib64/python3.6/site-packages/pyparsing.py", line 1683, in _parseNoCache
api_1               |     loc, tokens = self.parseImpl(instring, preloc, doActions)
api_1               |   File "/venv/lib64/python3.6/site-packages/pyparsing.py", line 4254, in parseImpl
api_1               |     ret = e._parse(instring, loc, doActions)
api_1               |   File "/venv/lib64/python3.6/site-packages/pyparsing.py", line 1683, in _parseNoCache
api_1               |     loc, tokens = self.parseImpl(instring, preloc, doActions)
api_1               |   File "/venv/lib64/python3.6/site-packages/pyparsing.py", line 4462, in parseImpl
api_1               |     return self.expr._parse(instring, loc, doActions, callPreParse=False)
api_1               |   File "/venv/lib64/python3.6/site-packages/pyparsing.py", line 1683, in _parseNoCache
api_1               |     loc, tokens = self.parseImpl(instring, preloc, doActions)
api_1               |   File "/venv/lib64/python3.6/site-packages/pyparsing.py", line 4254, in parseImpl
api_1               |     ret = e._parse(instring, loc, doActions)
api_1               |   File "/venv/lib64/python3.6/site-packages/pyparsing.py", line 1683, in _parseNoCache
api_1               |     loc, tokens = self.parseImpl(instring, preloc, doActions)
api_1               |   File "/venv/lib64/python3.6/site-packages/pyparsing.py", line 4462, in parseImpl
api_1               |     return self.expr._parse(instring, loc, doActions, callPreParse=False)
api_1               |   File "/venv/lib64/python3.6/site-packages/pyparsing.py", line 1683, in _parseNoCache
api_1               |     loc, tokens = self.parseImpl(instring, preloc, doActions)
api_1               |   File "/venv/lib64/python3.6/site-packages/pyparsing.py", line 4254, in parseImpl
api_1               |     ret = e._parse(instring, loc, doActions)
api_1               |   File "/venv/lib64/python3.6/site-packages/pyparsing.py", line 1716, in _parseNoCache
api_1               |     tokens = fn(instring, tokensStart, retTokens)
api_1               |   File "/venv/lib64/python3.6/site-packages/pyparsing.py", line 1316, in wrapper
api_1               |     ret = func(*args[limit[0]:])
api_1               |   File "/venv/lib64/python3.6/site-packages/rest_access_policy/parsing.py", line 13, in __init__
api_1               |     self.value = self.check_condition_fn(t[0])
api_1               |   File "/venv/lib64/python3.6/site-packages/rest_access_policy/access_policy.py", line 164, in <lambda>
api_1               |     cond, request, view, action
api_1               |   File "/venv/lib64/python3.6/site-packages/rest_access_policy/access_policy.py", line 201, in _check_condition
api_1               |     result = method(request, view, action, arg)
api_1               |   File "/src/galaxy_ng/galaxy_ng/app/access_control/access_policy.py", line 155, in has_container_namespace_perms
api_1               |     readme = view.get_object()
api_1               |   File "/src/galaxy_ng/galaxy_ng/app/api/ui/viewsets/execution_environment.py", line 211, in get_object
api_1               |     distro = self.get_distro()
api_1               |   File "/src/galaxy_ng/galaxy_ng/app/api/ui/viewsets/execution_environment.py", line 97, in get_distro
api_1               |     models.ContainerDistribution, base_path=self.kwargs["base_path"])
api_1               | KeyError: 'base_path'

History

#1 Updated by daviddavis 5 months ago

The endpoint works for me: I get back the schema in yaml format. The backtrace looks like it's hitting something in galaxy_ng, which I don't have installed and may explain why it's working for me.

#2 Updated by fao89 5 months ago

#3 Updated by daviddavis 5 months ago

  • Status changed from NEW to CLOSED - WORKSFORME

Please register to edit this issue

Also available in: Atom PDF