Project

Profile

Help

Task #2482

Updated by ttereshc about 7 years ago

In 2.y line there were "action and resource tags":https://github.com/pulp/pulp/blob/2.10-release/common/pulp/common/tags.py. 

 Task tags are for the filtering of tasks, to support scenarios like: 
 As a user of "the task search API":http://docs.pulpproject.org/dev-guide/integration/rest-api/tasks.html#searching-for-tasks 
 * I want to search for all tasks that operated on repo zoo. 
 * I want to search for all pubish tasks. 
 * I want to search for all publish tasks on repo zoo. 
 * I want to search all publish tasks performed by a particular publisher. 

 @mhrivnak suggests to use task name for the purpose of action tag. (+1    for that) 
 Something similar to resource tag is also needed. 
 One idea is to add a repository to the "task model":https://github.com/pulp/pulp/blob/3.0-dev/app/pulp/app/models/task.py#L114 as a foreign key because in most cases tasks are operated on a particular repo. There is at least one exception here, it is applicability calculation, which may or may not be bound to a particular repo. 
 Another concern is that it's possible that not only repository will be a resource by which search is performed. One may want to search by publisher, for example. 

 Upon In the scope of this story reach an agreement on how tags will be implemented in Pulp 3, create redmine stories 3 and then add tags to implement all the chosen approach. existing calls to `apply_async` and `apply_async_with_reservation`    in `pulp.app.tasks`.

Back