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

Gerrit Trigger v2.39.0 no longer triggers on "topic-changed" events

XMLWordPrintable

      We rely on the "topic-changed" Gerrit events to query Gerrit for patchsets with the same topic to checkout changes across different repos, and this appears to have stopped working in v2.39.0.

      Reverting back to v2.38.1 works again so it seems like a regression in the latest version.

      We have confirmed that we see the "topic-changed" events on the Gerrit server's event stream and the patch sets also appear in the "Query and Trigger Gerrit Patches" area when searching for the topic, so this is definitely plugin related.

      Using v2.39.0 we also tried enabling these settings, but it had no effect:

      • Build Current Patches Only
      • Abort manual patch sets
      • Abort patch sets with same topic
      • Vote patch sets with same topic

      Pushing new patchsets would still trigger changes, but they didn't populate the "GERRIT_TOPIC" parameter which is what we rely on for querying Gerrit for the linked patchsets.

      Reproduction steps:

      Repro Steps
      0. ensure gerrit trigger for the Jenkins job configured to trigger a build when the change is rebased.
      1.  create a change with a topic
      2. push the change
      3. edit the change and remove the topic
      4. rebase the change

      Expected:
      The gerrit plugin triggers a Jenkins build.

      mvn hpi:run with a breakpoint at line 194 of src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/RunningJobs.java

      should show the resulting NPE.

            poorlydefined Poorly
            jaspjoyce Jasper
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: