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

Project list is not updating in desired interval

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: gerrit-trigger-plugin
    • Labels:
      None
    • Environment:
      Gerrit 2.11.4
      Gerrit Trigger 2.17.2
      Jenkins 1.637
    • Similar Issues:

      Description

      Project list is not updating in desired interval. Problem is in GerritServer.java in start() method, where projectListUpdater is created but isProjectCreatedEventsSupported() returns "true". It is because gerritConnection is not yet established, getGerritVersion() returns null and feature.versionNumber.isNewerThan returns false for NaN parameter.
      Initializing of projectListUpdater should be delayed after gerritConnection is initialized.

      Same problem with missedEventsPlaybackManager.isSupported() in GerritServer.java - start() when Gerrit server is up later than Jenkins.

      Also server connection Stop/Start should trigger project list update.

      I have Jenkins on different machine than Gerrit so connection could take a second.

      -------
      See attached log file
      Nov 10, 2015 11:41:58 AM com.sonyericsson.hudson.plugins.gerrit.trigger.version.GerritVersionChecker getGerritVersion
      SEVERE: Could not find the Gerrit version for vyvoj.zat.lan
      Nov 10, 2015 11:41:58 AM com.sonyericsson.hudson.plugins.gerrit.trigger.version.GerritVersionChecker createVersionNumber
      SEVERE: Gerrit version number is null or the empty string.
      Nov 10, 2015 11:41:58 AM com.sonyericsson.hudson.plugins.gerrit.trigger.GerritServer start
      INFO: vyvoj.zat.lan started
      Nov 10, 2015 11:41:58 AM com.sonyericsson.hudson.plugins.gerrit.trigger.GerritProjectListUpdater tryLoadProjectList
      INFO: Not connected to vyvoj.zat.lan, waiting for 1 second(s)

        Attachments

          Issue Links

            Activity

            Show
            scoheb Scott Hebert added a comment - PR created https://github.com/jenkinsci/gerrit-trigger-plugin/pull/260
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Scott Hebert
            Path:
            src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/GerritProjectListUpdater.java
            src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/GerritServer.java
            src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/version/GerritVersionChecker.java
            src/test/java/com/sonyericsson/hudson/plugins/gerrit/trigger/GerritProjectListUpdaterFunctionalTest.java
            src/test/java/com/sonyericsson/hudson/plugins/gerrit/trigger/mock/MockConfigForProjectListTest.java
            src/test/java/com/sonymobile/tools/gerrit/gerritevents/mock/SshdServerMock.java
            http://jenkins-ci.org/commit/gerrit-trigger-plugin/f3b31e3ab921938d9aed51f538c9463ab1e7bcbd
            Log:
            Project list is not updating in desired interval

            Fix bug whereby project list updating was not active upon connection startup.

            Only applies for Gerrit servers < 2.12.

            [FIXED JENKINS-31473]

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Scott Hebert Path: src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/GerritProjectListUpdater.java src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/GerritServer.java src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/version/GerritVersionChecker.java src/test/java/com/sonyericsson/hudson/plugins/gerrit/trigger/GerritProjectListUpdaterFunctionalTest.java src/test/java/com/sonyericsson/hudson/plugins/gerrit/trigger/mock/MockConfigForProjectListTest.java src/test/java/com/sonymobile/tools/gerrit/gerritevents/mock/SshdServerMock.java http://jenkins-ci.org/commit/gerrit-trigger-plugin/f3b31e3ab921938d9aed51f538c9463ab1e7bcbd Log: Project list is not updating in desired interval Fix bug whereby project list updating was not active upon connection startup. Only applies for Gerrit servers < 2.12. [FIXED JENKINS-31473]

              People

              • Assignee:
                scoheb Scott Hebert
                Reporter:
                engy Jiří Engelthaler
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: