jenkinsci / jenkinsci/workflow-multibranch-plugin
[JENKINS-49897] gerrit-plugin pr branch names are incorrectly name
- Dominant language
- Java
- Stars
- 87
- Forks
- 131
- PR merge metrics
- No merged PRs in 30d
Description
It seems that there are some naming problem with how gerrit-plugin is exposing the PR branches to Jenkins.
A) On BlueOcean UI PR branches are named "C-123456/2" which is problematic for two reasons: string is too long to be correctly displayed in UI, which allows only ~6 chars.
B) BlueOcean: exposed branch name exposes internals of gerrit implementation of temporary branches which is useless to the user "56/123456/2". 56/ prefix is only the last part of the original changeset and used for hashing folder name. last number is the version of the patchset. But from the logical point of view a PR/CR should be a single branch, regardless how many patchsets are build inside it. It makes sense to have a numeric only branch name, like "123456".
C) On Classic UI, the PR branch is recognised as a normal branch and not as a PR. The PR tab is not created. Clearly the Classic UI is able to display PR separately because they do this correctly for GitHub based branch sources. Even more funny is that if someone configures two SCM sources on the same multibrach project, one as Gerrit and one as GitHub, the display of PR/CR is made correct. This means that simple existence of GitHub SCM branch make the multibranch display them correctly.
---
Originally reported by
ssbarnea, imported from: gerrit-plugin pr branch names are incorrectly name
Raw content of original issue
It seems that there are some naming problem with how gerrit-plugin is exposing the PR branches to Jenkins.
A) On BlueOcean UI PR branches are named "C-123456/2" which is problematic for two reasons: string is too long to be correctly displayed in UI, which allows only ~6 chars.
B) BlueOcean: exposed branch name exposes internals of gerrit implementation of temporary branches which is useless to the user "56/123456/2". 56/ prefix is only the last part of the original changeset and used for hashing folder name. last number is the version of the patchset. But from the logical point of view a PR/CR should be a single branch, regardless how many patchsets are build inside it. It makes sense to have a numeric only branch name, like "123456".
C) On Classic UI, the PR branch is recognised as a normal branch and not as a PR. The PR tab is not created. Clearly the Classic UI is able to display PR separately because they do this correctly for GitHub based branch sources. Even more funny is that if someone configures two SCM sources on the same multibrach project, one as Gerrit and one as GitHub, the display of PR/CR is made correct. This means that simple existence of GitHub SCM branch make the multibranch display them correctly.
Contributor guide
Assessment
This issue has not been assessed yet.