nvgoldin / jenkins-graphite

Send Jenkins metrics to Graphite
GNU General Public License v3.0
9 stars 2 forks source link

KeyError: 'name' #5

Open radinsky opened 6 years ago

radinsky commented 6 years ago
  File "/var/lib/jenkins/jenkins_graphite.py", line 179, in get_queue
    job_info['job_name'] = job['task']['name']
KeyError: 'name'

Maybe jenkins API itself changed with a time? How should it be done now?

radinsky commented 6 years ago

that's what my job returns:

{
u'task': {
u'_class': 
u'org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution$PlaceholderTask'}, 
u'stuck': False, 
u'url': 
u'queue/item/4894/', 
u'inQueueSince': 1520782900892, 
u'actions': [{}], 
u'why': 
u'Waiting for next available executor on db-board-72', 
u'buildable': True, 
u'params': 
u'', 
u'_class': 
u'hudson.model.Queue$BuildableItem', 
u'buildableStartMilliseconds': 1520782900893, 
u'id': 4894, 
u'pending': False, 
u'blocked': False}
nvgoldin commented 6 years ago

Not sure, don't currently have a Jenkins instance running to check. Whats your Jenkins version?

radinsky commented 6 years ago

I'm on the recent one, Jenkins 2.89.4

nvgoldin commented 6 years ago

Ok thanks, will check (might take a couple of days).