Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-37384

Changes view issues using Mercurial with Multibranch pipeline

    XMLWordPrintable

Details

    Description

      I've created a pipeline multibranch project with mercurial repo as a source, build configuration set in Jenkinsfile in repo and set to build periodically to poll the repo every two minutes (H/2). The first step inside Jenkinsfile is checkout scm.

      It seems that for newly created branches (that have only one commit) the changes view is totally empty. On the other hand, when there are more commits it seems that they are logged twice (see screenshot below).

      This looks like a similar issue to JENKINS-30491 or JENKINS-31079 yet this time it happens with mercurial instead of git.

      Attachments

        Issue Links

          Activity

            jglick Jesse Glick added a comment -

            for newly created branches (that have only one commit) the changes view is totally empty

            JENKINS-33274

            jglick Jesse Glick added a comment - for newly created branches (that have only one commit) the changes view is totally empty JENKINS-33274
            jglick Jesse Glick added a comment -

            Probably the same basic cause as JENKINS-29326.

            jglick Jesse Glick added a comment - Probably the same basic cause as JENKINS-29326 .

            Actually this is a generic issue with WorkflowRun:

            https://github.com/jenkinsci/workflow-job-plugin/blob/08a79785a8f813c2452d54d44ccc4d3d0bdb1371/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java#L749

            When there are multiple checkouts, WorkflowRun will just add them all and does not attempt any de-dup (now that it is not possible to perform a generic de-dup is a separate issue)

             

            stephenconnolly Stephen Connolly added a comment - Actually this is a generic issue with WorkflowRun: https://github.com/jenkinsci/workflow-job-plugin/blob/08a79785a8f813c2452d54d44ccc4d3d0bdb1371/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java#L749 When there are multiple checkouts, WorkflowRun will just add them all and does not attempt any de-dup (now that it is not possible to perform a generic de-dup is a separate issue)  

            I should note that the Git Plugin has a hack to work around this bug in WorkflowRun: https://github.com/jenkinsci/git-plugin/blob/31fedce9c41c9006c886835e03c9fe825d49aba6/src/main/java/hudson/plugins/git/GitSCM.java#L1146-L1153

            That hack was introduced as part of JENKINS-29326 but can probably be removed once WorkflowRun does a de-dup (note that otherwise JENKINS-29326 was following the correct principle for de-duping the actions that it was adding... though using a too strict equality comparison)

            stephenconnolly Stephen Connolly added a comment - I should note that the Git Plugin has a hack to work around this bug in WorkflowRun: https://github.com/jenkinsci/git-plugin/blob/31fedce9c41c9006c886835e03c9fe825d49aba6/src/main/java/hudson/plugins/git/GitSCM.java#L1146-L1153 That hack was introduced as part of JENKINS-29326 but can probably be removed once WorkflowRun does a de-dup (note that otherwise JENKINS-29326 was following the correct principle for de-duping the actions that it was adding... though using a too strict equality comparison)
            jglick Jesse Glick added a comment -

            Whether a more generic fix is possible is TBD as far as I am concerned.

            jglick Jesse Glick added a comment - Whether a more generic fix is possible is TBD as far as I am concerned.

            People

              Unassigned Unassigned
              bartlomiej_beton Bartlomiej Beton
              Votes:
              4 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated: