Project

Profile

Help

Task #2408

Convert celery task repository.distributor_delete to Pulp 3

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

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

0%

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.distributor_delete`.
Task implementation in Pulp 2: https://github.com/pulp/pulp/blob/3.0-dev/server/pulp/server/controllers/distributor.py#L114


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

Revision 1ef8c359 View on GitHub
Added by mhrivnak almost 3 years ago

Workers can run and execute tasks.

Thanks to ttereshc aka @goosemania who contributed some of this code.

There is a known issue that resource-reserving tasks still cannot run, but
there is a fix in the works that will follow this PR.

Fixes bugs in pulp.tasking
Rearranges pulp.tasking to put related code together
Adds two tasks (importer and publisher delete) in pulp.app.tasks
Fixes import order problems of django app vs. celery app

https://pulp.plan.io/issues/2440

re #2440
re #2400
re #2408

Revision 1ef8c359 View on GitHub
Added by mhrivnak almost 3 years ago

Workers can run and execute tasks.

Thanks to ttereshc aka @goosemania who contributed some of this code.

There is a known issue that resource-reserving tasks still cannot run, but
there is a fix in the works that will follow this PR.

Fixes bugs in pulp.tasking
Rearranges pulp.tasking to put related code together
Adds two tasks (importer and publisher delete) in pulp.app.tasks
Fixes import order problems of django app vs. celery app

https://pulp.plan.io/issues/2440

re #2440
re #2400
re #2408

Revision 1ef8c359 View on GitHub
Added by mhrivnak almost 3 years ago

Workers can run and execute tasks.

Thanks to ttereshc aka @goosemania who contributed some of this code.

There is a known issue that resource-reserving tasks still cannot run, but
there is a fix in the works that will follow this PR.

Fixes bugs in pulp.tasking
Rearranges pulp.tasking to put related code together
Adds two tasks (importer and publisher delete) in pulp.app.tasks
Fixes import order problems of django app vs. celery app

https://pulp.plan.io/issues/2440

re #2440
re #2400
re #2408

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

  • Groomed changed from No to Yes
  • Sprint Candidate changed from No to Yes

#4 Updated by mhrivnak almost 3 years ago

  • Sprint/Milestone set to 29

#5 Updated by ttereshc almost 3 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ttereshc

#6 Updated by ttereshc almost 3 years ago

  • Does anyone have suggestions where to put the code for celery tasks? Do we want to create 'controllers' subdirectory for that?
  • Consumer model has many-to-many relationship with Publisher. Is it better to ignore this relationship for now or in this task we should consider deletion of related consumers as well?

#7 Updated by bmbouter almost 3 years ago

ttereshc wrote:

  • Does anyone have suggestions where to put the code for celery tasks? Do we want to create 'controllers' subdirectory for that?

I'll suggest two options for this.
1. Put the actual code in pulp.tasking.tasks.repository.py and import the tasks themselves into pulp.tasking.registry so that it's discoverable. Note repository.py makes sense for this task but others may have consumer.py or applicability.py

2. Put the actual code in pulp.tasking.repository.py and import the tasks themselves into pulp.tasking.registry so that it's discoverable. Note repository.py makes sense for this task but others may have consumer.py or applicability.py

3. Make the registry.py0 a Python package. The task code itself would then live somewhere like pulp.tasking.registry.repository.py and the task itself would be imported into pulp.tasking.registry.__init__.py so that it is discoverable. Note repository.py makes sense for this task but others may have consumer.py or applicability.py

I recommend either option 1 or 2.

I would ignore this for now.

[0]: https://github.com/pulp/pulp/blob/c27ee37bce42106ffab5602ddbc00c2fcb61ca00/tasking/pulp/tasking/registry.py

#8 Updated by ttereshc almost 3 years ago

This task is also supposed to do some cleanup by plugin.
For example, here is what yum plugin does: https://github.com/pulp/pulp_rpm/blob/ef5fc5b2af47736114b68bc08658d9b2a94b84e1/plugins/pulp_rpm/plugins/distributors/yum/distributor.py#L87

Should we ignore it with some comment in code or another task in redmine for now?
Or maybe make a pre-delete signal which for now will be just a placeholder for the time when we will come up with the plugin API?

#10 Updated by mhrivnak almost 3 years ago

  • Status changed from ASSIGNED to MODIFIED

The pulp 2 implementation called a distributor method that gave it a chance to do cleanup. It's not clear if that will be valuable for pulp 3; that behavior will be added if necessary through the work on the plugin API.

#11 Updated by bmbouter over 1 year ago

  • Sprint set to Sprint 11

#12 Updated by bmbouter over 1 year ago

  • Sprint/Milestone deleted (29)

#13 Updated by daviddavis 6 months ago

  • Sprint/Milestone set to 3.0

#14 Updated by bmbouter 6 months ago

  • Tags deleted (Pulp 3)

Please register to edit this issue

Also available in: Atom PDF