Project

Profile

Help

Issue #3011

closed

deleting a publisher via REST api produces a traceback

Added by dkliban@redhat.com over 6 years ago. Updated over 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Category:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
Yes
Tags:
Sprint:
Sprint 26
Quarter:

Description

The example below uses the pulp_example plugin, but the same is true for pulp_file.

(pulp) [vagrant@pulp3 pulp_example]$ http POST http://localhost:1234/api/v3/repositories/mycoolrepo3/publishers/example/ name='mycoolpublisher' repository='http://localhost:1234/api/v3/repositories/mycoolrepo3/'HTTP/1.0 201 Created
Allow: GET, POST, HEAD, OPTIONS
Content-Length: 319
Content-Type: application/json
Date: Thu, 14 Sep 2017 15:24:13 GMT
Location: http://localhost:1234/api/v3/repositories/mycoolrepo3/publishers/example/mycoolpublisher/
Server: WSGIServer/0.2 CPython/3.5.4
Vary: Accept, Cookie
X-Frame-Options: SAMEORIGIN

{
    "_href": "http://localhost:1234/api/v3/repositories/mycoolrepo3/publishers/example/mycoolpublisher/",
    "auto_publish": true,
    "distributions": [],
    "last_published": null,
    "last_updated": "2017-09-14T15:24:13.682325Z",
    "name": "mycoolpublisher",
    "repository": "http://localhost:1234/api/v3/repositories/mycoolrepo3/",
    "type": "example"
}

(pulp) [vagrant@pulp3 pulp_example]$ http DELETE http://localhost:1234/api/v3/repositories/mycoolrepo3/publishers/example/mycoolpublisher/
HTTP/1.0 202 Accepted
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Length: 135
Content-Type: application/json
Date: Thu, 14 Sep 2017 15:25:48 GMT
Server: WSGIServer/0.2 CPython/3.5.4
Vary: Accept, Cookie
X-Frame-Options: SAMEORIGIN

[
    {
        "_href": "http://localhost:1234/api/v3/tasks/ea25850c-d5d7-4e78-91c5-93fa262a381a/",
        "task_id": "ea25850c-d5d7-4e78-91c5-93fa262a381a"
    }
]

The following traceback is emitted in the logs:

Task pulpcore.tasking.tasks._queue_reserved_task[7937abff-f6c0-4c02-a83a-bb2e388bd1dc] raised unexpected: TypeError("delete() missing 2 required positional arguments: 'repo_name' and 'publisher_name'",)
Traceback (most recent call last):
  File "/home/vagrant/.virtualenvs/pulp/lib/python3.5/site-packages/celery/app/trace.py", line 374, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/home/vagrant/.virtualenvs/pulp/lib/python3.5/site-packages/celery/app/trace.py", line 629, in __protected_call__
    return self.run(*args, **kwargs)
  File "/home/vagrant/devel/pulp/platform/pulpcore/tasking/tasks.py", line 99, in _queue_reserved_task
    kwargs=inner_kwargs, **options)
  File "/home/vagrant/devel/pulp/platform/pulpcore/tasking/tasks.py", line 226, in apply_async
    async_result = super(UserFacingTask, self).apply_async(args=args, kwargs=kwargs, **options)
  File "/home/vagrant/.virtualenvs/pulp/lib/python3.5/site-packages/celery/app/task.py", line 518, in apply_async
    check_arguments(*(args or ()), **(kwargs or {}))
TypeError: delete() missing 2 required positional arguments: 'repo_name' and 'publisher_name'

Also available in: Atom PDF