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

Future obj not observed when same job executed parallel

    XMLWordPrintable

Details

    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

          saschavet Sascha Vet created issue -
          saschavet Sascha Vet made changes -
          Field Original Value New Value
          Description Two sub-jobs S1 and S2 calling the same job A. Internally multijob starts the job A only once (by the way a great behavior, very helpful in my use case). 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. After failing -> execution goes on
             - Step 2
               - Job C -> executed (BUG!)
          Two sub-jobs S1 and S2 calling the same job A. Internally multijob starts the job A only once (by the way a great behavior, very helpful in my use case). 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. After failing -> execution goes on
          -- Step 2
          --- Job C -> executed (BUG!)
          saschavet Sascha Vet made changes -
          Labels parallel plugin parallel plugin upstream
          saschavet Sascha Vet made changes -
          Assignee Sascha Vet [ saschavet ]
          Description Two sub-jobs S1 and S2 calling the same job A. Internally multijob starts the job A only once (by the way a great behavior, very helpful in my use case). 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. After failing -> execution goes on
          -- Step 2
          --- Job C -> executed (BUG!)
          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 docu 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 caused 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!)
          Summary Parallel executed job doesn't stop processing when failed Future obj not observed when same job executed parallel
          saschavet Sascha Vet made changes -
          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 docu 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 caused 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!)
          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!)
          saschavet Sascha Vet made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          saschavet Sascha Vet made changes -
          Attachment multijob-screenshot.png [ 23620 ]
          saschavet Sascha Vet made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 148979 ] JNJira + In-Review [ 206614 ]

          People

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

            Dates

              Created:
              Updated:
              Resolved: