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

Changes on SCM during BuildWrapper.preCheckout are not checked out

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Blocker Blocker
    • core, (1)
      subversion-plugin
    • None
    • Windows 7 x64, Jenkins 1.456

      Changes that are made in SVN (possible other SCMs as well) AFTER start of the build but BEFORE end of BuildWrapper.preCheckout are not checked out.

      I created a BuildWrapper implementation that waits until several mirrored svn repositories are at the same revision. When the repos are in synch I want the SCM client in Jenkins to checkout the (then current) HEAD revision. Much to my surprise, the HEAD revision at the start of the build is checked out instead.

      Reproduction scenario:
      Configure a job with the attached SleepBuildWrapper.
      Trigger a new build.
      Within 20 seconds, commit a change to a svn repo attached to the job.
      Wait until the checkout is done.

      • Note that the revision you just committed is not in the checkout.

          [JENKINS-13380] Changes on SCM during BuildWrapper.preCheckout are not checked out

          Anne Stellingwerf added a comment - - edited

          A simple BuildWrapper to ease reproducing this scenario.

          Anne Stellingwerf added a comment - - edited A simple BuildWrapper to ease reproducing this scenario.

          kutzi added a comment -

          Actually, this works 'as designed' resp. works this way because of backwards compatibility - although many people (including me) would say that this is a bad design then.
          See JENKINS-1241 for a longer discussion on this topic and especially for this issue Dean's comment from 22/Nov/10 3:13 PM

          kutzi added a comment - Actually, this works 'as designed' resp. works this way because of backwards compatibility - although many people (including me) would say that this is a bad design then. See JENKINS-1241 for a longer discussion on this topic and especially for this issue Dean's comment from 22/Nov/10 3:13 PM

          Can be worked around by using build.addAction(new RevisionParameterAction(...)), and providing SvnInfo instances for all Module URLs.

          Anne Stellingwerf added a comment - Can be worked around by using build.addAction(new RevisionParameterAction(...)), and providing SvnInfo instances for all Module URLs.

            Unassigned Unassigned
            excel20 Anne Stellingwerf
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: