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

Matrix parent aborts when 'Exclude trivial rebase' set in gerrit-trigger plugin

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • Jenkins ver. 1.598
      Matrix project plugin ver. 1.4
      Gerrit trigger ver. 2.12.0

      I have multi-configuration job with two configurations.
      It triggered by gerrit trigger with option 'Exclude Trivial Rebase'
      When job is triggered by rebased patchset parent job is aborted and there is messages in log:

      review.vsphere » CentOS,vsphere appears to be cancelled
      review.vsphere » CentOS,vsphere completed with result ABORTED
      review.vsphere » Ubuntu,vsphere appears to be cancelled
      review.vsphere » Ubuntu,vsphere completed with result ABORTED
      Collecting metadata...
      Metadata collection done.
      Finished: ABORTED

      So it seems that gerrit trigger plugin prevents child jobs from running, matrix parent cannot find them, aborts and sets negative vote on patchset.

      In this case matrix parent should be cancelled too and vote should be skipped.

          [JENKINS-26865] Matrix parent aborts when 'Exclude trivial rebase' set in gerrit-trigger plugin

          rin_ne added a comment - - edited

          This feature depends on Gerrit version. AFAIK 2.10 or later is needed. If earlier, this feature would be always ignored.

          See patchset attribute in patchset-created event.

          rin_ne added a comment - - edited This feature depends on Gerrit version. AFAIK 2.10 or later is needed. If earlier, this feature would be always ignored. See patchset attribute in patchset-created event. 2.9.4 (no kind attribute) https://gerrit-documentation.storage.googleapis.com/Documentation/2.9.4/json.html#patchSet 2.10 (kind attribute has TRIVIAL_REBASE value) https://gerrit-documentation.storage.googleapis.com/Documentation/2.10/json.html#patchSet

          In fact we have two options turned on: 'Exclude No Code Change' and 'Exclude Trivial Rebase'.
          For now I don't know which one of two leads to this behaviour.
          But in any case problem is: matrix children jobs is cancelled by gerrit-trigger
          while matrix parent isn't. Then it aborts cause it can't find child jobs.

          Gerrit is 2.8.4-15-g6dc8444 in our case.

          Eugene Korekin added a comment - In fact we have two options turned on: 'Exclude No Code Change' and 'Exclude Trivial Rebase'. For now I don't know which one of two leads to this behaviour. But in any case problem is: matrix children jobs is cancelled by gerrit-trigger while matrix parent isn't. Then it aborts cause it can't find child jobs. Gerrit is 2.8.4-15-g6dc8444 in our case.

          rin_ne added a comment -

          That's normal if 'Build Current Patchset Only' is enabled in gerrit server config.
          In this case, build would be canceled when new patchset is created in the same change.

          rin_ne added a comment - That's normal if 'Build Current Patchset Only' is enabled in gerrit server config. In this case, build would be canceled when new patchset is created in the same change.

          "Build Current Patchset Only" works as expected: if jobs for previous patchset are still building, matrix children jobs abort then matrix parent aborts too.

          But with 'Exclude No Code Change' and 'Exclude Trivial Rebase' jobs shouldn't even start.
          And it seems that matrix children job don't start while parent jobs start, doesn't find child jobs, then aborts.

          I think matrix parent job shouldn't be started on rebases and no-code-changes (if these options are on, of course).

          Eugene Korekin added a comment - "Build Current Patchset Only" works as expected: if jobs for previous patchset are still building, matrix children jobs abort then matrix parent aborts too. But with 'Exclude No Code Change' and 'Exclude Trivial Rebase' jobs shouldn't even start. And it seems that matrix children job don't start while parent jobs start, doesn't find child jobs, then aborts. I think matrix parent job shouldn't be started on rebases and no-code-changes (if these options are on, of course).

          rin_ne added a comment -

          Misunderstanding. All child builds are aborted because parent build is aborted at first.

          Do you mean that new build is not started even if previous builds are canceled by new patchset?

          rin_ne added a comment - Misunderstanding. All child builds are aborted because parent build is aborted at first. Do you mean that new build is not started even if previous builds are canceled by new patchset?

            rsandell rsandell
            azcore Eugene Korekin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: