• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • git-plugin

      In pipeline/workflow jobs, we get duplicate changesets in the JSON build data and also see duplicates in the UI as shown in the attachment below.

      Git plugin version is 2.5.1. Is this a known issue and been fixed in later versions?

          [JENKINS-40352] Duplicate changesets in pipeline jobs

          Mark Waite added a comment -

          No change has been made to the plugin which would change that behavior as far as I know.

          Mark Waite added a comment - No change has been made to the plugin which would change that behavior as far as I know.

          We have as similar issue (see added jenkins-change-log-issue.png)
          it's Git plugin 3.0.1
          in a multi branch pipeline scenario
          the 3 line entry is ok (it's from a jenkins pipeline library)
          but the 25 line entry duplicates entries from the 49 line entry
          where the 25 line entry would be all we need (the 49 line entry also lists older changes that are not new to this build)

          Reinhold Degenfellner added a comment - We have as similar issue (see added jenkins-change-log-issue.png) it's Git plugin 3.0.1 in a multi branch pipeline scenario the 3 line entry is ok (it's from a jenkins pipeline library) but the 25 line entry duplicates entries from the 49 line entry where the 25 line entry would be all we need (the 49 line entry also lists older changes that are not new to this build)

          I had this case when pipeline explicitly configured 'checkout git ...' instead of using 'checkout scm'. One changelog came from Git configuration in job (which is used to get Jenkinsfile) and the other came from explicitly configured scm in Jenkinsfile. Replacing 'checkout git ...' with 'checkout scm' in Jenkinsfile fixed the issue for me.

          Krzysztof Malinowski added a comment - I had this case when pipeline explicitly configured 'checkout git ...' instead of using 'checkout scm'. One changelog came from Git configuration in job (which is used to get Jenkinsfile) and the other came from explicitly configured scm in Jenkinsfile. Replacing 'checkout git ...' with 'checkout scm' in Jenkinsfile fixed the issue for me.

          We are using checkout scm anyway.
          we found a workaround by explicitly removing the the checkout in the "Jenkinsfile" from the changelog with "changelog: false".
          I still think that the bug is valid as the problem is that one of the change logs is showing a lot more commits than the other.
          We are using that changelog for a team build dashboard which means there are to many culprits shown on broken builds.

          Reinhold Degenfellner added a comment - We are using checkout scm anyway. we found a workaround by explicitly removing the the checkout in the "Jenkinsfile" from the changelog with "changelog: false". I still think that the bug is valid as the problem is that one of the change logs is showing a lot more commits than the other. We are using that changelog for a team build dashboard which means there are to many culprits shown on broken builds.

          James Femia added a comment -

          I have a similar issue with SVN changelogs when the repo is checked out on multiple nodes in a pipeline. The same revision items are present in the list, once per checkout.

          James Femia added a comment - I have a similar issue with SVN changelogs when the repo is checked out on multiple nodes in a pipeline. The same revision items are present in the list, once per checkout.

          Setting "changelog: false" prevents any configured scm browser to show links to the files in the changeset. 

          Lionel Orellana added a comment - Setting "changelog: false" prevents any configured scm browser to show links to the files in the changeset. 

          Edgars Batna added a comment - - edited

          +1. I guess it could use some logic for resolving duplicates. It could be that the same URL and revisions are checked out to multiple places during execution of the job. It's good to see all changesets, but, as I see it, duplicates should be eliminated.

           

          EDIT:

          Meanwhile, a few commits in externals cause 40 revisions to be reported. This is far from a minor problem. I can imagine Pipeline blowing up the Jenkins Server on large enough projects due to this.

          Edgars Batna added a comment - - edited +1. I guess it could use some logic for resolving duplicates. It could be that the same URL and revisions are checked out to multiple places during execution of the job. It's good to see all changesets, but, as I see it, duplicates should be eliminated.   EDIT: Meanwhile, a few commits in externals cause 40 revisions to be reported. This is far from a minor problem. I can imagine Pipeline blowing up the Jenkins Server on large enough projects due to this.

            Unassigned Unassigned
            pxk5958 Pratith Kanagaraj
            Votes:
            24 Vote for this issue
            Watchers:
            27 Start watching this issue

              Created:
              Updated: