[JIRA] (JENKINS-55939) git-plugin v4.0.0-rc not returning "lastBuiltRevision" in BuildData

9 views
Skip to first unread message

tom@hackerone.com (JIRA)

unread,
Feb 4, 2019, 3:45:02 AM2/4/19
to jenkinsc...@googlegroups.com
Tom de Vries created an issue
 
Jenkins / Bug JENKINS-55939
git-plugin v4.0.0-rc not returning "lastBuiltRevision" in BuildData
Issue Type: Bug Bug
Assignee: Mark Waite
Components: git-plugin
Created: 2019-02-04 08:44
Priority: Minor Minor
Reporter: Tom de Vries

After upgrading the git-plugin from 3.9.2 to 4.0.0-rc the field "lastBuiltRevision" is missing from the buildData in a projects api/json output.

URL: https://ci.example.org/view/all/job/Project/api/json?tree=name,lastSuccessfulBuild[number,url,timestamp,result,actions[lastBuiltRevision[SHA1]]],builds[number,url,timestamp,result,actions[lastBuiltRevision[SHA1]]]\{0,20}

On version 4.0.0-rc:

 

{
 "_class" : "hudson.model.FreeStyleProject",
 "name" : "Project",
 "builds" : [
 {
 "_class" : "hudson.model.FreeStyleBuild",
 "actions" : [
 {
 "_class" : "hudson.model.ParametersAction"
 },
 {
 "_class" : "hudson.model.CauseAction"
 },
 {
 "_class" : "hudson.plugins.git.util.BuildDetails"
 },
 {
 "_class" : "hudson.plugins.git.GitTagAction"
 },
 {
},
 {
},
 {
},
 {
},
 {
},
 {
}
 ],
 "number" : 42,
 "result" : "SUCCESS",
 "timestamp" : 1549043593728,
 "url" : "https://ci.example.org/view/all/job/Project/42/"
 },
 # ...truncated...
 ]
}

 

On version 3.9.2 the output includes the following:

 

{
 "_class" : "hudson.plugins.git.util.BuildData",
 "lastBuiltRevision" : {
 "SHA1" : "11112222333344445555666777788889999f561"
 }
 },

 

 

The "Version 4.0.0-rc (January 30, 2019)" changelog is referencing the following:

  •    Stop bloating build.xml files with BuildData (JENKINS-19022)

Perhaps that's related to the issue.

 

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

justin.pihony@gmail.com (JIRA)

unread,
Feb 4, 2019, 2:47:01 PM2/4/19
to jenkinsc...@googlegroups.com
Justin Pihony commented on Bug JENKINS-55939
 
Re: git-plugin v4.0.0-rc not returning "lastBuiltRevision" in BuildData

We just ran into this issue and it is a showstopper for us. It seems that if you use a regex then it causes each push to re-find all matching builds and re-build them all.

mark.earl.waite@gmail.com (JIRA)

unread,
Feb 5, 2019, 7:38:02 AM2/5/19
to jenkinsc...@googlegroups.com

Tom de Vries , thanks for the report. I won't be able to investigate this for at least a week due to limited internet access while I'm on personal travel. Possibly [~jacob-keller] will be able to review it before then.

Justin Pihony I don't understand how your phrase

if you use a regex then it causes each push to re-find all matching builds and re-build them all

is related to this report. Can you provide more details to clarify why you believe that the use of a regex (in what context?) is related to a REST API call? If are confident that what you're observing is related to the REST API, please clarify and provide more details to duplicate the problem. Otherwise, submit a new bug report with additional details that will allow others to duplicate the bug.

stefan.hengelein@gmail.com (JIRA)

unread,
Feb 6, 2019, 12:17:02 PM2/6/19
to jenkinsc...@googlegroups.com

Thanks. Now I know why our jenkins is trying to rebuild over 3k builds after the update. Very well done guys, very well done.

This is not a Minor problem but rather a MAJOR one.

batmat@batmat.net (JIRA)

unread,
Feb 7, 2019, 6:47:02 AM2/7/19
to jenkinsc...@googlegroups.com

Stefan Hengelein please watch out how you phrase your requests/comments. We understand your frustration, but using such phrasing in unacceptable. This is not a customer support channel.
Mark is doing the maintenance of the git plugins on personal time, and is doing an absolute great job. I know no other OSS maintainer who literally have many machines and OSes to test his work.

The issue here is also that there was a misunderstanding, that release was expected to land only in the experimental update center but -rc was used instead of -alpha and -beta (which are the only suffices automatically exposed under the experimental UC, instead of the main one). These -rc releases are in the process of being hidden right now.

Please revert anyway in the meantime.

stefan.hengelein@gmail.com (JIRA)

unread,
Feb 8, 2019, 12:52:02 PM2/8/19
to jenkinsc...@googlegroups.com

Baptiste Mathus Very correct. Sorry for that. As you've said, if you're searching for the culprit in an issue like this for quite some time can be very frustrating. But it is not the first time that something major breaks, but rather every second or third update requires a few days to get everything working again. And then reading the Priority "Minor" is quite funny

But again, sorry for the Phrasing Mark Waite!

 

Thanks for the explanation. I was wondering about the -rc suffix as well but assumed it may have been an oversight and should stand for the release version past all release candidates.
Yes, reverting to the older version fixed everything.

jacob.keller@gmail.com (JIRA)

unread,
Feb 9, 2019, 9:11:04 PM2/9/19
to jenkinsc...@googlegroups.com

Hmm.. The buildDetails section should include the revision that was built by that build...

we won't actually have exposed buildData anymore, because this was being duplicated and stored for every build kept...

mark.earl.waite@gmail.com (JIRA)

unread,
Mar 10, 2019, 11:46:03 PM3/10/19
to jenkinsc...@googlegroups.com
Mark Waite assigned an issue to Unassigned
 
Change By: Mark Waite
Assignee: Mark Waite

mark.earl.waite@gmail.com (JIRA)

unread,
May 28, 2019, 1:06:03 AM5/28/19
to jenkinsc...@googlegroups.com
Mark Waite commented on Bug JENKINS-55939
 
Re: git-plugin v4.0.0-rc not returning "lastBuiltRevision" in BuildData

I've created an end to end test case in my jenkins-bugs repository to track the fix.

I still need to create an automated test in the git plugin itself, but the end to end case provides at least one automated check of the problem.

My current plan is that git plugin 4.0.0 won't have the JENKINS-19022 fix. It is unfortunate, but I don't see how to include the JENKINS-19022 fix and retain compatibility with git plugin 3.

mark.earl.waite@gmail.com (JIRA)

unread,
Jul 6, 2019, 7:49:03 PM7/6/19
to jenkinsc...@googlegroups.com
Mark Waite resolved as Fixed
 

Resolved in git plugin 4.0.0-beta10

Change By: Mark Waite
Status: Open Resolved
Resolution: Fixed

mark.earl.waite@gmail.com (JIRA)

unread,
Jul 6, 2019, 7:51:02 PM7/6/19
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages