Project

Profile

Help

Task #8496

Task #8495: [EPIC] As a user, I have a new-improved tasking system with new-style workers

Deprecate `enqueue_with_reservation` from plugin API and introduce new `dispatch` interface to replace it

Added by bmbouter 7 months ago. Updated 6 months ago.

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

100%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

Problem 1

The pulpcore.plugin.tasking.enqueue_with_reservation interface, unfortunately, is tied to RQ because the return object is an RQ job. This prevents us from switching the implemenation away from RQ.

Problem 2

The options keyword is RQ specific also, so we can't keep that as part of the new dispatch function signature.

Solution

  1. Deprecate the pulpcore.plugin.tasking.enqueue_with_reservation
  2. Introduce a new interface pulpcore.plugin.tasking.dispatch which will have the following function signature:

def dispatch(func, resources, args=None, kwargs=None, task_group=None):

The dispatch method will return the Task object.


Related issues

Blocks Pulp - Task #8497: Remove the deprecated `enqueue_with_reservation` from the plugin APICLOSED - CURRENTRELEASE

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Blocks Pulp - Story #8501: As a user, I have new pulp workers that do not require a resource managerCLOSED - CURRENTRELEASE

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision 753e4ddb View on GitHub
Added by bmbouter 6 months ago

Adds new dispatch call and deprecate the old one

This adds a new pulpcore.plugin.tasking.dispatch interface which will replace the pulpcore.plugin.tasking.enqueue_with_reservation interface. This also deprecates the pulpcore.plugin.tasking.enqueue_with_reservation and causes it to emit warnings if used.

Additionally the pulpcore.plugin.viewsets.OperationPostponedResponse has been ported to support both the dispatch and enqueue_with_reservation interfaces.

closes #8496

History

#1 Updated by bmbouter 7 months ago

  • Description updated (diff)
  • Status changed from NEW to ASSIGNED
  • Assignee set to bmbouter

#2 Updated by bmbouter 7 months ago

  • Blocks Task #8497: Remove the deprecated `enqueue_with_reservation` from the plugin API added

#3 Updated by pulpbot 7 months ago

  • Status changed from ASSIGNED to POST

#4 Updated by bmbouter 7 months ago

  • Sprint/Milestone set to 3.12.0

Adding to 3.12, this is ready for merging with one more review and it needs to go into 3.12 to prepare for the tasking work to come later.

#5 Updated by bmbouter 7 months ago

  • Blocks Story #8501: As a user, I have new pulp workers that do not require a resource manager added

#6 Updated by bmbouter 6 months ago

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

#7 Updated by pulpbot 6 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF