jenkinsci / jenkinsci/gerrit-trigger-plugin

[JENKINS-25615] extra '/' getting added in the generated url for finding files in a given commit

Open
#702 3 comments 0 reactions 0 assignees View on GitHub
component:gerrit-trigger-plugin imported-jira-issue priority:blocker resolution:unresolved
Dominant language
Java
Stars
226
Forks
289
PR merge metrics
No merged PRs in 30d

Description

Hi Rebert Sandell,

We are using gerrit (V2.10-rc0) as code review system and jenkins as build system. Trying to enable continuous integration for one of our projects.

Able to poll commits and query commits in gerrit from jenkins machine itself but facing blocker issue with the URL getting generated in CI job for finding files which are modified in a commit.

sample generated URL provided below

/http:////a/changes/Id6d6768940833dbe046ba0bf484021f0955/revisions/93e67a23abd1877905dff2b8ee1f5f85c23/files/

exact issue is getting //a/changes instead of /a/changes

and failing with error

Request 1: GET to /http://gerrit.gainsight.com:8080//a/changes/Id6d6768940833dbe045e6496ba0bf484021f0955/revisions/93e67afeabb23abd1877905dff2b8ee1f5f85c23/files/

pl.touk.sonar.GerritPluginException: Error listing files

Can you please help me in resolving this issue..

---
Originally reported by anjankumar1234, imported from: extra '/' getting added in the generated url for finding files in a given commit


  • assignee: rsandell
  • status: Open
  • priority: Blocker
  • component(s): gerrit-trigger-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 3
  • imported: 2025-12-06

Raw content of original issue

Hi Rebert Sandell,

We are using gerrit (V2.10-rc0) as code review system and jenkins as build system. Trying to enable continuous integration for one of our projects.

Able to poll commits and query commits in gerrit from jenkins machine itself but facing blocker issue with the URL getting generated in CI job for finding files which are modified in a commit.

sample generated URL provided below

/http://<jenkins URL>//a/changes/Id6d6768940833dbe046ba0bf484021f0955/revisions/93e67a23abd1877905dff2b8ee1f5f85c23/files/

exact issue is getting <url>//a/changes instead of <url>/a/changes

and failing with error
Request 1: GET to /http://gerrit.gainsight.com:8080//a/changes/Id6d6768940833dbe045e6496ba0bf484021f0955/revisions/93e67afeabb23abd1877905dff2b8ee1f5f85c23/files/
pl.touk.sonar.GerritPluginException: Error listing files

Can you please help me in resolving this issue..

  • environment: gerrit trigger (V2.11.1), Jenkins (V1.577)

Contributor guide

Open the contributing guide

Research direction

Start by tracing the gerrit-trigger-plugin code that constructs the Gerrit URL for listing files changed in a commit. Reproduce the failing request from the issue and verify that the generated path contains one slash before /a/changes rather than two; no source file or test is named in the report.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
ci-cd
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.