Project

Profile

Help

Story #4331

closed

As a task writer, I can lock on an arbitrary string

Added by daviddavis over 5 years ago. Updated over 4 years ago.

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

100%

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

Description

Currently, the tasking system only lets you lock on individual resources or a list of resources[0] which it then converts to urls[1]. However, it needs to be able to also accept a string or list of strings.

An example use case is where we need to lock on all distributions (present and future), in which case we would lock on "/pulp/api/v3/distributions/" or something similar.

[0] https://github.com/pulp/pulp/blob/331e58741fdb94d28582ae8b3f4c5a13a6bd6d55/pulpcore/tasking/tasks.py#L147
[1] https://github.com/pulp/pulp/blob/331e58741fdb94d28582ae8b3f4c5a13a6bd6d55/pulpcore/tasking/tasks.py#L180


Related issues

Blocks Pulp - Story #3044: Distribution create/update operations should be asynchronousCLOSED - CURRENTRELEASECodeHeeler

Actions
Actions #1

Updated by daviddavis over 5 years ago

  • Blocks Story #3044: Distribution create/update operations should be asynchronous added
Actions #2

Updated by bmbouter over 5 years ago

Currently the resources argument is a list. What if we allowed resources to instead accept various types and enqueue_with_reservation was more capable about coercing one or many resources or strings to a list of strings? Here a code example:

If not isinstance(resources, list):  # listify it
    resources = [resources]
for i, resource in enumerate(resources):
    if isinstance(resource, str):
        continue
    resources[i] = util.get_url(resource)
Actions #3

Updated by jortel@redhat.com over 5 years ago

bmbouter wrote:

Currently the resources argument is a list. What if we allowed resources to instead accept various types and enqueue_with_reservation was more capable about coercing one or many resources or strings to a list of strings?

Seems reasonable.

Actions #4

Updated by daviddavis over 5 years ago

+1 from me

Actions #5

Updated by CodeHeeler over 5 years ago

  • Tracker changed from Issue to Story
  • % Done set to 0
Actions #6

Updated by jortel@redhat.com over 5 years ago

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

Updated by jortel@redhat.com over 5 years ago

  • Status changed from ASSIGNED to POST

Added by jortel@redhat.com over 5 years ago

Revision 602e69a0 | View on GitHub

Support resource URLs in enqueue_with_reservation(). closes #4331

Added by jortel@redhat.com over 5 years ago

Revision 602e69a0 | View on GitHub

Support resource URLs in enqueue_with_reservation(). closes #4331

Actions #8

Updated by jortel@redhat.com over 5 years ago

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

Updated by daviddavis almost 5 years ago

  • Sprint/Milestone set to 3.0.0
Actions #10

Updated by bmbouter almost 5 years ago

  • Tags deleted (Pulp 3, Pulp 3 RC Blocker)
Actions #11

Updated by bmbouter over 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF