Project

Profile

Help

Story #9380

closed

As a plugin writer, I have machinery that can return a task_group from viewsets

Added by bmbouter about 3 years ago. Updated about 3 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

Right now all we can return for viewsets that dispatch tasks is a single task. This has two problems

  1. In cases where a viewset dispatches many tasks, the viewset can't hand back more than one task.
  2. In cases where a viewset dispatches a task group, we have no way of returning a reference to that task group.

Current machinery

The viewsets return an instance of OperationPostponedResponse. For example, here is pulp_file's usage of it.

The openAPI schema part is handled by the viewset manually declaring the AsyncOperationResponseSerializer as the return type. You can see that here in pulp_file for example.

Proposed machinery

Add a TaskGroupOperationPostponedResponse which would be just like OperationPostponedResponse except it would return a task_group instead of task.

Add a TaskGroupOperationResponseSerializer which would be just like AsyncOperationResponseSerializer only serialized for task_group instead of task.


Related issues

Related to File Support - Story #9377: As a user I can use Alternate Content SourcesCLOSED - CURRENTRELEASEppicka

Actions
Blocks Pulp - Task #9382: Update import code to return a task groupCLOSED - CURRENTRELEASEdaviddavis

Actions
Actions #1

Updated by daviddavis about 3 years ago

  • Related to Story #9377: As a user I can use Alternate Content Sources added
Actions #2

Updated by bmbouter about 3 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to bmbouter
Actions #3

Updated by pulpbot about 3 years ago

  • Status changed from ASSIGNED to POST
Actions #4

Updated by daviddavis about 3 years ago

  • Blocks Task #9382: Update import code to return a task group added

Added by bmbouter about 3 years ago

Revision 1792ddf7 | View on GitHub

Adds machinery to return task groups from viewsets

Adds a TaskGroupResponse and corresponding TaskGroupResponseSerializer allowing viewsets to return a task group back to users directly.

closes #9380

Actions #5

Updated by bmbouter about 3 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100
Actions #6

Updated by pulpbot about 3 years ago

  • Sprint/Milestone set to 3.16.0
Actions #7

Updated by pulpbot about 3 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF