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

Future obj not observed when same job executed parallel

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Two sub-jobs S1 and S2 calling the same job A within seconds. Internally Jenkins starts the job A only once, because of the "Quiet period". For the second call Jenkins returns null for the future element (see manual for Queue::schedule: "return null if this task is already in the queue").

      Because of the empty future obj Multijob ignores the status of the job and causes issues.

      One example:

      Job A fails and S1 stops with the status FAILED. But in sub-job S2 job A gets the status PENDING and the workflow continues whether job A fails or not.

      Workflow sketch:

      MainJob

      • Subjob S1
        • Step 1
          • Job A -> fails, subjob s2 stops and result is failed
        • Step 2
          • Job B -> not executed (expected)
      • Subjob S2
        • Step 1
          • Job A -> status pending and result ignored.
        • Step 2
          • Job C -> executed (BUG!)

        Attachments

          Activity

          Hide
          saschavet Sascha Vet added a comment -

          Bugfix implemented: If future object empty, search for the build in the query and assign it to the future object.

          @Plugin owners: please review code modification (only 5 lines of code )

          Bugfix committed to the branch:
          https://github.com/saschavet/tikal-multijob-plugin/tree/ISSUE-J-17799

          Show
          saschavet Sascha Vet added a comment - Bugfix implemented: If future object empty, search for the build in the query and assign it to the future object. @Plugin owners: please review code modification (only 5 lines of code ) Bugfix committed to the branch: https://github.com/saschavet/tikal-multijob-plugin/tree/ISSUE-J-17799
          Hide
          saschavet Sascha Vet added a comment -

          Multijob workflow after bugfix

          Show
          saschavet Sascha Vet added a comment - Multijob workflow after bugfix
          Hide
          tcz Zoltan Toth-Czifra added a comment -

          Is this project dead?

          Show
          tcz Zoltan Toth-Czifra added a comment - Is this project dead?
          Hide
          saschavet Sascha Vet added a comment -

          Bug doesn't occur in latest version of the plugin. Push request from my fork not required.

          Sorry for the sorry for the inconvenience caused @Zoltan

          Show
          saschavet Sascha Vet added a comment - Bug doesn't occur in latest version of the plugin. Push request from my fork not required. Sorry for the sorry for the inconvenience caused @Zoltan

            People

            • Assignee:
              saschavet Sascha Vet
              Reporter:
              saschavet Sascha Vet
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: