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

Empty provider details in gerrit missed events

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: gerrit-trigger-plugin
    • Labels:
      None
    • Environment:
    • Similar Issues:

      Description

      Raising this issue currently observed once, but have not checked if this happens all the time.

      Issue description

      Following a manual reboot of Jenkins, a couple of events (patchset-created events) were re-triggered.
      However, these events were re-triggered with empty strings for the following parameters:

      • GERRIT_HOST
      • GERRIT_PORT
      • GERRIT_SCHEME
      • GERRIT_VERSION

      All other parameters were correctly set (GERRIT_NAME, etc...).

      The trace

      The trace looks as follow

      ...
      2020-12-08 00:22:22.021+0000 [id=1773693]	INFO	jenkins.model.Jenkins#cleanUp: Jenkins stopped
      ...
      2020-12-08 00:22:52.554+0000 [id=33]	INFO	jenkins.InitReactorRunner$1#onAttained: Completed initialization
      ...
      2020-12-08 00:22:52.752+0000 [id=146]	INFO	c.s.t.g.g.GerritConnection#run: Starting Up gerrit01
      2020-12-08 00:22:52.765+0000 [id=20]	INFO	hudson.WebAppMain$3#run: Jenkins is fully up and running
      2020-12-08 00:22:52.770+0000 [id=147]	INFO	c.s.t.g.g.GerritConnection#run: Starting Up gerrit02
      2020-12-08 00:22:53.144+0000 [id=147]	INFO	c.s.h.p.g.t.p.GerritMissedEventsPlaybackManager#connectionEstablished: (0) missed events to process for server: gerrit02 ...
      2020-12-08 00:22:53.148+0000 [id=147]	INFO	c.s.h.p.g.t.p.GerritMissedEventsPlaybackManager#connectionEstablished: Processing completed for server: gerrit02
      2020-12-08 00:22:53.148+0000 [id=147]	INFO	c.s.t.g.g.GerritConnection#run: Ready to receive data from Gerrit: gerrit02
      2020-12-08 00:22:53.179+0000 [id=146]	INFO	c.s.h.p.g.t.p.GerritMissedEventsPlaybackManager#connectionEstablished: (11) missed events to process for server: gerrit01 ...
      2020-12-08 00:22:53.179+0000 [id=146]	INFO	c.s.h.p.g.t.p.GerritMissedEventsPlaybackManager#connectionEstablished: (gerrit01) Triggering: com.sonymobile.tools.gerrit.gerritevents.dto.events.RefUpdated@191868ea
      2020-12-08 00:22:53.183+0000 [id=146]	INFO	c.s.h.p.g.t.p.GerritMissedEventsPlaybackManager#connectionEstablished: (gerrit01) Triggering: com.sonymobile.tools.gerrit.gerritevents.dto.events.RefUpdated@d621c6c3
      2020-12-08 00:22:53.186+0000 [id=146]	INFO	c.s.h.p.g.t.p.GerritMissedEventsPlaybackManager#connectionEstablished: (gerrit01) Triggering: PatchsetCreated: Change-Id for #14271: Iaf12dab39d8ab5d3b87be2eef5691d1bb661d2f4 PatchSet: 1
      2020-12-08 00:22:53.193+0000 [id=146]	INFO	c.s.h.p.g.t.p.GerritMissedEventsPlaybackManager#connectionEstablished: (gerrit01) Triggering: com.sonymobile.tools.gerrit.gerritevents.dto.events.RefUpdated@cf7d8847
      2020-12-08 00:22:53.193+0000 [id=146]	INFO	c.s.h.p.g.t.p.GerritMissedEventsPlaybackManager#connectionEstablished: (gerrit01) Triggering: com.sonymobile.tools.gerrit.gerritevents.dto.events.RefUpdated@72f029dd
      2020-12-08 00:22:53.193+0000 [id=146]	INFO	c.s.h.p.g.t.p.GerritMissedEventsPlaybackManager#connectionEstablished: (gerrit01) Triggering: com.sonymobile.tools.gerrit.gerritevents.dto.events.RefUpdated@db71d78c
      2020-12-08 00:22:53.193+0000 [id=146]	INFO	c.s.h.p.g.t.p.GerritMissedEventsPlaybackManager#connectionEstablished: (gerrit01) Triggering: PatchsetCreated: Change-Id for #14270: Iade231ca8648e7eba44ecfcc6c8fd3fe356d8df6 PatchSet: 3
      2020-12-08 00:22:53.193+0000 [id=146]	INFO	c.s.h.p.g.t.p.GerritMissedEventsPlaybackManager#connectionEstablished: (gerrit01) Triggering: com.sonymobile.tools.gerrit.gerritevents.dto.events.RefUpdated@b47e4ec9
      2020-12-08 00:22:53.193+0000 [id=146]	INFO	c.s.h.p.g.t.p.GerritMissedEventsPlaybackManager#connectionEstablished: (gerrit01) Triggering: com.sonymobile.tools.gerrit.gerritevents.dto.events.RefUpdated@87dc62d9
      2020-12-08 00:22:53.194+0000 [id=146]	INFO	c.s.h.p.g.t.p.GerritMissedEventsPlaybackManager#connectionEstablished: (gerrit01) Triggering: com.sonymobile.tools.gerrit.gerritevents.dto.events.RefUpdated@7cc9cf0c
      2020-12-08 00:22:53.194+0000 [id=146]	INFO	c.s.h.p.g.t.p.GerritMissedEventsPlaybackManager#connectionEstablished: Processing completed for server: gerrit01
      2020-12-08 00:22:53.194+0000 [id=146]	INFO	c.s.t.g.g.GerritConnection#run: Ready to receive data from Gerrit: gerrit01
      2020-12-08 00:22:53.253+0000 [id=151]	INFO	c.s.h.p.g.t.g.ToGerritRunListener#onTriggered: Project [XXXX] triggered by Gerrit: [PatchsetCreated: Change-Id for #14270: Iade231ca8648e7eba44ecfcc6c8fd3fe356d8df6 PatchSet: 3]
      2020-12-08 00:22:53.272+0000 [id=36]	INFO	c.s.h.p.g.t.g.ToGerritRunListener#onTriggered: Project [YYYY] triggered by Gerrit: [PatchsetCreated: Change-Id for #14271: Iaf12dab39d8ab5d3b87be2eef5691d1bb661d2f4 PatchSet: 1]
      2020-12-08 00:22:53.316+0000 [id=151]	INFO	c.s.h.p.g.t.h.EventListener#schedule: Project XXXX Build Scheduled: true By event: 14270/3
      2020-12-08 00:22:53.321+0000 [id=36]	INFO	c.s.h.p.g.t.h.EventListener#schedule: Project YYYY Build Scheduled: true By event: 14271/1
      ...
      

      Maybe an explanation

      I am not a java developer so please disregard the following if not relevant.
      Looking at the code, it might be that the following two actions need to be inverted to notify the listeners only when we have actually filled the provider details.

      File: src/main/java/com/sonymobile/tools/gerrit/gerritevents/GerritConnection.java
      
                      notifyConnectionEstablished();
                      Provider provider = new Provider(
                              gerritName,
                              gerritHostName,
                              String.valueOf(gerritSshPort),
                              GERRIT_PROTOCOL_SCHEME_NAME,
                              gerritFrontEndUrl,
                              getGerritVersionString()); 
      

      Happy to prepare a patch and have a look at how to test it if you think that might be the reason.
      Thanks a lot for your help.
      Kind regards,
      David

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            Assignee:
            rsandell rsandell
            Reporter:
            dlinares_linux David
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: