Project

Profile

Help

Task #2407

Convert celery task repository.delete to Pulp 3

Added by ttereshc almost 3 years ago. Updated 6 months ago.

Status:
MODIFIED
Priority:
Normal
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Platform Release:
Blocks Release:
Backwards Incompatible:
No
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 11

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

Related to Pulp - Task #2380: Create a redmine task for each 2.y celery task to be converted to 3.0 CLOSED - CURRENTRELEASE Actions

Associated revisions

History

#1 Updated by ttereshc almost 3 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 almost 3 years ago

  • Tags Pulp 3 added

#3 Updated by bmbouter almost 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.

[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 almost 3 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 almost 3 years ago

  • Sprint Candidate changed from No to Yes

#6 Updated by bmbouter almost 3 years ago

  • Groomed changed from No to Yes

Yes let's keep it as a task

#7 Updated by mhrivnak almost 3 years ago

  • Sprint/Milestone set to 29

#8 Updated by jortel@redhat.com almost 3 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to jortel@redhat.com

#9 Updated by jortel@redhat.com almost 3 years ago

  • Status changed from ASSIGNED to NEW
  • Assignee deleted (jortel@redhat.com)

#10 Updated by ipanova@redhat.com almost 3 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ipanova@redhat.com

#11 Updated by ipanova@redhat.com almost 3 years ago

  • Status changed from ASSIGNED to POST

#12 Updated by ipanova@redhat.com almost 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?
https://github.com/pulp/pulp/blob/3.0-dev/server/pulp/server/controllers/repository.py#L527-L528

#13 Updated by mhrivnak almost 3 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 almost 3 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#15 Updated by bmbouter over 1 year ago

  • Sprint set to Sprint 11

#16 Updated by bmbouter over 1 year ago

  • Sprint/Milestone deleted (29)

#17 Updated by daviddavis 6 months ago

  • Sprint/Milestone set to 3.0

#18 Updated by bmbouter 6 months ago

  • Tags deleted (Pulp 3)

Please register to edit this issue

Also available in: Atom PDF