[JIRA] (JENKINS-60064) upgrading git(client)plugin from 4.0.0rc/3.0.0rc to 4.0.0/3.0.0 resulted in 1024 changes being attributed to single commit

7 views
Skip to first unread message

jsoref+jenkins@gmail.com (JIRA)

unread,
Nov 5, 2019, 1:04:02 PM11/5/19
to jenkinsc...@googlegroups.com
Josh Soref created an issue
 
Jenkins / Bug JENKINS-60064
upgrading git(client)plugin from 4.0.0rc/3.0.0rc to 4.0.0/3.0.0 resulted in 1024 changes being attributed to single commit
Issue Type: Bug Bug
Assignee: Mark Waite
Components: git-client-plugin, git-plugin
Created: 2019-11-05 18:03
Priority: Minor Minor
Reporter: Josh Soref

We use github-branch-source-plugin to detect changes.

  Getting remote branch master...

[Tue Nov 05 11:54:53 EST 2019] Received Push event to branch master in repository org/repo UPDATED event from 192.30.252.91 ⇒ https://jenkins/github-webhook/ with timestamp Tue Nov 05 11:54:48 EST 2019
11:54:53 Connecting to https://api.github.com using us...@example.com/****** (User account for GitHub)
    Checking branch master

  Getting remote pull requests from branch master...
      ‘Jenkinsfile’ found
    Met criteria
Changes detected: master (OLD-SHA → NEXT-SHA)
 

This is what triggered the build.

I checked github and confirmed, this is a single commit.

Actual result: Both classic and blueocean show 1024 changes listed for the build instead of the expected single commit (NEXT-SHA).

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

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

unread,
Nov 5, 2019, 2:26:02 PM11/5/19
to jenkinsc...@googlegroups.com
Mark Waite commented on Bug JENKINS-60064
 
Re: upgrading git(client)plugin from 4.0.0rc/3.0.0rc to 4.0.0/3.0.0 resulted in 1024 changes being attributed to single commit

Please provide more information so that others can duplicate the problem. I've not seen such a problem.

The 4.0.0-rc version of the git plugin removed BuildData tracking from inside the plugin and replaced it with another class. That change introduced too many incompatibilities, so it was reverted for 4.0.0-beta10 and later. BuildData handling in git plugin 4.0.0 is different than in git plugin 4.0.0-rc but is the same as BuildData handling in git plugin 3.x. The return to 3.x behavior was crucial to maintain compatibility with other plugins that depend on BuildData assigned by the git plugin.

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

unread,
Nov 5, 2019, 2:27:02 PM11/5/19
to jenkinsc...@googlegroups.com

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

unread,
Nov 12, 2019, 4:59:02 PM11/12/19
to jenkinsc...@googlegroups.com
 
Re: upgrading git(client)plugin from 4.0.0rc/3.0.0rc to 4.0.0/3.0.0 resulted in 1024 changes being attributed to single commit

The MAX_CHANGELOG value in the plugin is used to limit the maximum number of changes which might be attributed to a single commit. Default value is 1024. Since computeChangeLog takes BuildData previousBuildData as an argument, I assume that the 4.0.0-rc plugin version was not recording BuildData, so the 4.0.0 plugin version attempted to report the entire history as a change in that build. The 1024 upper bound prevented it assigning the entire repository history to that build.

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

unread,
Nov 12, 2019, 5:00:03 PM11/12/19
to jenkinsc...@googlegroups.com

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

unread,
Nov 12, 2019, 5:00:04 PM11/12/19
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-60064
 
Re: upgrading git(client)plugin from 4.0.0rc/3.0.0rc to 4.0.0/3.0.0 resulted in 1024 changes being attributed to single commit
The [MAX_CHANGELOG value|https://github.com/jenkinsci/git-plugin/blob/92b522f8a5673294f1e90040675649e6241d1c5e/src/main/java/hudson/plugins/git/GitSCM.java#L1901] in the plugin is used to limit the maximum number of changes which might be attributed to a single commit.  Default value is 1024.  Since computeChangeLog takes {{BuildData previousBuildData}} as an argument, I assume that the 4.0.0-rc plugin version was not recording BuildData, so the 4.0.0 plugin version attempted to report the entire history as a change in that build.  The 1024 upper bound prevented it assigning the entire repository history to that build.

I don't plan to attempt any fix to this bug.  The git plugin 4.0.0-rc was a mistaken release that was blacklisted within two weeks of its release.

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

unread,
Nov 12, 2019, 5:00:05 PM11/12/19
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages