Project

Profile

Help

Task #5710

Updated by bmbouter about 5 years ago

Currently our tasks API looks like this: 

 <pre> 
 { 
     "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/" 
 } 
 </pre> 

 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. 

 h3. Solution 

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

Back