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

Wrong revision built when using post-commit hook and a commit occur during quiet period

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • subversion-plugin
    • None
    • Windows Server 2008
      Hudson 1.388
      Subversion plugin 1.21

      This appears to be related to a change made in Subversion plugin 1.18:

      "Builds triggered via the post-commit hook check out from the revision specified by the hook. The hook specifies the revision with either the rev query parameter, or the X-Hudson-Subversion-Revision HTTP header."

      To reproduce:
      1) Set up SVN to use a post-commit hook as described on the Subversion plugin page
      2) Set up a Hudson job using subversion as its SCM and a quiet period (mine is 60 seconds)
      3) Commit a change and note the resulting revision number.
      4) Observe job is queued in hudson
      5) Commit another change before quiet period expires and note the revision number.
      6) Quiet period resets as expected
      7) Once quiet period expires the job will run, but it will checkout with the revision number from step 3 instead of 5

      This is a major problem because the commit in step (5) above are ignored by hudson. The build that is done does not incorporate the second changes, and a second build is not triggered. The behavior I would expect is that if the changes are committed before the quiet period is expired, then those changes should be included in the upcoming build.

      I haven't investigated fully, but it seems that the Hudson core code has a mechanism to do this with the FoldableAction interface. It might be possible to make the RevisionParameterAction implement this interface in order to update its state when a new commit notification is received.

            dty Dean Yu
            kbell Kevin Bell
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: