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

Stopping a freestyle job will sometimes fail

    XMLWordPrintable

    Details

    • Sprint:
      Blue Ocean - 1.1-beta-1
    • Similar Issues:

      Description

      Notes
      I suspect that there is a race condition between the run being queued and then it no longer being in the queue (backend makes a very academic distinction between runs that are executing and are queued). We need to handle this situation gracefully.

      Original request
      Steps to reproduce the bug (see video here):

      • Create a freestyle job in classic with a bash sleep 10 in it
      • Go to its BO version
      • Click on Run several times to have jobs queued
      • Try to stop one of the queued ones
      • Sometimes on stop there is a JS error and the job is not removed
      DELETE [http://ec2-52-200-141-179.compute-1.amazonaws.com:8080/blue/rest/organizations/jenkins/pipelines/isa/queue/578/] 404 (Not Found)
       request @ blueocean.js:2602
       dedupe @ blueocean.js:7854
       dedupe @ blueocean.js:7877
       rawFetch @ blueocean.js:2620
       fetch @ blueocean.js:2695
       removeFromQueue @ blueocean.js:5026
       _onStopClick @ blueocean.js:1944
       onClick @ blueocean.js:2020
       invokeGuardedCallback @ blueocean.js:88000
       executeDispatch @ blueocean.js:80124
       executeDispatchesInOrder @ blueocean.js:80144
       executeDispatchesAndRelease @ blueocean.js:79601
       executeDispatchesAndReleaseTopLevel @ blueocean.js:79612
       forEachAccumulated @ blueocean.js:94269
       processEventQueue @ blueocean.js:79788
       runEventQueueInBatch @ blueocean.js:88058
       handleTopLevel @ blueocean.js:88069
       handleTopLevelImpl @ blueocean.js:88136
       perform @ blueocean.js:93653
       batchedUpdates @ blueocean.js:87336
       batchedUpdates @ blueocean.js:91552
       dispatchEvent @ blueocean.js:88213
      

      When reloading the page the builds we were trying to stop are either stopped or completed

        Attachments

          Activity

          vilacides Isa Vilacides created issue -
          vilacides Isa Vilacides made changes -
          Field Original Value New Value
          Description Steps to reproduce the bug:

          Create a freestyle job in classic with a bash sleep 10 in it

          Go to its BO version

          Click on Run several times to have jobs queued

          Try to stop one of the queued ones

          Sometimes on stop there is a JS error and the job is not removed

          \{code}

          DELETE http://ec2-52-200-141-179.compute-1.amazonaws.com:8080/blue/rest/organizations/jenkins/pipelines/isa/queue/578/ 404 (Not Found)
          request @ blueocean.js:2602
          dedupe @ blueocean.js:7854
          dedupe @ blueocean.js:7877
          rawFetch @ blueocean.js:2620
          fetch @ blueocean.js:2695
          removeFromQueue @ blueocean.js:5026
          _onStopClick @ blueocean.js:1944
          onClick @ blueocean.js:2020
          invokeGuardedCallback @ blueocean.js:88000
          executeDispatch @ blueocean.js:80124
          executeDispatchesInOrder @ blueocean.js:80144
          executeDispatchesAndRelease @ blueocean.js:79601
          executeDispatchesAndReleaseTopLevel @ blueocean.js:79612
          forEachAccumulated @ blueocean.js:94269
          processEventQueue @ blueocean.js:79788
          runEventQueueInBatch @ blueocean.js:88058
          handleTopLevel @ blueocean.js:88069
          handleTopLevelImpl @ blueocean.js:88136
          perform @ blueocean.js:93653
          batchedUpdates @ blueocean.js:87336
          batchedUpdates @ blueocean.js:91552
          dispatchEvent @ blueocean.js:88213

          \{code}
          Steps to reproduce the bug:

          * Create a freestyle job in classic with a bash sleep 10 in it

          * Go to its BO version

          * Click on Run several times to have jobs queued

          * Try to stop one of the queued ones

          * Sometimes on stop there is a JS error and the job is not removed

          \{code}

          DELETE [http://ec2-52-200-141-179.compute-1.amazonaws.com:8080/blue/rest/organizations/jenkins/pipelines/isa/queue/578/] 404 (Not Found)
           request @ blueocean.js:2602
           dedupe @ blueocean.js:7854
           dedupe @ blueocean.js:7877
           rawFetch @ blueocean.js:2620
           fetch @ blueocean.js:2695
           removeFromQueue @ blueocean.js:5026
           _onStopClick @ blueocean.js:1944
           onClick @ blueocean.js:2020
           invokeGuardedCallback @ blueocean.js:88000
           executeDispatch @ blueocean.js:80124
           executeDispatchesInOrder @ blueocean.js:80144
           executeDispatchesAndRelease @ blueocean.js:79601
           executeDispatchesAndReleaseTopLevel @ blueocean.js:79612
           forEachAccumulated @ blueocean.js:94269
           processEventQueue @ blueocean.js:79788
           runEventQueueInBatch @ blueocean.js:88058
           handleTopLevel @ blueocean.js:88069
           handleTopLevelImpl @ blueocean.js:88136
           perform @ blueocean.js:93653
           batchedUpdates @ blueocean.js:87336
           batchedUpdates @ blueocean.js:91552
           dispatchEvent @ blueocean.js:88213

          \{code}

          * When reloading the page the builds we were trying to stop are either stopped or completed
          vilacides Isa Vilacides made changes -
          Description Steps to reproduce the bug:

          * Create a freestyle job in classic with a bash sleep 10 in it

          * Go to its BO version

          * Click on Run several times to have jobs queued

          * Try to stop one of the queued ones

          * Sometimes on stop there is a JS error and the job is not removed

          \{code}

          DELETE [http://ec2-52-200-141-179.compute-1.amazonaws.com:8080/blue/rest/organizations/jenkins/pipelines/isa/queue/578/] 404 (Not Found)
           request @ blueocean.js:2602
           dedupe @ blueocean.js:7854
           dedupe @ blueocean.js:7877
           rawFetch @ blueocean.js:2620
           fetch @ blueocean.js:2695
           removeFromQueue @ blueocean.js:5026
           _onStopClick @ blueocean.js:1944
           onClick @ blueocean.js:2020
           invokeGuardedCallback @ blueocean.js:88000
           executeDispatch @ blueocean.js:80124
           executeDispatchesInOrder @ blueocean.js:80144
           executeDispatchesAndRelease @ blueocean.js:79601
           executeDispatchesAndReleaseTopLevel @ blueocean.js:79612
           forEachAccumulated @ blueocean.js:94269
           processEventQueue @ blueocean.js:79788
           runEventQueueInBatch @ blueocean.js:88058
           handleTopLevel @ blueocean.js:88069
           handleTopLevelImpl @ blueocean.js:88136
           perform @ blueocean.js:93653
           batchedUpdates @ blueocean.js:87336
           batchedUpdates @ blueocean.js:91552
           dispatchEvent @ blueocean.js:88213

          \{code}

          * When reloading the page the builds we were trying to stop are either stopped or completed
          Steps to reproduce the bug (see video [here|https://drive.google.com/open?id=0B8uklOZI9kkqak1VZ1Jwd3J1SVE]):
           * Create a freestyle job in classic with a bash sleep 10 in it

           * Go to its BO version

           * Click on Run several times to have jobs queued

           * Try to stop one of the queued ones

           * Sometimes on stop there is a JS error and the job is not removed

          \{code}

          DELETE [http://ec2-52-200-141-179.compute-1.amazonaws.com:8080/blue/rest/organizations/jenkins/pipelines/isa/queue/578/] 404 (Not Found)
           request @ blueocean.js:2602
           dedupe @ blueocean.js:7854
           dedupe @ blueocean.js:7877
           rawFetch @ blueocean.js:2620
           fetch @ blueocean.js:2695
           removeFromQueue @ blueocean.js:5026
           _onStopClick @ blueocean.js:1944
           onClick @ blueocean.js:2020
           invokeGuardedCallback @ blueocean.js:88000
           executeDispatch @ blueocean.js:80124
           executeDispatchesInOrder @ blueocean.js:80144
           executeDispatchesAndRelease @ blueocean.js:79601
           executeDispatchesAndReleaseTopLevel @ blueocean.js:79612
           forEachAccumulated @ blueocean.js:94269
           processEventQueue @ blueocean.js:79788
           runEventQueueInBatch @ blueocean.js:88058
           handleTopLevel @ blueocean.js:88069
           handleTopLevelImpl @ blueocean.js:88136
           perform @ blueocean.js:93653
           batchedUpdates @ blueocean.js:87336
           batchedUpdates @ blueocean.js:91552
           dispatchEvent @ blueocean.js:88213

          \{code}
           * When reloading the page the builds we were trying to stop are either stopped or completed
          jamesdumay James Dumay made changes -
          Description Steps to reproduce the bug (see video [here|https://drive.google.com/open?id=0B8uklOZI9kkqak1VZ1Jwd3J1SVE]):
           * Create a freestyle job in classic with a bash sleep 10 in it

           * Go to its BO version

           * Click on Run several times to have jobs queued

           * Try to stop one of the queued ones

           * Sometimes on stop there is a JS error and the job is not removed

          \{code}

          DELETE [http://ec2-52-200-141-179.compute-1.amazonaws.com:8080/blue/rest/organizations/jenkins/pipelines/isa/queue/578/] 404 (Not Found)
           request @ blueocean.js:2602
           dedupe @ blueocean.js:7854
           dedupe @ blueocean.js:7877
           rawFetch @ blueocean.js:2620
           fetch @ blueocean.js:2695
           removeFromQueue @ blueocean.js:5026
           _onStopClick @ blueocean.js:1944
           onClick @ blueocean.js:2020
           invokeGuardedCallback @ blueocean.js:88000
           executeDispatch @ blueocean.js:80124
           executeDispatchesInOrder @ blueocean.js:80144
           executeDispatchesAndRelease @ blueocean.js:79601
           executeDispatchesAndReleaseTopLevel @ blueocean.js:79612
           forEachAccumulated @ blueocean.js:94269
           processEventQueue @ blueocean.js:79788
           runEventQueueInBatch @ blueocean.js:88058
           handleTopLevel @ blueocean.js:88069
           handleTopLevelImpl @ blueocean.js:88136
           perform @ blueocean.js:93653
           batchedUpdates @ blueocean.js:87336
           batchedUpdates @ blueocean.js:91552
           dispatchEvent @ blueocean.js:88213

          \{code}
           * When reloading the page the builds we were trying to stop are either stopped or completed
          Steps to reproduce the bug (see video [here|https://drive.google.com/open?id=0B8uklOZI9kkqak1VZ1Jwd3J1SVE]):
           * Create a freestyle job in classic with a bash sleep 10 in it

           * Go to its BO version

           * Click on Run several times to have jobs queued

           * Try to stop one of the queued ones

           * Sometimes on stop there is a JS error and the job is not removed

          {code}
          DELETE [http://ec2-52-200-141-179.compute-1.amazonaws.com:8080/blue/rest/organizations/jenkins/pipelines/isa/queue/578/] 404 (Not Found)
           request @ blueocean.js:2602
           dedupe @ blueocean.js:7854
           dedupe @ blueocean.js:7877
           rawFetch @ blueocean.js:2620
           fetch @ blueocean.js:2695
           removeFromQueue @ blueocean.js:5026
           _onStopClick @ blueocean.js:1944
           onClick @ blueocean.js:2020
           invokeGuardedCallback @ blueocean.js:88000
           executeDispatch @ blueocean.js:80124
           executeDispatchesInOrder @ blueocean.js:80144
           executeDispatchesAndRelease @ blueocean.js:79601
           executeDispatchesAndReleaseTopLevel @ blueocean.js:79612
           forEachAccumulated @ blueocean.js:94269
           processEventQueue @ blueocean.js:79788
           runEventQueueInBatch @ blueocean.js:88058
           handleTopLevel @ blueocean.js:88069
           handleTopLevelImpl @ blueocean.js:88136
           perform @ blueocean.js:93653
           batchedUpdates @ blueocean.js:87336
           batchedUpdates @ blueocean.js:91552
           dispatchEvent @ blueocean.js:88213
          {code}

          When reloading the page the builds we were trying to stop are either stopped or completed
          jamesdumay James Dumay made changes -
          Summary DELETE http://ec2-52-200-141-179.compute-1.amazonaws.com:8080/blue/rest/organizations/jenkins/pipelines/isa/queue/578/ 404 (Not Found) when trying to stop a queued build Stopping a freestyle job will sometimes fail
          jamesdumay James Dumay made changes -
          Description Steps to reproduce the bug (see video [here|https://drive.google.com/open?id=0B8uklOZI9kkqak1VZ1Jwd3J1SVE]):
           * Create a freestyle job in classic with a bash sleep 10 in it

           * Go to its BO version

           * Click on Run several times to have jobs queued

           * Try to stop one of the queued ones

           * Sometimes on stop there is a JS error and the job is not removed

          {code}
          DELETE [http://ec2-52-200-141-179.compute-1.amazonaws.com:8080/blue/rest/organizations/jenkins/pipelines/isa/queue/578/] 404 (Not Found)
           request @ blueocean.js:2602
           dedupe @ blueocean.js:7854
           dedupe @ blueocean.js:7877
           rawFetch @ blueocean.js:2620
           fetch @ blueocean.js:2695
           removeFromQueue @ blueocean.js:5026
           _onStopClick @ blueocean.js:1944
           onClick @ blueocean.js:2020
           invokeGuardedCallback @ blueocean.js:88000
           executeDispatch @ blueocean.js:80124
           executeDispatchesInOrder @ blueocean.js:80144
           executeDispatchesAndRelease @ blueocean.js:79601
           executeDispatchesAndReleaseTopLevel @ blueocean.js:79612
           forEachAccumulated @ blueocean.js:94269
           processEventQueue @ blueocean.js:79788
           runEventQueueInBatch @ blueocean.js:88058
           handleTopLevel @ blueocean.js:88069
           handleTopLevelImpl @ blueocean.js:88136
           perform @ blueocean.js:93653
           batchedUpdates @ blueocean.js:87336
           batchedUpdates @ blueocean.js:91552
           dispatchEvent @ blueocean.js:88213
          {code}

          When reloading the page the builds we were trying to stop are either stopped or completed
          *Notes*
          I suspect that there is a race condition between the run being queued and then it no longer being in the queue (backend makes a very academic distinction between runs that are executing and are queued). We need to handle this situation gracefully.

          *Original request*
          Steps to reproduce the bug (see video [here|https://drive.google.com/open?id=0B8uklOZI9kkqak1VZ1Jwd3J1SVE]):
           * Create a freestyle job in classic with a bash sleep 10 in it

           * Go to its BO version

           * Click on Run several times to have jobs queued

           * Try to stop one of the queued ones

           * Sometimes on stop there is a JS error and the job is not removed

          {code}
          DELETE [http://ec2-52-200-141-179.compute-1.amazonaws.com:8080/blue/rest/organizations/jenkins/pipelines/isa/queue/578/] 404 (Not Found)
           request @ blueocean.js:2602
           dedupe @ blueocean.js:7854
           dedupe @ blueocean.js:7877
           rawFetch @ blueocean.js:2620
           fetch @ blueocean.js:2695
           removeFromQueue @ blueocean.js:5026
           _onStopClick @ blueocean.js:1944
           onClick @ blueocean.js:2020
           invokeGuardedCallback @ blueocean.js:88000
           executeDispatch @ blueocean.js:80124
           executeDispatchesInOrder @ blueocean.js:80144
           executeDispatchesAndRelease @ blueocean.js:79601
           executeDispatchesAndReleaseTopLevel @ blueocean.js:79612
           forEachAccumulated @ blueocean.js:94269
           processEventQueue @ blueocean.js:79788
           runEventQueueInBatch @ blueocean.js:88058
           handleTopLevel @ blueocean.js:88069
           handleTopLevelImpl @ blueocean.js:88136
           perform @ blueocean.js:93653
           batchedUpdates @ blueocean.js:87336
           batchedUpdates @ blueocean.js:91552
           dispatchEvent @ blueocean.js:88213
          {code}

          When reloading the page the builds we were trying to stop are either stopped or completed
          jamesdumay James Dumay made changes -
          Sprint Blue Ocean 1.1 [ 271 ]
          jamesdumay James Dumay made changes -
          Rank Ranked higher
          jamesdumay James Dumay made changes -
          Labels technical-debt
          jamesdumay James Dumay made changes -
          Epic Link JENKINS-35742 [ 171802 ]
          jamesdumay James Dumay made changes -
          Sprint Blue Ocean 1.1 [ 271 ] Blue Ocean 1.0-rc2 [ 261 ]
          michaelneale Michael Neale made changes -
          Sprint Blue Ocean 1.0-rc2 [ 261 ]
          michaelneale Michael Neale made changes -
          Sprint Blue Ocean 1.1 [ 271 ]
          michaelneale Michael Neale made changes -
          Rank Ranked higher
          jamesdumay James Dumay made changes -
          Rank Ranked higher
          jamesdumay James Dumay made changes -
          Rank Ranked higher
          jamesdumay James Dumay made changes -
          Rank Ranked lower
          jamesdumay James Dumay made changes -
          Rank Ranked higher
          jamesdumay James Dumay made changes -
          Rank Ranked lower
          jamesdumay James Dumay made changes -
          Rank Ranked higher
          jamesdumay James Dumay made changes -
          Rank Ranked lower
          jamesdumay James Dumay made changes -
          Rank Ranked higher
          michaelneale Michael Neale made changes -
          Priority Major [ 3 ] Minor [ 4 ]
          jamesdumay James Dumay made changes -
          Rank Ranked higher
          jamesdumay James Dumay made changes -
          Rank Ranked lower
          jamesdumay James Dumay made changes -
          Rank Ranked lower
          jamesdumay James Dumay made changes -
          Assignee James Dumay [ jamesdumay ]
          jamesdumay James Dumay made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          jamesdumay James Dumay made changes -
          Status In Progress [ 3 ] In Review [ 10005 ]
          jamesdumay James Dumay made changes -
          Sprint Blue Ocean 1.1 [ 271 ] Blue Ocean - techdebt sprint 1 [ 291 ]
          Hide
          jamesdumay James Dumay added a comment - - edited

          From what I can tell we've fixed this in a refactor of how we treat runs and queued items as part of https://github.com/jenkinsci/blueocean-plugin/pull/968

          Show
          jamesdumay James Dumay added a comment - - edited From what I can tell we've fixed this in a refactor of how we treat runs and queued items as part of https://github.com/jenkinsci/blueocean-plugin/pull/968
          Hide
          jamesdumay James Dumay added a comment -

          Confirmed this issue has been fixed.

          Will be released as part of Blue Ocean 1.1

          Show
          jamesdumay James Dumay added a comment - Confirmed this issue has been fixed. Will be released as part of Blue Ocean 1.1
          jamesdumay James Dumay made changes -
          Status In Review [ 10005 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          jbriden Jenn Briden made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              jamesdumay James Dumay
              Reporter:
              vilacides Isa Vilacides
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: