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

retrigger doesn't work when deleting build from Queue

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Following situtation:

      An event comes in and a build request is put in the queue. Cancel the build in the Queue.
      Try to trigger the event via the "Query and Trigger Gerrit Patches". It will tell you that no jobs have been triggered.

      Analyzing the problem I found out that the trigger plugin keeps track internally of all events that it is currently processing (BuildMemory). Once all builds for an event are finished the event is removed from the memory.

      Now the BuildMemory uses hashcode to compare the events. As ChangeBasedEvent implements hashcode 2 events that represent the same patchset can't be running at the same time.

      I would expect that when I cancel a build in the Queue, that the memory is cleaned.

       

        Attachments

          Activity

          Show
          mawinter69 Markus Winter added a comment - PR: https://github.com/jenkinsci/gerrit-trigger-plugin/pull/320
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Markus Winter
          Path:
          src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/gerritnotifier/ToGerritRunListener.java
          src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/gerritnotifier/model/BuildMemory.java
          src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/GerritQueueListener.java
          src/test/java/com/sonyericsson/hudson/plugins/gerrit/trigger/gerritnotifier/model/BuildMemoryTest.java
          src/test/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/GerritQueueListenerTest.java
          http://jenkins-ci.org/commit/gerrit-trigger-plugin/e3ec526ae0c0939c3ab53b3a7cac162e7901595d
          Log:
          fix JENKINS-45095

          implement Queuelistener that will cleanup the memory when queue entry is
          cancelled.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Markus Winter Path: src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/gerritnotifier/ToGerritRunListener.java src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/gerritnotifier/model/BuildMemory.java src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/GerritQueueListener.java src/test/java/com/sonyericsson/hudson/plugins/gerrit/trigger/gerritnotifier/model/BuildMemoryTest.java src/test/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/GerritQueueListenerTest.java http://jenkins-ci.org/commit/gerrit-trigger-plugin/e3ec526ae0c0939c3ab53b3a7cac162e7901595d Log: fix JENKINS-45095 implement Queuelistener that will cleanup the memory when queue entry is cancelled.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Robert Sandell
          Path:
          src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/diagnostics/support/BuildMemoryComponent.java
          src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/gerritnotifier/ToGerritRunListener.java
          src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/gerritnotifier/model/BuildMemory.java
          src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/GerritQueueListener.java
          src/main/resources/com/sonyericsson/hudson/plugins/gerrit/trigger/diagnostics/BuildMemoryReport/index.groovy
          src/test/java/com/sonyericsson/hudson/plugins/gerrit/trigger/gerritnotifier/model/BuildMemoryTest.java
          src/test/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/GerritQueueListenerTest.java
          http://jenkins-ci.org/commit/gerrit-trigger-plugin/02e9f2b6c0d9dce914a516075be34e093560ec46
          Log:
          Merge pull request #320 from mawinter69/master

          fix JENKINS-45095

          Compare: https://github.com/jenkinsci/gerrit-trigger-plugin/compare/f7d6614bbdd9...02e9f2b6c0d9

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Robert Sandell Path: src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/diagnostics/support/BuildMemoryComponent.java src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/gerritnotifier/ToGerritRunListener.java src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/gerritnotifier/model/BuildMemory.java src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/GerritQueueListener.java src/main/resources/com/sonyericsson/hudson/plugins/gerrit/trigger/diagnostics/BuildMemoryReport/index.groovy src/test/java/com/sonyericsson/hudson/plugins/gerrit/trigger/gerritnotifier/model/BuildMemoryTest.java src/test/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/GerritQueueListenerTest.java http://jenkins-ci.org/commit/gerrit-trigger-plugin/02e9f2b6c0d9dce914a516075be34e093560ec46 Log: Merge pull request #320 from mawinter69/master fix JENKINS-45095 Compare: https://github.com/jenkinsci/gerrit-trigger-plugin/compare/f7d6614bbdd9...02e9f2b6c0d9
          Hide
          mawinter69 Markus Winter added a comment -

          was fixed in 2.25.0

          Show
          mawinter69 Markus Winter added a comment - was fixed in 2.25.0

            People

            • Assignee:
              rsandell rsandell
              Reporter:
              mawinter69 Markus Winter
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: