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

The wrong build is cancelled if it is still in queue

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Critical
    • Resolution: Unresolved
    • Component/s: build-flow-plugin
    • Labels:
      None
    • Environment:
      build flow 0.18
      LTS jenkins 1.595 ?
    • Similar Issues:

      Description

      If I as an example have a job like this
      build("job1", param: "param")

      If there is already a queue of job1 and I cancel the buildflow job, it will cancel the one at the head of the queue, not the one that the build flow put in the queue.

        Attachments

          Activity

          Show
          thomaste stefan thomasson added a comment - Pull reques https://github.com/jenkinsci/build-flow-plugin/pull/61
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Stefan Thomasson
          Path:
          src/main/groovy/com/cloudbees/plugins/flow/JobInvocation.groovy
          src/test/groovy/com/cloudbees/plugins/flow/AbortTest.groovy
          http://jenkins-ci.org/commit/build-flow-plugin/9711dc28d6caed8ed2c8c46beebc64a3ee8aba60
          Log:
          JENKINS-30102 Cancel the correct queued build

          Search in Jenkins.instance.queue for the queued object that
          matches the future returned by scheduleBuild2.

          Adding unittest for cancelling queued jobs.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stefan Thomasson Path: src/main/groovy/com/cloudbees/plugins/flow/JobInvocation.groovy src/test/groovy/com/cloudbees/plugins/flow/AbortTest.groovy http://jenkins-ci.org/commit/build-flow-plugin/9711dc28d6caed8ed2c8c46beebc64a3ee8aba60 Log: JENKINS-30102 Cancel the correct queued build Search in Jenkins.instance.queue for the queued object that matches the future returned by scheduleBuild2. Adding unittest for cancelling queued jobs.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Damien Nozay
          Path:
          src/main/groovy/com/cloudbees/plugins/flow/JobInvocation.groovy
          src/test/groovy/com/cloudbees/plugins/flow/AbortTest.groovy
          http://jenkins-ci.org/commit/build-flow-plugin/ad7f8de266cee4ea97146d8ef99224f2c066b0df
          Log:
          Merge pull request #61 from thomaste/cancelation_correction

          JENKINS-30102 Cancel the correct queued build

          Compare: https://github.com/jenkinsci/build-flow-plugin/compare/e835b49f1b66...ad7f8de266ce

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Damien Nozay Path: src/main/groovy/com/cloudbees/plugins/flow/JobInvocation.groovy src/test/groovy/com/cloudbees/plugins/flow/AbortTest.groovy http://jenkins-ci.org/commit/build-flow-plugin/ad7f8de266cee4ea97146d8ef99224f2c066b0df Log: Merge pull request #61 from thomaste/cancelation_correction JENKINS-30102 Cancel the correct queued build Compare: https://github.com/jenkinsci/build-flow-plugin/compare/e835b49f1b66...ad7f8de266ce

            People

            • Assignee:
              Unassigned
              Reporter:
              thomaste stefan thomasson
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: