History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-3004
Type: New Feature New Feature
Status: Closed Closed
Resolution: Won't Fix
Priority: Major Major
Assignee: Robin Shen
Reporter: John Fedorkiw
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
QuickBuild

Allow user to keep jobs queued programitcally

Created: 28/Jun/17 03:27 PM   Updated: 25/Jan/18 12:21 AM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: Quickbuild Software


 Description  « Hide
We would like to be able to be able to grammatically keep a job queued.

I have a configuration that I want to run concurrently but block concurrent runs for build requests with identical variables. I don't want to throw out the request (as I could easily do in a Pre-Queue Script) but instead want to allow the request to be queued up but not run until the duplicate request is finished.



 All   Comments   Work Log   Change History      Sort Order:
John Fedorkiw [28/Jun/17 03:45 PM]
..programmatically not "grammatically". We want to programmatically keep a job queued).

Robin Shen [20/Jan/18 10:55 AM]
To do this, edit pre-queue script like below:
groovy:
request.variables.timestamp = new Date().toString()

This way the build request has an unique variable and will not be considered identical

John Fedorkiw [24/Jan/18 06:41 PM]
I do not think this solves the underlying problem.

A configuration can be set to either run concurrently or not. If it is set to run concurrently ALL queued jobs will be ran at the same time. I would like to run a subset of the queued jobs concurrently but not all of them

Example: We have a configuration that mirrors data from one location to another. We use it to mirror data from <HOME> to locations <A> and <B>. I want to run mirrors from <HOME> -> <A> and <Home> -> <B> concurrently but never allow multiple runs from, <HOME> -> <A> to run at the same time.

Is there a way to accomplish this ? If not can a way be added ? In the ticket I proposed we are able to programmatically determine if a job is able to run or if it should stay queued but perhaps there is another way.

Robin Shen [25/Jan/18 12:21 AM]
This can be solved with grid resource with below procedure:

1. define two resources mirrorA, and mirrorB, with ONE count respectively on some node
2. define a variable say "mirrorDestination", and prompt as "selection box", with choices as:
${groovy:
def choices = "";
for (resource: com.pmease.quickbuild.entitymanager.ResourceManager.instance.getAll()) {
  if (resource.getName.startsWith("mirror"))
    choices += resource.getName() + ",";
\}
}
3. define node selection setting of your data mirror step to be "run on node with specified resource", and then define the resource as:
${vars.getValue("mirrorDestination")}
4. Also pass value of variable mirrorDestination to your data mirror step so that you can mirror data to desired destination