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

[REGRESSION] Git fails to trigger from polling for refs/heads/ style branch name

    Details

    • Similar Issues:

      Description

      Polling does not work when the specified branch is of the form refs/heads/feature/myfeature

      Expected:

      [poll] Last Built Revision: Revision abcdef1234 (refs/remotes/origin/feature/myfeature)
      using GIT_SSH to set credentials Git Credentials
       > git --version # timeout=10
       > git ls-remote -h ssh://server/git/project.git refs/heads/feature/myfeature # timeout=10
      [poll] Latest remote head revision is: defabc4321
      Done. Took 1.8 sec
      Changes found
      

      Actual:

      [poll] Last Built Revision: Revision abcdef1234 (refs/remotes/origin/feature/myfeature)
      using GIT_SSH to set credentials Git Credentials
       > git --version # timeout=10
       > git ls-remote -h ssh://server/git/project.git # timeout=10
      Done. Took 1.8 sec
      

      Workaround:
      Downgrade to Git-Plugin 2.3.4

        Attachments

          Issue Links

            Activity

            Hide
            markewaite Mark Waite added a comment - - edited

            I believe the breaking change between 2.3.4 and 2.3.5 is 85463e9. More investigation is needed.

            The investigation is proceeding on my forked copy of the repository in branches named "master-JENKINS-28506*".

            Show
            markewaite Mark Waite added a comment - - edited I believe the breaking change between 2.3.4 and 2.3.5 is 85463e9 . More investigation is needed. The investigation is proceeding on my forked copy of the repository in branches named "master- JENKINS-28506 *".
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Added the pull request link

            Show
            oleg_nenashev Oleg Nenashev added a comment - Added the pull request link
            Hide
            ndeloof Nicolas De Loof added a comment -
            Show
            ndeloof Nicolas De Loof added a comment - Could you please test this development build : https://jenkins.ci.cloudbees.com/job/plugins/job/git-plugin/816/org.jenkins-ci.plugins$git/ ?
            Hide
            thomassuckow Thomas Suckow added a comment - - edited

            I installed the development build, the project that has a / in the branch name hasn't committed in a few days. So I did some roundabout tests because it isn't easy to make a temporary git repo in my environment either.

            The polling logs look good:

            Started on May 27, 2015 8:11:00 AM
            Using strategy: Default
            [poll] Last Built Revision: Revision abcdef (refs/remotes/origin/feature/foo)
            using GIT_SSH to set credentials Git Credentials
             > git --version # timeout=10
             > git ls-remote -h ssh://server/git/project.git # timeout=10
            [poll] Latest remote head revision on refs/heads/feature/foo is: abcdef - already built by 212
            Done. Took 0.77 sec
            No changes
            
            Started on May 27, 2015 8:30:58 AM
            Using strategy: Default
            [poll] Last Built Revision: Revision fecba (origin/master)
            using GIT_SSH to set credentials Git Credentials
             > git --version # timeout=10
             > git ls-remote -h ssh://server/git/project.git # timeout=10
            [poll] Latest remote head revision on refs/heads/feature/foo is: abcdef
            Done. Took 0.85 sec
            Changes found
            

            Also seems that JENKINS-27332 is resolved (and probably has been for a while)

            Show
            thomassuckow Thomas Suckow added a comment - - edited I installed the development build, the project that has a / in the branch name hasn't committed in a few days. So I did some roundabout tests because it isn't easy to make a temporary git repo in my environment either. The polling logs look good: Started on May 27, 2015 8:11:00 AM Using strategy: Default [poll] Last Built Revision: Revision abcdef (refs/remotes/origin/feature/foo) using GIT_SSH to set credentials Git Credentials > git --version # timeout=10 > git ls-remote -h ssh: //server/git/project.git # timeout=10 [poll] Latest remote head revision on refs/heads/feature/foo is: abcdef - already built by 212 Done. Took 0.77 sec No changes Started on May 27, 2015 8:30:58 AM Using strategy: Default [poll] Last Built Revision: Revision fecba (origin/master) using GIT_SSH to set credentials Git Credentials > git --version # timeout=10 > git ls-remote -h ssh: //server/git/project.git # timeout=10 [poll] Latest remote head revision on refs/heads/feature/foo is: abcdef Done. Took 0.85 sec Changes found Also seems that JENKINS-27332 is resolved (and probably has been for a while)
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Mark Waite
            Path:
            src/test/resources/namespaceBranchRepo.ls-remote
            src/test/resources/namespaceBranchRepo.zip
            http://jenkins-ci.org/commit/git-plugin/97fdec59c3ee3cbb6bfccaf5f88fb9a5fad7f194
            Log:
            Add branches to namespace branch repository zip file for tests

            Branches now look like:

            • 74ae8c2 (b_namespace3/feature4) Add file b_namespace3/feature4 on branch b_namespace3/feature4
              • 73d4779 (a_tests/b_namespace3/feature3) Add file a_tests/b_namespace3/feature3 on branch a_tests/b_namespace3/feature3
              /
              • b00d0c5 (tag: TagA, branchForTagA) Local branch 'branchForTagA'
              /
              • dde47cb (tag: TagBAnnotated, branchForTagBAnnotated) Local branch 'branchForTagBAnnotated'
              /
              • 3e73b26 (a_tests/b_namespace2/master) Local branch 'a_tests/b_namespace2/master'
              /
              • d940b84 (a_tests/b_namespace3/master) Local branch 'a_tests/b_namespace3/master'
              /
              • 0b97e49 (b_namespace3/master) Local branch 'b_namespace3/master'
              /
              • 1aeaf86 (a_tests/b_namespace1/master) Local branch 'a_tests/b_namespace1/master'
              /
            • 86e6eec (HEAD -> master) Initial commit

            Adds new branches to test JENKINS-28506, introduced in changes between
            git plugin 2.3.4 and 2.3.5.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Mark Waite Path: src/test/resources/namespaceBranchRepo.ls-remote src/test/resources/namespaceBranchRepo.zip http://jenkins-ci.org/commit/git-plugin/97fdec59c3ee3cbb6bfccaf5f88fb9a5fad7f194 Log: Add branches to namespace branch repository zip file for tests Branches now look like: 74ae8c2 (b_namespace3/feature4) Add file b_namespace3/feature4 on branch b_namespace3/feature4 73d4779 (a_tests/b_namespace3/feature3) Add file a_tests/b_namespace3/feature3 on branch a_tests/b_namespace3/feature3 / b00d0c5 (tag: TagA, branchForTagA) Local branch 'branchForTagA' / dde47cb (tag: TagBAnnotated, branchForTagBAnnotated) Local branch 'branchForTagBAnnotated' / 3e73b26 (a_tests/b_namespace2/master) Local branch 'a_tests/b_namespace2/master' / d940b84 (a_tests/b_namespace3/master) Local branch 'a_tests/b_namespace3/master' / 0b97e49 (b_namespace3/master) Local branch 'b_namespace3/master' / 1aeaf86 (a_tests/b_namespace1/master) Local branch 'a_tests/b_namespace1/master' / 86e6eec (HEAD -> master) Initial commit Adds new branches to test JENKINS-28506 , introduced in changes between git plugin 2.3.4 and 2.3.5.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Mark Waite
            Path:
            src/test/java/hudson/plugins/git/CliGitSCMTriggerLocalPollTest.java
            src/test/java/hudson/plugins/git/CliGitSCMTriggerRemotePollTest.java
            src/test/java/hudson/plugins/git/JGitSCMTriggerLocalPollTest.java
            src/test/java/hudson/plugins/git/JGitSCMTriggerRemotePollTest.java
            src/test/java/hudson/plugins/git/SCMTriggerTest.java
            http://jenkins-ci.org/commit/git-plugin/5b5a00458f98055fa294713e2cf0a8fd67d8c88c
            Log:
            Add additional SCM trigger tests to show JENKINS-28506

            Reduce special cases in trigger tests to 1 isChangeExpected() method.
            Several of the tests show known existing remote polling issues. Those
            known issues cannot be resolved without significant risk to backward
            compatibility, so they are intentionally not being fixed.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Mark Waite Path: src/test/java/hudson/plugins/git/CliGitSCMTriggerLocalPollTest.java src/test/java/hudson/plugins/git/CliGitSCMTriggerRemotePollTest.java src/test/java/hudson/plugins/git/JGitSCMTriggerLocalPollTest.java src/test/java/hudson/plugins/git/JGitSCMTriggerRemotePollTest.java src/test/java/hudson/plugins/git/SCMTriggerTest.java http://jenkins-ci.org/commit/git-plugin/5b5a00458f98055fa294713e2cf0a8fd67d8c88c Log: Add additional SCM trigger tests to show JENKINS-28506 Reduce special cases in trigger tests to 1 isChangeExpected() method. Several of the tests show known existing remote polling issues. Those known issues cannot be resolved without significant risk to backward compatibility, so they are intentionally not being fixed.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Nicolas De Loof
            Path:
            src/main/java/hudson/plugins/git/GitSCM.java
            http://jenkins-ci.org/commit/git-plugin/f63e20a7f7c3f1d347d0357e61e2612ee40a983d
            Log:
            [FIX JENKINS-28506] restore support fo refs/heads/branch branch specifier

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nicolas De Loof Path: src/main/java/hudson/plugins/git/GitSCM.java http://jenkins-ci.org/commit/git-plugin/f63e20a7f7c3f1d347d0357e61e2612ee40a983d Log: [FIX JENKINS-28506] restore support fo refs/heads/branch branch specifier
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Nicolas De loof
            Path:
            src/main/java/hudson/plugins/git/BranchSpec.java
            src/main/java/hudson/plugins/git/GitSCM.java
            src/test/java/hudson/plugins/git/CliGitSCMTriggerRemotePollTest.java
            src/test/java/hudson/plugins/git/JGitSCMTriggerRemotePollTest.java
            src/test/java/hudson/plugins/git/SCMTriggerTest.java
            src/test/java/hudson/plugins/git/TestBranchSpec.java
            src/test/resources/namespaceBranchRepo.ls-remote
            src/test/resources/namespaceBranchRepo.zip
            http://jenkins-ci.org/commit/git-plugin/c9a8e11fd7f63f6bda64c0cefd430e1a9ae32db5
            Log:
            Merge pull request #324 from ndeloof/JENKINS-28506

            [FIXED JENKINS-28506] - Git fails to trigger from polling for refs/heads/ style branch name

            Compare: https://github.com/jenkinsci/git-plugin/compare/06415b9b9d3d...c9a8e11fd7f6

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nicolas De loof Path: src/main/java/hudson/plugins/git/BranchSpec.java src/main/java/hudson/plugins/git/GitSCM.java src/test/java/hudson/plugins/git/CliGitSCMTriggerRemotePollTest.java src/test/java/hudson/plugins/git/JGitSCMTriggerRemotePollTest.java src/test/java/hudson/plugins/git/SCMTriggerTest.java src/test/java/hudson/plugins/git/TestBranchSpec.java src/test/resources/namespaceBranchRepo.ls-remote src/test/resources/namespaceBranchRepo.zip http://jenkins-ci.org/commit/git-plugin/c9a8e11fd7f63f6bda64c0cefd430e1a9ae32db5 Log: Merge pull request #324 from ndeloof/ JENKINS-28506 [FIXED JENKINS-28506] - Git fails to trigger from polling for refs/heads/ style branch name Compare: https://github.com/jenkinsci/git-plugin/compare/06415b9b9d3d...c9a8e11fd7f6

              People

              • Assignee:
                ndeloof Nicolas De Loof
                Reporter:
                thomassuckow Thomas Suckow
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: