Project

Profile

Help

Task #2408

closed

Convert celery task repository.distributor_delete to Pulp 3

Added by ttereshc over 7 years ago. Updated over 4 years ago.

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

0%

Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Sprint:
Sprint 11
Quarter:

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.0CLOSED - CURRENTRELEASEttereshc

Actions
Actions #1

Updated by ttereshc over 7 years ago

  • Related to Task #2380: Create a redmine task for each 2.y celery task to be converted to 3.0 added
Actions #2

Updated by ttereshc over 7 years ago

  • Tags Pulp 3 added
Actions #3

Updated by mhrivnak over 7 years ago

  • Groomed changed from No to Yes
  • Sprint Candidate changed from No to Yes
Actions #4

Updated by mhrivnak over 7 years ago

  • Sprint/Milestone set to 29
Actions #5

Updated by ttereshc over 7 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ttereshc
Actions #6

Updated by ttereshc over 7 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?
Actions #7

Updated by bmbouter over 7 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.py[0] 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

Actions #8

Updated by ttereshc over 7 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?

Added by mhrivnak over 7 years ago

Revision 1ef8c359 | View on GitHub

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

Added by mhrivnak over 7 years ago

Revision 1ef8c359 | View on GitHub

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

Actions #10

Updated by mhrivnak over 7 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.

Actions #11

Updated by bmbouter about 6 years ago

  • Sprint set to Sprint 11
Actions #12

Updated by bmbouter about 6 years ago

  • Sprint/Milestone deleted (29)
Actions #13

Updated by daviddavis almost 5 years ago

  • Sprint/Milestone set to 3.0.0
Actions #14

Updated by bmbouter almost 5 years ago

  • Tags deleted (Pulp 3)
Actions #15

Updated by bmbouter over 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF