Include placeholder tasks with running builds

Bug #1750372 reported by Graham Lyons
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Python Jenkins
Fix Released
Undecided
Pascal Hofmann

Bug Description

Pipeline jobs in in Jenkins 2.x appear as placeholder tasks for their entire lifetime when queried via the API so we can't excluded them when we list the running builds on a node.

Revision history for this message
Pascal Hofmann (pascalhofmann) wrote :

This was introduced with the fix for https://bugs.launchpad.net/python-jenkins/+bug/1659787.

I think it makes much more sense to just check if number is already set…

Changed in python-jenkins:
assignee: nobody → Pascal Hofmann (pascalhofmann)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-jenkins (master)

Reviewed: https://review.opendev.org/700196
Committed: https://git.openstack.org/cgit/jjb/python-jenkins/commit/?id=19e7f7395aaa0d876a39baf82a80b775d17ff2b3
Submitter: Zuul
Branch: master

commit 19e7f7395aaa0d876a39baf82a80b775d17ff2b3
Author: Pascal Hofmann <email address hidden>
Date: Fri Dec 20 17:08:26 2019 +0100

    Include placeholder tasks in get_running_builds

    Pipeline jobs in in Jenkins 2.x appear as placeholder tasks for their
    entire lifetime when queried via the API. The fix for #1659787
    introduced completly ignoring placeholder tasks. Thus pipeline jobs are
    never included in the list returned by get_running_builds.

    This commit will change the behaviour of get_running_builds as follows:
      - Placeholder tasks will be included: So running pipeline jobs
        will be included.
      - Builds which do not have a build number yet will be ignored:
        This prevents the exception described in #1659787.

    Change-Id: I30351ec78d6186b0674e3c08be00076b0ce2333e
    Closes-Bug: #1750372
    Related-Bug: #1659787

Changed in python-jenkins:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.