Task #2407
Convert 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
Associated revisions
Revision 50ce6ba7
View on GitHub
Convert celery task repository.delete
History
#1
Updated by ttereshc about 4 years ago
- Related to Task #2380: Create a redmine task for each 2.y celery task to be converted to 3.0 added
#2
Updated by ttereshc about 4 years ago
- Tags Pulp 3 added
#3
Updated by bmbouter about 4 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
#4
Updated by mhrivnak about 4 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.
#5
Updated by mhrivnak about 4 years ago
- Sprint Candidate changed from No to Yes
#7
Updated by mhrivnak about 4 years ago
- Sprint/Milestone set to 29
#8
Updated by jortel@redhat.com about 4 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to jortel@redhat.com
#9
Updated by jortel@redhat.com about 4 years ago
- Status changed from ASSIGNED to NEW
- Assignee deleted (
jortel@redhat.com)
#10
Updated by ipanova@redhat.com about 4 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to ipanova@redhat.com
#11
Updated by ipanova@redhat.com about 4 years ago
- Status changed from ASSIGNED to POST
#12
Updated by ipanova@redhat.com about 4 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
#13
Updated by mhrivnak about 4 years ago
I think we are deliberately omitting that from the MVP so we can think about better ways to store similar history.
#14
Updated by ipanova@redhat.com about 4 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset pulp|50ce6ba78d4c2bf00f68959e64c76206ce60e82f.
#15
Updated by bmbouter almost 3 years ago
- Sprint set to Sprint 11
#16
Updated by bmbouter almost 3 years ago
- Sprint/Milestone deleted (
29)
#17
Updated by daviddavis almost 2 years ago
- Sprint/Milestone set to 3.0.0
#18
Updated by bmbouter almost 2 years ago
- Tags deleted (
Pulp 3)
#19
Updated by bmbouter about 1 year ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Please register to edit this issue
Convert celery task repository.delete
closes #2407 https://pulp.plan.io/issues/2407