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

Gerrit server context path is ignored when accessing checks API

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • Gerrit version: 3.2.3
      Jenkins version: 2.249.1 (LTS)
      gerrit-code-review-plugin version: 0.4.4

      The gerrit code review plugin seems to ignore context path when accessing the checks API of a gerrit server and always use a path of /

       

      Steps to reproduce:

      Install a gerrit server with a context path other than / (ex: /myproject/gerrit/)

      Create a multibranch pipeline that checks out a project using the server address (e.g. https://myserver.mydomain/myproject/gerrit/a/myrepository)

       

      Result:

      Jenkins shows the following error:

      Unable to query for pending checks: com.google.gerrit.extensions.restapi.RestApiException: Failed to list pending checks:

       

      Logs from the reverse proxy indicate that jenkins tries to access an url starting with https://myserver.mydomain/a/plugins/checks/checks.pending/?query= instead of https://myserver.mydomain/myproject/gerrit/a/plugins/checks/checks.pending/?query=

       

      This is a problem especially when serving multiple gerrit servers with a single reverse proxy since there is no easy workaround in that case.

       

            lucamilanesio Luca Domenico Milanesio
            sgrimard Sebastien GRIMARD
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: