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

Excluded-regions doesn't work properly with multi commits

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • git-plugin
    • None

    Description

      Let me explain you in a few words how our project setup is, before i explain the problem we got with git excluded-regions.

      We got a git repo with the following projects in it, each with its own base pom:

      connectors
      dependencies
      middletier (with clients (=interfaces) and core implementations)
      webtier

      On our hudson ci machines we got different jobs for building the connectors, dependencies, middletier clients, middletier cores and webtier.

      Now to our problem:

      Cause using the git.repo/master branch for each of the five build jobs, we added a scm polling excluded region for each build, cause we don't want to build middletier clients, if there was only a change in webtier for example.

      The excluded region is defined correctly and works absolutly fine, !BUT! only if during our 5 minutes polling interval none multiple checkins occure.

      IF there are multiple checkins, the result is like in the following example:

      1. checkin: changes on the dependencies for a client change
      2. checkin: changes on the middletier clients
      3. checkin: changes on the core implementation, necessary due to the client changes

      The result?

      Our build is broken afterwards .... now guess why!
      Cause the polling mechanism for git checkins is not implemented corrected and only checks the LAST checkin for the exlcuded region!!!

      So all our five builds are checking if there were changes in the THIRD CHECKIN ONLY, and neither clients nor dependencies will start to build, what results in a broken middletier core build.

      For us this is a major issue and we can only avoid this scenario by not using exlcuded regions and build everything, when there was any change in any project and this is absolutly unsatisfying ...

      Attachments

        Issue Links

          Activity

            Code changed in jenkins
            User: Paul Nyheim
            Path:
            http://jenkins-ci.org/commit/git-plugin/64e14c5bbb7627ed9caeeba2522e3c1522556473
            Log:
            Merge pull request #36 from hajoeichler/master

            support for multi-commit pushes (related to JENKINS-8342)

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Paul Nyheim Path: http://jenkins-ci.org/commit/git-plugin/64e14c5bbb7627ed9caeeba2522e3c1522556473 Log: Merge pull request #36 from hajoeichler/master support for multi-commit pushes (related to JENKINS-8342 )
            dogfood dogfood added a comment -

            Integrated in plugins_git-plugin #189
            JENKINS-8342 fix that all commits since the last build are taken into account on calculating the revision candidates. Before only the last commit was used. The list of candidates are used to check against the excludedRegions pattern.

            hajo.eichler : 76cb14e53e677414e863544a672c032810e6ec16
            Files :

            • src/main/java/hudson/plugins/git/util/DefaultBuildChooser.java
            dogfood dogfood added a comment - Integrated in plugins_git-plugin #189 JENKINS-8342 fix that all commits since the last build are taken into account on calculating the revision candidates. Before only the last commit was used. The list of candidates are used to check against the excludedRegions pattern. hajo.eichler : 76cb14e53e677414e863544a672c032810e6ec16 Files : src/main/java/hudson/plugins/git/util/DefaultBuildChooser.java
            biski Bill Skinner added a comment -

            I'm still having issues with this on Jenkins 1.425 and Git plugin 1.1.12, changelog reports this fixed in 1.1.10.

            Ran the following experiment:

            Single line 'abc/\.*' added to job excluded regions

            Commit of a single file before next git poll works properly for files in and out of abc/

            Commit of a file inside of abc/ followed by a file outside of abc/ between git polls properly schedules a build

            Commit of a file outside of abc/ followed by a file inside of abc/ between git polls does not schedule a build but should

            biski Bill Skinner added a comment - I'm still having issues with this on Jenkins 1.425 and Git plugin 1.1.12, changelog reports this fixed in 1.1.10. Ran the following experiment: Single line 'abc/\.*' added to job excluded regions Commit of a single file before next git poll works properly for files in and out of abc/ Commit of a file inside of abc/ followed by a file outside of abc/ between git polls properly schedules a build Commit of a file outside of abc/ followed by a file inside of abc/ between git polls does not schedule a build but should
            biski Bill Skinner added a comment -

            My bad, the line in excluded regions does not escape the '.', it's 'abc/.*'

            biski Bill Skinner added a comment - My bad, the line in excluded regions does not escape the '.', it's 'abc/.*'

            Code changed in jenkins
            User: Nicolas De Loof
            Path:
            src/test/java/hudson/plugins/git/AbstractGitTestCase.java
            src/test/java/hudson/plugins/git/GitSCMTest.java
            http://jenkins-ci.org/commit/git-plugin/9625801c185976562467a016e9d6998227c08f41
            Log:
            enable test for JENKINS-8342


            You received this message because you are subscribed to the Google Groups "Jenkins Commits" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com.
            For more options, visit https://groups.google.com/groups/opt_out.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nicolas De Loof Path: src/test/java/hudson/plugins/git/AbstractGitTestCase.java src/test/java/hudson/plugins/git/GitSCMTest.java http://jenkins-ci.org/commit/git-plugin/9625801c185976562467a016e9d6998227c08f41 Log: enable test for JENKINS-8342 – You received this message because you are subscribed to the Google Groups "Jenkins Commits" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out .

            People

              pnyheim Paul Nyheim
              oellerec oellerec
              Votes:
              3 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: