[JIRA] (JENKINS-61795) Jenkins remote access api doesn't provide the job name for pipeline jobs when getting the build queue

2020-04-03 Thread tavolodob...@protonmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Bela Tavolodo created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-61795  
 
 
  Jenkins remote access api doesn't provide the job name for pipeline jobs when getting the build queue   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Tobias Gruetzmacher  
 
 
Components: 
 core, lockable-resources-plugin  
 
 
Created: 
 2020-04-03 07:11  
 
 
Environment: 
 Jenkins 2.222.1  Lockable resources plugin 2.7   
 
 
Labels: 
 api build-queue  
 
 
Priority: 
  Major  
 
 
Reporter: 
 Bela Tavolodo  
 

  
 
 
 
 

 
 I try to query the jobs in the build queue by using /queue/api/json?pretty url. I get the result, however, it doesn't contain the names of the pipeline jobs in certain cases. If a pipeline job has concurrent builds disabled then I get the following: {{}} 

 

{
  "_class" : "hudson.model.Queue$BlockedItem",
  "id" : 319,
  "task" : {
"_class" : "org.jenkinsci.plugins.workflow.job.WorkflowJob",
"name" : "test-pipeline1"
  },
  "why" : "Build #1 is already in progress (ETA: N/A)"
}, 

 {{}} {{}} {{}}So far so good, I can see the job name (test-pipeline1). However, if concurrent builds are enabled, then there's no "name" reference in the json result. Note that the pipeline job below uses lockable resources. And while waiting for the given resource to be available I get the results below, without the job name.     
   

[JIRA] (JENKINS-61795) Jenkins remote access api doesn't provide the job name for pipeline jobs when getting the build queue

2020-04-03 Thread tavolodob...@protonmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Bela Tavolodo updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-61795  
 
 
  Jenkins remote access api doesn't provide the job name for pipeline jobs when getting the build queue   
 

  
 
 
 
 

 
Change By: 
 Bela Tavolodo  
 

  
 
 
 
 

 
 I try to query the jobs in the build queue by using /queue/api/json?pretty url. I get the result, however, it doesn't contain the names of the pipeline jobs in certain cases.If a pipeline job has concurrent builds disabled then I get the following: {{}}   {code:java}{  "_class" : "hudson.model.Queue$BlockedItem",  "id" : 319,  "task" : {"_class" : "org.jenkinsci.plugins.workflow.job.WorkflowJob","name" : "test-pipeline1"  },  "why" : "Build #1 is already in progress (ETA: N/A)"},{code} {{}}    {{}}{{}} So far so good, I can see the job name (test-pipeline1). However, if concurrent builds are enabled, then there's no "name" reference in the json result. Note that the pipeline job below uses lockable resources. And while waiting for the given resource to be available I get the results below, without the job name.  {code:java}{ "_class" : "hudson.model.Queue$BuildableItem", "actions" : [  ], "blocked" : False, "buildable" : True, "id" : 334, "inQueueSince" : 1585896210314, "params" : "", "stuck" : False, "task" : { "_class" : "org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution$PlaceholderTask" }, "url" : "queue/item/334/", "why" : "Waiting for next available executor on 'pod-name'", "buildableStartMilliseconds" : 1585896210315, "pending" : False },{code} So my question is how to get the job name in the build queue api call. Btw. I tested with the xml and python output as well, they both miss the job name.    
 

  
 
 
 
 

 
 
 

 
 
 Add Comment