Project

Profile

Help

Issue #4555

closed

distribution create/update is not documented as returning a task object

Added by jsherril@redhat.com about 5 years ago. Updated over 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
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

Using pulpcore-3.0.0b22 the api was changed to return a task object for distribution create/update, however the api docs indicate that a distribution is returned. This causes an issue when trying to use bindings, as the wrong object is returned.


Files

delete_orhpans_return_code.png (17.6 KB) delete_orhpans_return_code.png kersom, 04/09/2019 11:24 PM
Actions #1

Updated by dkliban@redhat.com about 5 years ago

The OpenAPI schema needs to be updated for the create and update. The wrong serializer is specified here[0].

[0] https://github.com/pulp/pulpcore/blob/master/pulpcore/app/viewsets/publication.py#L92

Actions #2

Updated by dkliban@redhat.com about 5 years ago

  • Status changed from NEW to POST
  • Assignee set to dkliban@redhat.com

Added by dkliban@redhat.com about 5 years ago

Revision b8524fda | View on GitHub

Problem: OpenAPI schema for distribution CUD is wrong

Solution: Use AsyncOperationResponseSerializer as the response serializer for swagger_auto_schema

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

Actions #3

Updated by dkliban@redhat.com about 5 years ago

  • Status changed from POST to MODIFIED
Actions #4

Updated by ipanova@redhat.com about 5 years ago

  • Tags Pulp 3 added
  • Tags deleted (Katello-P1)
Actions #6

Updated by kersom about 5 years ago

Same happens to delete orphans endpoint. Listed as a 204 in the OpenAPI docs. See attached image.

Returned task.

{'_created': '2018-12-21T00:26:37.278392Z',
 '_href': '/pulp/api/v3/tasks/b963e89c-db1a-4db4-b8c9-5fbca5629113/',
 'created_resources': [],
 'error': None,
 'finished_at': None,
 'name': 'pulpcore.app.tasks.orphan.orphan_cleanup',
 'non_fatal_errors': [],
 'parent': None,
 'progress_reports': [{'done': 3,
                       'message': 'Clean up orphan Content',
                       'state': 'completed',
                       'suffix': '',
                       'task': '/pulp/api/v3/tasks/b963e89c-db1a-4db4-b8c9-5fbca5629113/',
                       'total': 3},
                      {'done': 3,
                       'message': 'Clean up orphan Artifacts',
                       'state': 'completed',
                       'suffix': '',
                       'task': '/pulp/api/v3/tasks/b963e89c-db1a-4db4-b8c9-5fbca5629113/',
                       'total': 3}],
 'spawned_tasks': [],
 'started_at': None,
 'state': 'completed',
 'worker': None}
Actions #7

Updated by daviddavis almost 5 years ago

  • Sprint/Milestone set to 3.0.0
Actions #8

Updated by bmbouter almost 5 years ago

  • Tags deleted (Pulp 3)
Actions #9

Updated by bmbouter over 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF