Task #2407
closedConvert celery task repository.delete to Pulp 3
100%
Description
Task name in Pulp 2: `pulp.server.tasks.repository.delete`.
Task implementation in Pulp 2: https://github.com/pulp/pulp/blob/3.0-dev/server/pulp/server/controllers/repository.py#L480
Related issues
Updated by ttereshc about 8 years ago
- Related to Task #2380: Create a redmine task for each 2.y celery task to be converted to 3.0 added
Updated by bmbouter about 8 years ago
Does a repo delete still need to be run by the tasking system or could it be a CRUD operation in the view layer only?
If I'm reading this right, I believe the only thing this task has to do are these 2 lines[0].
- For example the model layer will cascade delete all importers and publishers when a repo is deleted because of this[1].
- The exception handling is now handled centrally so this task doesn't need to deal with that
- The consumer actions are no longer in Pulp3
The only area that may continue to be needed could be the group membership stuff, but adding that could be the responsibility of the work to implement to group stuff correctly.
[0]: https://github.com/pulp/pulp/blob/c3e4e6514748ad24df27f64303ba3f226dc3f396/server/pulp/server/controllers/repository.py#L518-L519
[1]: https://github.com/pulp/pulp/blob/8c23b326cdb7739c420fdff8538a66e73147e0fb/app/pulp/app/models/repository.py#L112
Updated by mhrivnak about 8 years ago
bmbouter wrote:
Does a repo delete still need to be run by the tasking system or could it be a CRUD operation in the view layer only?
Great question, and one that's been on my mind also. I think there are two reasons why pulp 2 has similar CRUD operations in tasks.
1) to update consumers. It really just needs to queue tasks to update the consumers, but that itself can take some time.
2) to ensure that a repo does not get deleted (or modified, importer/publisher included) while some other task is operating on it, such as a sync.
Reason 1 won't apply in pulp 3. But much of reason 2 still applies. I would like to do some CRUD operations not as tasks, and have sync/publish/etc tasks be prepared to deal with that (by using some combination of a transaction, and just loading what it needs once up-front and never again). But that brings its own set of edge cases, and it seems easier and safer to stick with the current model of doing most repo UD with the safety of a resource lock.
Updated by jortel@redhat.com about 8 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to jortel@redhat.com
Updated by jortel@redhat.com about 8 years ago
- Status changed from ASSIGNED to NEW
- Assignee deleted (
jortel@redhat.com)
Updated by ipanova@redhat.com almost 8 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to ipanova@redhat.com
Updated by ipanova@redhat.com almost 8 years ago
- Status changed from ASSIGNED to POST
Updated by ipanova@redhat.com almost 8 years ago
What is the status with repo sync/publish result collections, are we going to create those in the future or we have some other plans?
https://github.com/pulp/pulp/blob/3.0-dev/server/pulp/server/controllers/repository.py#L527-L528
Updated by mhrivnak almost 8 years ago
I think we are deliberately omitting that from the MVP so we can think about better ways to store similar history.
Added by ipanova@redhat.com almost 8 years ago
Added by ipanova@redhat.com almost 8 years ago
Revision 50ce6ba7 | View on GitHub
Convert celery task repository.delete
Updated by ipanova@redhat.com almost 8 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset pulp|50ce6ba78d4c2bf00f68959e64c76206ce60e82f.
Updated by bmbouter almost 5 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Convert celery task repository.delete
closes #2407 https://pulp.plan.io/issues/2407