Convert celery task repository.delete to Pulp 3
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
#3 Updated by bmbouter about 3 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 lines0.
- For example the model layer will cascade delete all importers and publishers when a repo is deleted because of this1.
- 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.
#4 Updated by mhrivnak about 3 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?
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.
#12 Updated by firstname.lastname@example.org about 3 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?
Please register to edit this issue