Issue Type: Bug Bug
Assignee: Dominik Bartholdi
Attachments: Screenshot-Jenkins_NodeLabel_build_params.png, Screenshot-Jenkins_NodeLabel_build_queue.png
Components: nodelabelparameter-plugin
Created: 14/Nov/14 5:48 PM
Description:

This plugin will break many APIs and other plugins when there is a job in the queue.

The queue parameter is missing the 'value' entry that is sent from Jenkins through JSON. See output after build.actions below.

----- Steps to reproduce
Install Jenkins, install NodeLabelPlugin. (See environment for exact version info)
Create a job that uses the NodeLabelPlugin.
Build with Parameters, and fill in some some parameters (see screenshot).
Take a look at the queue (see screenshot).
Install Python jenkinsapi (using 0.2.16-2):
apt-get install python-jenkinsapi
Type in the following commands:

>>> import jenkinsapi
>>> jenkinsurl='http://localhost:8080'
>>> jobname='MyJob'
>>> jenkins = jenkinsapi.jenkins.Jenkins(jenkinsurl)
>>> queue=jenkins.get_queue()
>>> queued_builds = queue.get_queue_items_for_job(jobname)
>>> build=queued_builds[0]
>>> build.actions
[{'parameters': [{'name': 'job_id', 'value': '0'}, {'name': 'node_label'}, {'name': 'content_id', 'value': ''}, {'name': 'config_id', 'value': ''}]}, {'causes': [{'userName': 'Matt', 'userId': 'mbells', 'shortDescription': 'Started by user Matt'}]}]
>>> for b in queued_builds:
...    print (b, b.get_parameters())
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
  File "/usr/lib/python2.7/dist-packages/jenkinsapi/queue.py", line 97, in get_parameters
    return dict([(x['name'], x['value']) for x in parameters])
Environment: Jenkins ver. 1.554.3
nodelabelparameter plugin ver. 1.5.1
Host OS: Ubuntu 14.04
To get Python api:
Project: Jenkins
Labels: nodelabelparameter
Priority: Major Major
Reporter: Matthew Bells
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to