Project

Profile

Help

Issue #4555

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

Added by jsherril@redhat.com 7 months ago. Updated 6 months ago.

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

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.

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

Associated revisions

Revision b8524fda View on GitHub
Added by dkliban@redhat.com 7 months ago

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

History

#1 Updated by dkliban@redhat.com 7 months ago

The OpenAPI schema needs to be updated for the create and update. The wrong serializer is specified here0.

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

#2 Updated by dkliban@redhat.com 7 months ago

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

#3 Updated by dkliban@redhat.com 7 months ago

  • Status changed from POST to MODIFIED

#4 Updated by ipanova@redhat.com 7 months ago

  • Tags Pulp 3 added
  • Tags deleted (Katello-P1)

#6 Updated by kersom 6 months 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}

#7 Updated by daviddavis 6 months ago

  • Sprint/Milestone set to 3.0

#8 Updated by bmbouter 6 months ago

  • Tags deleted (Pulp 3)

Please register to edit this issue

Also available in: Atom PDF