Project

Profile

Help

Issue #3316

Upload is broken

Added by amacdona@redhat.com 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

The Content Serializer causes a 500 error on uploads.

http --form POST http://localhost:8000/api/v3/artifacts/ file@./foo.tar.gz 

This returns a 500. It looks like `hexdigest()` requires a "length" argument. Here's the traceback in journalctl:

Jan 23 18:43:37 pulp3.dev pulp[22901]: django.request:ERROR: Internal Server Error: /api/v3/artifacts/
                                       Traceback (most recent call last):
                                         File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/django/core/handlers/exception.py", line 41, in inner
                                           response = get_response(request)
                                         File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/django/core/handlers/base.py", line 249, in _legacy_get_response
                                           response = self._get_response(request)
                                         File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/django/core/handlers/base.py", line 187, 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 185, 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 58, in wrapped_view
                                           return view_func(*args, **kwargs)
                                         File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/rest_framework/viewsets.py", line 95, in view
                                           return self.dispatch(request, *args, **kwargs)
                                         File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/rest_framework/views.py", line 494, in dispatch
                                           response = self.handle_exception(exc)
                                         File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/rest_framework/views.py", line 454, in handle_exception
                                           self.raise_uncaught_exception(exc)
                                         File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/rest_framework/views.py", line 491, in dispatch
                                           response = handler(request, *args, **kwargs)
                                         File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/rest_framework/mixins.py", line 20, in create
                                           serializer.is_valid(raise_exception=True)
                                         File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/rest_framework/serializers.py", line 236, in is_valid
                                           self._validated_data = self.run_validation(self.initial_data)
                                         File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/rest_framework/serializers.py", line 438, in run_validation
                                           value = self.validate(value)
                                         File "/home/vagrant/devel/pulp/pulpcore/pulpcore/app/serializers/content.py", line 97, in validate
                                           digest = data['file'].hashers[algorithm].hexdigest()
                                       TypeError: Required argument 'length' (pos 1) not found

Associated revisions

Revision ad4c40a1 View on GitHub
Added by werwty over 1 year ago

Only validate hash algorithms that the user can upload on the model.

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

Revision ad4c40a1 View on GitHub
Added by werwty over 1 year ago

Only validate hash algorithms that the user can upload on the model.

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

Revision ad4c40a1 View on GitHub
Added by werwty over 1 year ago

Only validate hash algorithms that the user can upload on the model.

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

History

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

  • Tags Pulp 3 added

#2 Updated by werwty over 1 year ago

  • Status changed from NEW to MODIFIED

#3 Updated by bizhang over 1 year ago

  • Assignee set to bizhang

#4 Updated by daviddavis 6 months ago

  • Sprint/Milestone set to 3.0

#5 Updated by bmbouter 6 months ago

  • Tags deleted (Pulp 3)

Please register to edit this issue

Also available in: Atom PDF