Allow running Jobs to mark themselves as suspended

Bug #788612 reported by Julian Edwards
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Julian Edwards

Bug Description

In some scenarios a job might want to suspend itself after already running. For example, a PackageCopyJob notices that the target distroseries is frozen so it cannot complete yet until an archive admin releases it.

Related branches

Changed in launchpad:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Julian Edwards (julian-edwards)
tags: added: derivation
Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 788612] Re: Allow running Jobs to mark themselves as suspended

At the top level I think we want to take the job out of the queue
entirely and requeue it when the series is unfrozen.

Revision history for this message
Julian Edwards (julian-edwards) wrote :

On Thursday 26 May 2011 22:23:15 you wrote:
> At the top level I think we want to take the job out of the queue
> entirely and requeue it when the series is unfrozen.

That's not the right thing to be doing. The job is held until an archive
admin approves the package, at which point the job is released.

That's orthogonal to distroseries status, where even regular uploads are not
automatically released when its status changes.

Revision history for this message
Robert Collins (lifeless) wrote :

On Fri, May 27, 2011 at 10:01 AM, Julian Edwards
<email address hidden> wrote:
> On Thursday 26 May 2011 22:23:15 you wrote:
>> At the top level I think we want to take the job out of the queue
>> entirely and requeue it when the series is unfrozen.
>
> That's not the right thing to be doing.  The job is held until an archive
> admin approves the package, at which point the job is released.
>
> That's orthogonal to distroseries status, where even regular uploads are not
> automatically released when its status changes.

Ah, I think there is a layering confusion here.

At the package layer we certainly need to know that there is something
waiting for an archive admin to approve.

At the queue layer we don't want stuff in a queue that can't be
processed: they shouldn't be queued for handling by the job runner.

-Rob

Revision history for this message
Julian Edwards (julian-edwards) wrote :

On Friday 27 May 2011 04:40:44 you wrote:
> Ah, I think there is a layering confusion here.
>
> At the package layer we certainly need to know that there is something
> waiting for an archive admin to approve.
>
> At the queue layer we don't want stuff in a queue that can't be
> processed: they shouldn't be queued for handling by the job runner.

Why not?

The PackageCopyJob holds all the context.

Revision history for this message
Robert Collins (lifeless) wrote :

On Fri, May 27, 2011 at 8:10 PM, Julian Edwards
<email address hidden> wrote:
> On Friday 27 May 2011 04:40:44 you wrote:
>> Ah, I think there is a layering confusion here.
>>
>> At the package layer we certainly need to know that there is something
>> waiting for an archive admin to approve.
>>
>> At the queue layer we don't want stuff in a queue that can't be
>> processed: they shouldn't be queued for handling by the job runner.
>
> Why not?

Its incompatible design wise with zeromq/rabbitmq etc. Stuff in a
queue needs to be actionable.

-Rob

Revision history for this message
Julian Edwards (julian-edwards) wrote :

On Friday 27 May 2011 09:22:11 you wrote:
> Its incompatible design wise with zeromq/rabbitmq etc. Stuff in a
> queue needs to be actionable.

Why do we have a suspended status then?

Surely if something is suspended it's not going to be in a rabbit queue.

Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
William Grant (wgrant)
tags: added: qa-untestable
removed: qa-needstesting
William Grant (wgrant)
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.