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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Not A Defect
    • Component/s: core
    • Labels:
    • Similar Issues:

      Description

      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

        Attachments

          Activity

          Hide
          danielbeck Daniel Beck added a comment -

          will correctly be null to indicate that the job is in progress

          Builds can have an intermediate build result while they're still running. This is not a bug.

          Show
          danielbeck Daniel Beck added a comment - will correctly be null to indicate that the job is in progress Builds can have an intermediate build result while they're still running. This is not a bug.
          Hide
          danielbeck Daniel Beck added a comment -

          <building>false</building> is what you actually want.

          Show
          danielbeck Daniel Beck added a comment - <building>false</building> is what you actually want.

            People

            • Assignee:
              Unassigned
              Reporter:
              msoch Michelle Socher
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: