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

Add information to console log when a job is aborted by gerrit

    Details

    • Similar Issues:

      Description

      When a new patch set is submitted/rebased to an existing gerrit, the job triggered by the previous patch set is aborted (according to our observations).

      It would be very helpful to know (as in see in the console) that a job has been aborted by gerrit.
      Currently the console log shows:

      13:35:00 Build was aborted
      13:35:00 Archiving artifacts
      

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: rinrinne
          Path:
          src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/GerritTrigger.java
          src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/NewPatchSetInterruption.java
          src/main/resources/com/sonyericsson/hudson/plugins/gerrit/trigger/Messages.properties
          http://jenkins-ci.org/commit/gerrit-trigger-plugin/3d566e952a1f8d8e7fd62a2b60cbc870ee98b8b6
          Log:
          JENKINS-21547: Add information to console log

          This patch adds message to console when a job is aborted by gerrit.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: rinrinne Path: src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/GerritTrigger.java src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/NewPatchSetInterruption.java src/main/resources/com/sonyericsson/hudson/plugins/gerrit/trigger/Messages.properties http://jenkins-ci.org/commit/gerrit-trigger-plugin/3d566e952a1f8d8e7fd62a2b60cbc870ee98b8b6 Log: JENKINS-21547 : Add information to console log This patch adds message to console when a job is aborted by gerrit.
          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/hudsontrigger/GerritTrigger.java
          src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/NewPatchSetInterruption.java
          src/main/resources/com/sonyericsson/hudson/plugins/gerrit/trigger/Messages.properties
          http://jenkins-ci.org/commit/gerrit-trigger-plugin/a0c44746afa941a7358fedab733397028c65d598
          Log:
          Merge pull request #137 from rinrinne/newpatchset-interrupt

          JENKINS-21547: Add information to console log

          Compare: https://github.com/jenkinsci/gerrit-trigger-plugin/compare/ca1943ca3e23...a0c44746afa9

          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/hudsontrigger/GerritTrigger.java src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/NewPatchSetInterruption.java src/main/resources/com/sonyericsson/hudson/plugins/gerrit/trigger/Messages.properties http://jenkins-ci.org/commit/gerrit-trigger-plugin/a0c44746afa941a7358fedab733397028c65d598 Log: Merge pull request #137 from rinrinne/newpatchset-interrupt JENKINS-21547 : Add information to console log Compare: https://github.com/jenkinsci/gerrit-trigger-plugin/compare/ca1943ca3e23...a0c44746afa9
          Hide
          sschuberth Sebastian Schuberth added a comment -

          Does the current build really get aborted when there is a new patch set? Because the documentation for the "Build Current Patches Only" option says otherwise: "If this is enabled, all still scheduled builds for previous patchsets are canceled when a new build is scheduled by a new patchset". So the scheduled builds will be cancelled, not the current build will be aborted, meaning that you still have to wait for the completion of the current job even if the change is superseded by a new patch set.

          If the documentation turns out to be wrong, and the current build is indeed aborted, could the documentation be fixed as part of this issue?

          Show
          sschuberth Sebastian Schuberth added a comment - Does the current build really get aborted when there is a new patch set? Because the documentation for the "Build Current Patches Only" option says otherwise: "If this is enabled, all still scheduled builds for previous patchsets are canceled when a new build is scheduled by a new patchset". So the scheduled builds will be cancelled, not the current build will be aborted, meaning that you still have to wait for the completion of the current job even if the change is superseded by a new patch set. If the documentation turns out to be wrong, and the current build is indeed aborted, could the documentation be fixed as part of this issue?
          Hide
          jakub Jakub Czaplicki added a comment - - edited

          From what we're seeing, a currently running job (triggered by gerrit) will be aborted when a new patchset is submitted.
          Presumably the scheduled builds are cancelled as well, which make sense.

          And it indeed created the "Who aborted this and why?" kind of situation.

          Show
          jakub Jakub Czaplicki added a comment - - edited From what we're seeing, a currently running job (triggered by gerrit) will be aborted when a new patchset is submitted. Presumably the scheduled builds are cancelled as well, which make sense. And it indeed created the "Who aborted this and why?" kind of situation.
          Hide
          rin_ne rin_ne added a comment -

          What is current build? Does it mean the build which is running on executor?

          If so, it is also scheduled build.

          1. Job schedules build.
          2. Push build to queue.
          3. Executor gets build from queue then run.

          Show
          rin_ne rin_ne added a comment - What is current build? Does it mean the build which is running on executor? If so, it is also scheduled build. 1. Job schedules build. 2. Push build to queue. 3. Executor gets build from queue then run.
          Hide
          sschuberth Sebastian Schuberth added a comment -

          Yes, by "current build" I mean a build that is currently running on an executor (and is listed as "Building" in the "Build Executor Status" box). My understanding of "scheduled build" so far was that this refers to queued builds as listed in the "Build Queue" box only.

          Even if my understanding of "scheduled build" was wrong, could the wording of the "Build Current Patches Only" option probably be made clearer like "If this is enabled, any running build for a previous patch set will be aborted and queued downstream jobs for the previous patch set will be cancelled"?

          Show
          sschuberth Sebastian Schuberth added a comment - Yes, by "current build" I mean a build that is currently running on an executor (and is listed as "Building" in the "Build Executor Status" box). My understanding of "scheduled build" so far was that this refers to queued builds as listed in the "Build Queue" box only. Even if my understanding of "scheduled build" was wrong, could the wording of the "Build Current Patches Only" option probably be made clearer like "If this is enabled, any running build for a previous patch set will be aborted and queued downstream jobs for the previous patch set will be cancelled"?
          Hide
          rin_ne rin_ne added a comment -

          If you have better wording, I recommend to create patch then pull request.
          Unfortunately I'm not plugin owner but one of contributor.

          Show
          rin_ne rin_ne added a comment - If you have better wording, I recommend to create patch then pull request. Unfortunately I'm not plugin owner but one of contributor.
          Hide
          esinsag Sagi Sinai-Glazer added a comment -

          "Aborted by Anonymous" - is confusing and misleading!
          I would suggest using this or similar text: "Aborted by Gerrit-Trigger" or even better "Aborted by Gerrit-Trigger due to new patchset created"

          Show
          esinsag Sagi Sinai-Glazer added a comment - "Aborted by Anonymous" - is confusing and misleading! I would suggest using this or similar text: "Aborted by Gerrit-Trigger" or even better "Aborted by Gerrit-Trigger due to new patchset created"
          Hide
          rin_ne rin_ne added a comment -

          My patch is already merged. So please create new pull request if you have any idea.

          Show
          rin_ne rin_ne added a comment - My patch is already merged. So please create new pull request if you have any idea.
          Hide
          sschuberth Sebastian Schuberth added a comment -

          FYI, I've created a PR [1] about the wording of the "Build Current Patches Only" option.

          [1] https://github.com/jenkinsci/gerrit-trigger-plugin/pull/140

          Show
          sschuberth Sebastian Schuberth added a comment - FYI, I've created a PR [1] about the wording of the "Build Current Patches Only" option. [1] https://github.com/jenkinsci/gerrit-trigger-plugin/pull/140
          Hide
          esinsag Sagi Sinai-Glazer added a comment -

          @rin_ne - if your pull request was already merged (20.3.2014) - then why is this ticket not yet resolved?

          Show
          esinsag Sagi Sinai-Glazer added a comment - @rin_ne - if your pull request was already merged (20.3.2014) - then why is this ticket not yet resolved?
          Hide
          rin_ne rin_ne added a comment - - edited

          Sagi, I don't know workflow on Jenkins JIRA. You mean issue should be closed by resolver? If so, who should verify that reporter issue is fixed?
          Please tell me the correct flow on this JIRA.

          In my community, issue reporter can only close issue.

          Show
          rin_ne rin_ne added a comment - - edited Sagi, I don't know workflow on Jenkins JIRA. You mean issue should be closed by resolver? If so, who should verify that reporter issue is fixed? Please tell me the correct flow on this JIRA. In my community, issue reporter can only close issue.
          Hide
          rin_ne rin_ne added a comment -

          Sorry, I misunderstand workflow.

          This issue is fixed. Please verify then close it if OK.

          Show
          rin_ne rin_ne added a comment - Sorry, I misunderstand workflow. This issue is fixed. Please verify then close it if OK.

            People

            • Assignee:
              jakub Jakub Czaplicki
              Reporter:
              jakub Jakub Czaplicki
            • Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: