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

gerrit-trigger plugin sends floods of queries to gerrit

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • gerrit-trigger-plugin
    • None
    • gerrit-trigger:2.35.1
      jenkins:2.222.4 & 2.289.2

      Using JCasC, facing huge amount of un-necessary queries triggered from Jenkins. The queries noticed on Gerrit are irrelevant to the Jenkins jobs/projects used.

      Query sample:

       

      SSH gerrit query --format JSON --current-patch-set --files change:Ic1d************************************* 

      average ~1k+ queries per second, sometimes getting more than 10k/second too!!!

       

      when switched to the legacy way of setting-up gerrit trigger (before JCasC support added to plugin), used groovy script to read from repository and load (ex: jenkins-jobs/gerritsetup.groovy), the excess triggers reduced highly. Still, it sends these queries to irrelevant changes, but the scale is very less (~20 per second).

      Noticed that the triggers are from gerritevents plugin class "com.sonymobile.tools.gerrit.gerritevents.GerritQueryHandler". but couldn't find why the plugin triggers the massive number of queries? and why while using JCasC based plugin usage?

      jcasc_config.yaml

          gerrit-trigger:
            pluginConfig:
              numberOfReceivingWorkerThreads: 3
            servers:
            - config:
                buildCurrentPatchesOnly:
                  abortManualPatchsets: false
                  abortNewPatchsets: false
                  abortSameTopic: false
                  enabled: false
                categories:
                - verdictDescription: "Code Review"
                  verdictValue: "Code-Review"
                - verdictDescription: "Verified"
                  verdictValue: "Verified"
                gerritAuthKeyFile: "/etc/jenkins/keys/gerrit.pem"
                gerritBuildAbortedCodeReviewValue: ""
                gerritBuildAbortedVerifiedValue: ""
                gerritBuildFailedCodeReviewValue: ""
                gerritBuildFailedVerifiedValue: ""
                gerritBuildNotBuiltCodeReviewValue: ""
                gerritBuildNotBuiltVerifiedValue: ""
                gerritBuildStartedCodeReviewValue: ""
                gerritBuildStartedVerifiedValue: ""
                gerritBuildSuccessfulCodeReviewValue: ""
                gerritBuildSuccessfulVerifiedValue: ""
                gerritBuildUnstableCodeReviewValue: ""
                gerritBuildUnstableVerifiedValue: ""
                gerritFrontEndUrl: "http://xxxxxxxxxxxxxxxxxx/gerrit/"
                gerritHostName: "xxxxxxxxxxxxxxxxxx"
                gerritHttpPassword: ${Gerrit_PASS}
                gerritHttpUserName: "***********"
                gerritUserName: "***********"
                restCodeReview: true
                restVerified: true
                useRestApi: false
              name: "Gerrit" 

            rsandell rsandell
            mrajesh90 Rajesh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: