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

A failed update sets revision of build to 000000+

    Details

    • Similar Issues:

      Description

      The mercurial plugin ensures that a failed clone operation throws the corresponding exception, but that's not the case if the subsequent update fails: no check is done of the return code of the hg update command.

      The effect is that the revision of the build is set to 000000+, which causes a huge changelog calculation in the next build, as basically the calculated log includes all the changesets in the history of the repo.

      I've even seen a worse corner case, where a build is assigned up to three different revisions if, for example, two update attempts fail and the third one works when using the cache+share extension.

        Attachments

        1. 000000.png
          22 kB
          David Santiago Turiño

          Activity

          Hide
          nimeacuerdo David Santiago Turiño added a comment -
          Show
          nimeacuerdo David Santiago Turiño added a comment - Pushed tentative fix in https://github.com/jenkinsci/mercurial-plugin/pull/22
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: David Santiago Turiño
          Path:
          src/main/java/hudson/plugins/mercurial/MercurialSCM.java
          src/test/java/hudson/plugins/mercurial/MercurialSCMTest.java
          src/test/java/hudson/plugins/mercurial/SharingSCMTest.java
          http://jenkins-ci.org/commit/mercurial-plugin/b1a2f8465fced379a54b6116d0fa059fc40deff7
          Log:
          JENKINS-12829: A failed update sets revision of build to 000000+

          The mercurial plugin ensures that a failed clone operation throws the
          corresponding exception, but that's not the case if the subsequent
          update fails: no check is done of the return code of the hg update
          command.

          The effect is that the revision of the build is set to 000000+, which
          causes a huge change log calculation in the next build, as basically
          the calculated log includes all thechange setss in the history of the
          repo.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: David Santiago Turiño Path: src/main/java/hudson/plugins/mercurial/MercurialSCM.java src/test/java/hudson/plugins/mercurial/MercurialSCMTest.java src/test/java/hudson/plugins/mercurial/SharingSCMTest.java http://jenkins-ci.org/commit/mercurial-plugin/b1a2f8465fced379a54b6116d0fa059fc40deff7 Log: JENKINS-12829 : A failed update sets revision of build to 000000+ The mercurial plugin ensures that a failed clone operation throws the corresponding exception, but that's not the case if the subsequent update fails: no check is done of the return code of the hg update command. The effect is that the revision of the build is set to 000000+, which causes a huge change log calculation in the next build, as basically the calculated log includes all thechange setss in the history of the repo.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/hudson/plugins/mercurial/MercurialSCM.java
          src/test/java/hudson/plugins/mercurial/MercurialSCMTest.java
          http://jenkins-ci.org/commit/mercurial-plugin/a7483f9809464854c6af2d01db7ab6aab1c98461
          Log:
          Merge pull request #22 from nimeacuerdo/fix-multiple-revisions-per-build-issue

          [FIXED JENKINS-12829] A failed update sets revision of build to 000000+

          Compare: https://github.com/jenkinsci/mercurial-plugin/compare/99d221c...a7483f9

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/hudson/plugins/mercurial/MercurialSCM.java src/test/java/hudson/plugins/mercurial/MercurialSCMTest.java http://jenkins-ci.org/commit/mercurial-plugin/a7483f9809464854c6af2d01db7ab6aab1c98461 Log: Merge pull request #22 from nimeacuerdo/fix-multiple-revisions-per-build-issue [FIXED JENKINS-12829] A failed update sets revision of build to 000000+ Compare: https://github.com/jenkinsci/mercurial-plugin/compare/99d221c...a7483f9

            People

            • Assignee:
              nimeacuerdo David Santiago Turiño
              Reporter:
              nimeacuerdo David Santiago Turiño
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: