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

Changes view issues using Mercurial with Multibranch pipeline

    XMLWordPrintable

    Details

    • Similar Issues:

      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

            bartlomiej_beton Bartlomiej Beton created issue -
            bartlomiej_beton Bartlomiej Beton made changes -
            Field Original Value New Value
            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 !Zrzut ekranu z 2016-08-12 o 21.48.08.png|thumbnail! ).

            This looks like a similar issue to https://issues.jenkins-ci.org/browse/JENKINS-30491 or https://issues.jenkins-ci.org/browse/JENKINS-31079 yet this time it happens with mercurial instead of git.
            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).
            !Zrzut ekranu z 2016-08-12 o 21.48.08.png|thumbnail!

            This looks like a similar issue to https://issues.jenkins-ci.org/browse/JENKINS-30491 or https://issues.jenkins-ci.org/browse/JENKINS-31079 yet this time it happens with mercurial instead of git.
            jglick Jesse Glick made changes -
            Component/s workflow-multibranch-plugin [ 21465 ]
            jglick Jesse Glick made changes -
            Labels multibranch pipeline
            jglick Jesse Glick made changes -
            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).
            !Zrzut ekranu z 2016-08-12 o 21.48.08.png|thumbnail!

            This looks like a similar issue to https://issues.jenkins-ci.org/browse/JENKINS-30491 or https://issues.jenkins-ci.org/browse/JENKINS-31079 yet this time it happens with mercurial instead of git.
            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).
            !Zrzut ekranu z 2016-08-12 o 21.48.08.png|thumbnail!

            This looks like a similar issue to JENKINS-30491 or JENKINS-31079 yet this time it happens with mercurial instead of git.
            Hide
            jglick Jesse Glick added a comment -

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

            JENKINS-33274

            Show
            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 made changes -
            Link This issue relates to JENKINS-29326 [ JENKINS-29326 ]
            Hide
            jglick Jesse Glick added a comment -

            Probably the same basic cause as JENKINS-29326.

            Show
            jglick Jesse Glick added a comment - Probably the same basic cause as JENKINS-29326 .
            stephenconnolly Stephen Connolly made changes -
            Link This issue is related to JENKINS-39487 [ JENKINS-39487 ]
            stephenconnolly Stephen Connolly made changes -
            Labels multibranch pipeline multibranch pipeline scm-api-tidy-scrub
            stephenconnolly Stephen Connolly made changes -
            Labels multibranch pipeline scm-api-tidy-scrub multibranch pipeline scm-api-tidy
            stephenconnolly Stephen Connolly made changes -
            Component/s workflow-job-plugin [ 21716 ]
            Component/s mercurial-plugin [ 15502 ]
            Hide
            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)

             

            Show
            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)  
            Hide
            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)

            Show
            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)
            Hide
            jglick Jesse Glick added a comment -

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

            Show
            jglick Jesse Glick added a comment - Whether a more generic fix is possible is TBD as far as I am concerned.
            jglick Jesse Glick made changes -
            Component/s mercurial-plugin [ 15502 ]
            Assignee Jesse Glick [ jglick ]
            stephenconnolly Stephen Connolly made changes -
            Labels multibranch pipeline scm-api-tidy multibranch pipeline scm-api-tidy-reject
            cloudbees CloudBees Inc. made changes -
            Remote Link This issue links to "CloudBees Internal CD-39 (Web Link)" [ 19123 ]
            vivek Vivek Pandey made changes -
            Labels multibranch pipeline scm-api-tidy-reject multibranch pipeline scm-api-tidy-reject triaged-2018-11

              People

              • Assignee:
                Unassigned
                Reporter:
                bartlomiej_beton Bartlomiej Beton
              • Votes:
                4 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated: