Project

Profile

Help

Task #8496

closed

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 over 3 years ago. Updated over 3 years 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 - CURRENTRELEASEipanova@redhat.com

Actions
Blocks Pulp - Story #8501: As a user, I have new pulp workers that do not require a resource managerCLOSED - CURRENTRELEASEmdellweg

Actions
Actions #1

Updated by bmbouter over 3 years ago

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

Updated by bmbouter over 3 years ago

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

Updated by pulpbot over 3 years ago

  • Status changed from ASSIGNED to POST
Actions #4

Updated by bmbouter over 3 years 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.

Actions #5

Updated by bmbouter over 3 years ago

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

Added by bmbouter over 3 years ago

Revision 753e4ddb | View on GitHub

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

Actions #6

Updated by bmbouter over 3 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100
Actions #7

Updated by pulpbot over 3 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF