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

Job.isBuilding() returns true when there is a build still ongoing

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • core
    • Jenkins 2.235.3

    Description

      We have this setup with 2 pipeline jobs, trigger_test and test:

      Trigger_Test:
      -> calls build job Test on different nodes (4 - 6) with wait:false so they run concurrently
      -> needs to wait for Test to finish all builds, using isBuilding() and isInQueue to check if Test is still running

      Test:
      -> Runs same thing on different PCs and we measure the time.


      Expected behavior:
      -> the check on Trigger_Test is only true when all Test builds finish

      Actual behavior:
      -> the check on Trigger_Test is true when the last build finishes

      Attachments

        Activity

          karanva Karolina Arancibia Valuskova created issue -
          karanva Karolina Arancibia Valuskova made changes -
          Field Original Value New Value
          Description We have this setup with 2 pipeline jobs, trigger_test and test:

          Trigger_Test:
          -> calls build job Test on different nodes with wait:false so they run concurrently
          -> needs to wait for Test to finish all builds, using isBuilding() and isInQueue to check if Test is still running

          Test:
          -> Runs same thing on different PCs and we measure the time.

          ----

          Expected behavior:
          -> the check on Trigger_Test is only true when *all* Test builds finish

          Actual behavior:
          -> the check on Trigger_Test is true when the *last* build finishes
          We have this setup with 2 pipeline jobs, trigger_test and test:

          Trigger_Test:
           -> calls build job Test on different nodes (4 - 6) with wait:false so they run concurrently
           -> needs to wait for Test to finish all builds, using isBuilding() and isInQueue to check if Test is still running

          Test:
           -> Runs same thing on different PCs and we measure the time.
          ----
          Expected behavior:
           -> the check on Trigger_Test is only true when *all* Test builds finish

          Actual behavior:
           -> the check on Trigger_Test is true when the *last* build finishes

          People

            Unassigned Unassigned
            karanva Karolina Arancibia Valuskova
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: