NodeLabelParameter plugin is missing value parameter for queue jobs

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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])
      

            Assignee:
            Dominik Bartholdi
            Reporter:
            Matthew Bells
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: