Project

Profile

Help

Story #6414

As a user, I can keep track of a group of tasks

Added by dkliban@redhat.com 4 months ago. Updated 3 months 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:
Sprint 69

Description

User experience

A task that dispatches some number of tasks returns a list of created resources that includes at least one TaskGroup href.

The user can then perform a GET on the TaskGroup and receive a data structure that looks like this:

{
    "pulp_created": "2019-07-23T08:18:12.927007Z",
    "pulp_href": "/pulp/api/v3/task-groups/59f8a786-c7d7-4e2b-ad07-701479d403c5/",
    "description": "foo group of tasks",
    "waiting": 0,
    "skipped": 0,
    "running": 0,
    "completed": 1,
    "failed": 1,
    "canceled": 0
}

Users that want detailed information on all of the tasks in the task group can do so via the /task/ api.

http GET :24817/pulp/api/v3/tasks/?task_group=/pulp/api/v3/task-groups/59f8a786-c7d7-4e2b-ad07-701479d403c5/

http GET :24817/pulp/api/v3/tasks/?task_group=/pulp/api/v3/task-groups/59f8a786-c7d7-4e2b-ad07-701479d403c5/&state=failed

Implementation

TaskGroup model, viewset, and serializer need to be created.

Task model needs to have an optional 'task_group' foreign key added.

The enque_with_reservation[0] method needs to accept an optional 'task_group' keyword argument. When the 'task_group' is specified it is saved as a ForeignKey on the Task model that is created for tracking that task.

[0] https://github.com/pulp/pulpcore/blob/master/pulpcore/tasking/tasks.py#L148


Related issues

Related to Pulp - Test #6430: Test "task groups"NEW<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision ccc4d43c View on GitHub
Added by dalley 4 months ago

As a user, I have Task Groups

closes: #6414 https://pulp.plan.io/issues/6414

History

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

  • Description updated (diff)

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

  • Description updated (diff)

#3 Updated by dalley 4 months ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to dalley

#4 Updated by dkliban@redhat.com 4 months ago

  • Sprint set to Sprint 69

#5 Updated by dalley 4 months ago

  • Description updated (diff)

#6 Updated by dalley 4 months ago

  • Description updated (diff)

#7 Updated by pulpbot 4 months ago

  • Status changed from ASSIGNED to POST

#8 Updated by dalley 4 months ago

#9 Updated by dalley 4 months ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#10 Updated by ttereshc 4 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE
  • Sprint/Milestone set to 3.3.0

Please register to edit this issue

Also available in: Atom PDF