Project

Profile

Help

Task #5710

Remove `spawned_tasks` and `parent` from task status

Added by bmbouter 2 months ago. Updated about 1 month ago.

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

100%

Platform Release:
Blocks Release:
Backwards Incompatible:
No
Groomed:
No
Sprint Candidate:
No
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 62

Description

Currently our tasks API looks like this:

{
    "created_resources": [
        "/pulp/api/v3/repositories/file/file/91c84141-aca6-4941-a94d-d8a269271e43/versions/1/" 
    ],  
    "error": null,
    "finished_at": "2019-11-13T16:21:27.931150Z",
    "name": "pulpcore.app.tasks.repository.add_and_remove",
    "parent": null,
    "progress_reports": [],
    "pulp_created": "2019-11-13T16:21:27.772294Z",
    "pulp_href": "/pulp/api/v3/tasks/e067ae33-5dc7-40f8-89d7-66084a8f3928/",
    "reserved_resources_record": [
        "/pulp/api/v3/repositories/file/file/91c84141-aca6-4941-a94d-d8a269271e43/" 
    ],  
    "spawned_tasks": [],
    "started_at": "2019-11-13T16:21:27.872490Z",
    "state": "completed",
    "worker": "/pulp/api/v3/workers/69b13d1f-0f69-4019-aa9a-54cd3eee55b3/" 
}

I think we should remove this for now for a few reasons:

  • There are no known use cases for tasks to spawn additional tasks.
  • To my knowledge there are no users using it.
  • To my knowledge, there are no tests testing it.
  • It's a possible deadlocking hazard for tasks to dispatch tasks and we don't have docs guiding plugin writers on how to avoid this.

Solution

  • Remove "spawned_tasks" and "parent" from 3.0 and the "auto-dispatch" machinery that sets it.

Associated revisions

Revision 3e3ea72a View on GitHub
Added by dalley 2 months ago

Remove spawned_tasks and parent from the task model and serializer

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

Revision a369ff77 View on GitHub
Added by dalley about 2 months ago

Remove spawned_tasks and parent from the task model and serializer

closes: #5710
https://pulp.plan.io/issues/5710
(cherry picked from commit 3e3ea72ac2bf0abab82a642a987122660cabc124)

History

#1 Updated by bmbouter 2 months ago

  • Subject changed from Remove `spawned_tasks` from task status to Remove `spawned_tasks` and `parent` from task status
  • Description updated (diff)

#2 Updated by daviddavis 2 months ago

  • Sprint set to Sprint 62

#3 Updated by dalley 2 months ago

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

#4 Updated by dalley 2 months ago

  • Status changed from ASSIGNED to POST

#5 Updated by dalley 2 months ago

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

#6 Updated by bmbouter about 1 month ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF