-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
gerrit 2.13.12,
Jenkins 2.277.2
Gerrit Code Review Plugin 0.4.4
In my project on gerrit I have a change that I started editing with the online interface but which I didn't publish yet (see [1]). In Jenkins I configured a "Multi-branch Pipeline" project that uses Gerrit as Branch source.
When the Jenkins project starts scanning it fails with an exception that hits [2]. The exception is caused by the fact that there is no revision in the list of revisions. Indeed if I query the gerrit REST endpoint with curl I see that for the specific change the "revisions" property is an empty dictionary, while for all the other changes it is a dictionary with exactly one entry.
When I hit "publish" in the Gerrit web interface the problem goes away.
I think the code in AbstractGerritSCMSource.java should be adapted to handle the case in which no revision is present and just skip the change because otherwise the Jenkins project will not detect new branches until all the unpublished changes are published.
[1] https://gerrit-review.googlesource.com/Documentation/user-inline-edit.html#editing-change