Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2 collection publish API raises exception #1441

Closed
sivel opened this issue May 9, 2023 · 0 comments
Closed

v2 collection publish API raises exception #1441

sivel opened this issue May 9, 2023 · 0 comments

Comments

@sivel
Copy link
Contributor

sivel commented May 9, 2023

Version

pulp-ansible==0.17.0
pulpcore==3.23.3

Using the container from quay.io/pulp/galaxy

Describe the bug
When attempting to publish a collection to the v2 API endpoint /pulp_ansible/galaxy/<distro>/api/v2/collections/ an exception is raised:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/lib/python3.8/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/django/views/generic/base.py", line 70, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/rest_framework/views.py", line 509, in dispatch
    response = self.handle_exception(exc)
  File "/usr/local/lib/python3.8/site-packages/rest_framework/views.py", line 469, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/usr/local/lib/python3.8/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
    raise exc
  File "/usr/local/lib/python3.8/site-packages/rest_framework/views.py", line 506, in dispatch
    response = handler(request, *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/pulp_ansible/app/galaxy/views.py", line 184, in post
    serializer.is_valid(raise_exception=True)
  File "/usr/local/lib/python3.8/site-packages/rest_framework/serializers.py", line 227, in is_valid
    self._validated_data = self.run_validation(self.initial_data)
  File "/usr/local/lib/python3.8/site-packages/rest_framework/serializers.py", line 430, in run_validation
    assert value is not None, '.validate() should return the validated data'
AssertionError: .validate() should return the validated data

To Reproduce
Attempt to publish collection to v2 API explicitly

Expected behavior
No traceback, collection published

Additional context
Add any other context about the problem here. Please provide links to any previous discussions via Discourse or Bugzilla.

#1432

sivel added a commit to sivel/pulp_ansible that referenced this issue May 9, 2023
patchback bot pushed a commit that referenced this issue May 9, 2023
patchback bot pushed a commit that referenced this issue May 9, 2023
gerrod3 pushed a commit that referenced this issue May 9, 2023
…1443)

(cherry picked from commit 69e2017)

Co-authored-by: Matt Martz <matt@sivel.net>
mdellweg pushed a commit that referenced this issue May 10, 2023
mdellweg pushed a commit that referenced this issue May 10, 2023
…lidated data (#1442)

* Serializer.validate must return validated data. Fixes #1441 (#1432)

(cherry picked from commit 69e2017)

* Fix sphinx intersphinx_mapping config. (#1439)

New value comes from https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#configuration

[noissue]

Signed-off-by: James Tanner <tanner.jc@gmail.com>
(cherry picked from commit ee877c0)

---------

Co-authored-by: Matt Martz <matt@sivel.net>
Co-authored-by: jctanner <tanner.jc@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

1 participant