Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-42115

Builds with sub-projects prematurely mark as completed in JSON API

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • core

      When a job is configured to block on multiple sub-projects, the build of the parent job is incorrectly marked with SUCCESS as the "result" value accessed through the JSON API.

      To reproduce:

      • Create three jobs (a parent and two subprojects).
      • Under Build -> execute shell have all three jobs sleep for some number of minutes.
      • Configure the parent job to depend on the two subprojects by selecting "Trigger/call builds on other projects" in the Build selection. Select "Block until the triggered projects finish their builds" for both of them.
      • Configure each of the subproject jobs to share a lock under the Build Environment.
      • Trigger the build of the parent project
      • Navigate to "/job/<parent-job-name>/<build-number>/api/json" and observe the "result" key value pair at two key points - (1) while the first subproject is running, the result will correctly be null to indicate that the job is in progress but (2) when the first subproject build has completed but the second is still running (and therefore the parent is still running as visible on its status page), the result is incorrectly marked as SUCCESS rather than null

            Unassigned Unassigned
            msoch Michelle Socher
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: