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

Checkout fails with Multiple SCMs plugin on commit notification

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Labels:
      None
    • Environment:
      Jenkins 1.568
      multiple-scms-plugin 0.4-beta-1
      git-plugin 2.3.5-SNAPSHOT
    • Similar Issues:

      Description

      also similar to https://github.com/janinko/ghprb/issues/171

      Setup:

      • free style project
      • multiple scms repository setting
      • two git repositories configured
      • stash notifications for both repositories
      • a commit is pushed to second repository

      Build console output:

      commit notification 108127644b30e28d326702752aa1150e05227156
      [EnvInject] - Loading node environment variables.
      [EnvInject] - Preparing an environment for the build.
      [EnvInject] - Keeping Jenkins system variables.
      [EnvInject] - Keeping Jenkins build variables.
      [EnvInject] - Injecting as environment variables the properties content 
      [EnvInject] - Variables injected successfully.
      [EnvInject] - Injecting contributions.
      Building on master in workspace /home/jenkins/workspace/TestNotification
       > /usr/local/bin/git rev-parse --is-inside-work-tree # timeout=10
      Fetching changes from the remote Git repository
       > /usr/local/bin/git config remote.origin.url ssh://git@git.mydomain.com:7999/project/repo1.git # timeout=10
      Fetching upstream changes from ssh://git@git.mydomain.com:7999/project/repo1.git
       > /usr/local/bin/git --version # timeout=10
       > /usr/local/bin/git -c core.askpass=true fetch --tags --progress ssh://git@git.mydomain.com:7999/project/repo1.git +refs/heads/*:refs/remotes/origin/*
       > /usr/local/bin/git rev-parse 108127644b30e28d326702752aa1150e05227156^{commit} # timeout=10
      FATAL: Command "/usr/local/bin/git rev-parse 108127644b30e28d326702752aa1150e05227156^{commit}" returned status code 128:
      stdout: 108127644b30e28d326702752aa1150e05227156^{commit}
      
      stderr: fatal: ambiguous argument '108127644b30e28d326702752aa1150e05227156^{commit}': unknown revision or path not in the working tree.
      Use '--' to separate paths from revisions, like this:
      'git <command> [<revision>...] -- [<file>...]'
      
      hudson.plugins.git.GitException: Command "/usr/local/bin/git rev-parse 108127644b30e28d326702752aa1150e05227156^{commit}" returned status code 128:
      stdout: 108127644b30e28d326702752aa1150e05227156^{commit}
      
      stderr: fatal: ambiguous argument '108127644b30e28d326702752aa1150e05227156^{commit}': unknown revision or path not in the working tree.
      Use '--' to separate paths from revisions, like this:
      'git <command> [<revision>...] -- [<file>...]'
      
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1457)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1433)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1429)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1117)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1127)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:523)
      	at hudson.plugins.git.GitAPI.revParse(GitAPI.java:258)
      	at hudson.plugins.git.RevisionParameterAction.toRevision(RevisionParameterAction.java:85)
      	at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:872)
      	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:985)
      	at hudson.scm.SCM.checkout(SCM.java:488)
      	at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:118)
      	at hudson.model.AbstractProject.checkout(AbstractProject.java:1252)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:624)
      	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:530)
      	at hudson.model.Run.execute(Run.java:1732)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:234)
      

      More detailed steps for reproduction:

      • download latest jenkins and start it
      • install GIT Plugin
      • install Multiple SCMs plugin
      • create freestyle project like in screenshots
      • unpack attached repos to ~ (if you choose different directory, you will need to modify job config and the url)
      • call http://<host>:<port>/git/notifyCommit?sha1=ba2ab18cf2323b131777b380f53137491e11d136&url=%7E%2FJENKINS-26587%2Frepo2

        Attachments

          Activity

          Hide
          toypoodle Vasili Kvockin added a comment -
          Show
          toypoodle Vasili Kvockin added a comment - possible fix in https://github.com/jenkinsci/git-plugin/pull/296
          Hide
          toypoodle Vasili Kvockin added a comment -

          Jesse Glick, you were the latest commiter on multiple-scms-plugin project and current assignee seems to be inactive on this tracker for a long time. Does it make sense for me to wait till somebody assigns the issue to himself?

          Show
          toypoodle Vasili Kvockin added a comment - Jesse Glick , you were the latest commiter on multiple-scms-plugin project and current assignee seems to be inactive on this tracker for a long time. Does it make sense for me to wait till somebody assigns the issue to himself?
          Hide
          rodrigc Craig Rodrigues added a comment - - edited

          @Vasili Kvockin can you confirm the problem exists in multiple-scms-plugin 0.4? I just released it.

          Show
          rodrigc Craig Rodrigues added a comment - - edited @Vasili Kvockin can you confirm the problem exists in multiple-scms-plugin 0.4? I just released it.
          Hide
          toypoodle Vasili Kvockin added a comment -

          Craig Rodrigues, I will check it and give you feedback

          Show
          toypoodle Vasili Kvockin added a comment - Craig Rodrigues , I will check it and give you feedback
          Hide
          toypoodle Vasili Kvockin added a comment -

          still the same with 0.4 and latest git-plugin master

          Show
          toypoodle Vasili Kvockin added a comment - still the same with 0.4 and latest git-plugin master
          Hide
          rodrigc Craig Rodrigues added a comment -

          Thanks for the update. I think your patch https://github.com/jenkinsci/git-plugin/pull/296
          to the Git plugin is the way to go. Hopefully the git plugin maintainer will take it.

          Show
          rodrigc Craig Rodrigues added a comment - Thanks for the update. I think your patch https://github.com/jenkinsci/git-plugin/pull/296 to the Git plugin is the way to go. Hopefully the git plugin maintainer will take it.
          Hide
          jmdcalks james michale dupont added a comment -

          I am having this problem intermittently it seems to come and go, if I rerun the job it goes away :
          Jenkins ver. 1.609

          {{ > /usr/bin/git fetch --tags --progress ssh://git@stash.caltesting.org:2222/ops/fabfiles.git +refs/heads/:refs/remotes/origin/
          > /usr/bin/git rev-parse 2a8a48f725b1573011ce9a632f041d5d81274ac1^

          {commit} # timeout=10
          FATAL: Command "/usr/bin/git rev-parse 2a8a48f725b1573011ce9a632f041d5d81274ac1^{commit}

          " returned status code 128:
          stdout: 2a8a48f725b1573011ce9a632f041d5d81274ac1^

          {commit}

          stderr: fatal: ambiguous argument '2a8a48f725b1573011ce9a632f041d5d81274ac1^{commit}

          ': unknown revision or path not in the working tree.
          Use '--' to separate paths from revisions

          hudson.plugins.git.GitException: Command "/usr/bin/git rev-parse 2a8a48f725b1573011ce9a632f041d5d81274ac1^

          {commit}" returned status code 128:
          stdout: 2a8a48f725b1573011ce9a632f041d5d81274ac1^{commit}

          stderr: fatal: ambiguous argument '2a8a48f725b1573011ce9a632f041d5d81274ac1^

          {commit}

          ': unknown revision or path not in the working tree.
          Use '--' to separate paths from revisions

          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1591)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1567)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1563)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1249)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1261)
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:622)
          at hudson.plugins.git.GitAPI.revParse(GitAPI.java:316)
          at sun.reflect.GeneratedMethodAccessor107.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:606)
          at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:326)
          at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:301)
          at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:260)
          at hudson.remoting.UserRequest.perform(UserRequest.java:121)
          at hudson.remoting.UserRequest.perform(UserRequest.java:49)
          at hudson.remoting.Request$2.run(Request.java:325)
          at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
          at java.util.concurrent.FutureTask.run(FutureTask.java:262)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
          at java.lang.Thread.run(Thread.java:744)
          at ......remote call to slave-02(Native Method)
          at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1360)
          at hudson.remoting.UserResponse.retrieve(UserRequest.java:221)
          at hudson.remoting.Channel.call(Channel.java:753)
          at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:179)
          at com.sun.proxy.$Proxy47.revParse(Unknown Source)
          at org.jenkinsci.plugins.gitclient.RemoteGitImpl.revParse(RemoteGitImpl.java:546)
          at hudson.plugins.git.RevisionParameterAction.toRevision(RevisionParameterAction.java:85)
          at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:903)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1017)
          at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:122)
          at hudson.scm.SCM.checkout(SCM.java:484)
          at hudson.model.AbstractProject.checkout(AbstractProject.java:1270)
          at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:609)
          at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
          at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:531)
          at hudson.model.Run.execute(Run.java:1741)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          at hudson.model.ResourceController.execute(ResourceController.java:98)
          at hudson.model.Executor.run(Executor.java:374)
          [BFA] Scanning build for known causes...
          [BFA] No failure causes found
          [BFA] Done. 0s
          Finished: FAILURE}}

          Show
          jmdcalks james michale dupont added a comment - I am having this problem intermittently it seems to come and go, if I rerun the job it goes away : Jenkins ver. 1.609 {{ > /usr/bin/git fetch --tags --progress ssh://git@stash.caltesting.org:2222/ops/fabfiles.git +refs/heads/ :refs/remotes/origin/ > /usr/bin/git rev-parse 2a8a48f725b1573011ce9a632f041d5d81274ac1^ {commit} # timeout=10 FATAL: Command "/usr/bin/git rev-parse 2a8a48f725b1573011ce9a632f041d5d81274ac1^{commit} " returned status code 128: stdout: 2a8a48f725b1573011ce9a632f041d5d81274ac1^ {commit} stderr: fatal: ambiguous argument '2a8a48f725b1573011ce9a632f041d5d81274ac1^{commit} ': unknown revision or path not in the working tree. Use '--' to separate paths from revisions hudson.plugins.git.GitException: Command "/usr/bin/git rev-parse 2a8a48f725b1573011ce9a632f041d5d81274ac1^ {commit}" returned status code 128: stdout: 2a8a48f725b1573011ce9a632f041d5d81274ac1^{commit} stderr: fatal: ambiguous argument '2a8a48f725b1573011ce9a632f041d5d81274ac1^ {commit} ': unknown revision or path not in the working tree. Use '--' to separate paths from revisions at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1591) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1567) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1563) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1249) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1261) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:622) at hudson.plugins.git.GitAPI.revParse(GitAPI.java:316) at sun.reflect.GeneratedMethodAccessor107.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:326) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:301) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:260) at hudson.remoting.UserRequest.perform(UserRequest.java:121) at hudson.remoting.UserRequest.perform(UserRequest.java:49) at hudson.remoting.Request$2.run(Request.java:325) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) at ......remote call to slave-02(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1360) at hudson.remoting.UserResponse.retrieve(UserRequest.java:221) at hudson.remoting.Channel.call(Channel.java:753) at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:179) at com.sun.proxy.$Proxy47.revParse(Unknown Source) at org.jenkinsci.plugins.gitclient.RemoteGitImpl.revParse(RemoteGitImpl.java:546) at hudson.plugins.git.RevisionParameterAction.toRevision(RevisionParameterAction.java:85) at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:903) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1017) at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:122) at hudson.scm.SCM.checkout(SCM.java:484) at hudson.model.AbstractProject.checkout(AbstractProject.java:1270) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:609) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:531) at hudson.model.Run.execute(Run.java:1741) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374) [BFA] Scanning build for known causes... [BFA] No failure causes found [BFA] Done. 0s Finished: FAILURE}}
          Hide
          toypoodle Vasili Kvockin added a comment -

          updated pull request with latest master

          Show
          toypoodle Vasili Kvockin added a comment - updated pull request with latest master
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Vasili Kvockin
          Path:
          src/main/java/hudson/plugins/git/GitSCM.java
          src/main/java/hudson/plugins/git/GitStatus.java
          src/main/java/hudson/plugins/git/RevisionParameterAction.java
          src/test/java/hudson/plugins/git/GitStatusMultipleSCMTest.java
          src/test/java/hudson/plugins/git/RevisionParameterActionRemoteUrlTest.java
          src/test/java/hudson/plugins/git/TestGitRepo.java
          http://jenkins-ci.org/commit/git-plugin/1d2fb9a41e71607321c2b4838e72d37ab1cd9fbe
          Log:
          JENKINS-26587 Fix multi-scm checkout sporadic failures

          • add test for the bug
          • fix bug by excluding revisions which didn't come from the specific
            repository being evaluated
          • remote URL is stored in RevisionParameterAction
          • extend TestGitRepo to return commit SHA1 for the committed file
          • commit notification log message no longer contains "null" when no
            repository URL is supplied
          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Vasili Kvockin Path: src/main/java/hudson/plugins/git/GitSCM.java src/main/java/hudson/plugins/git/GitStatus.java src/main/java/hudson/plugins/git/RevisionParameterAction.java src/test/java/hudson/plugins/git/GitStatusMultipleSCMTest.java src/test/java/hudson/plugins/git/RevisionParameterActionRemoteUrlTest.java src/test/java/hudson/plugins/git/TestGitRepo.java http://jenkins-ci.org/commit/git-plugin/1d2fb9a41e71607321c2b4838e72d37ab1cd9fbe Log: JENKINS-26587 Fix multi-scm checkout sporadic failures add test for the bug fix bug by excluding revisions which didn't come from the specific repository being evaluated remote URL is stored in RevisionParameterAction extend TestGitRepo to return commit SHA1 for the committed file commit notification log message no longer contains "null" when no repository URL is supplied
          Hide
          markewaite Mark Waite added a comment -

          A pre-release build is available as git-plugin.hpi

          Show
          markewaite Mark Waite added a comment - A pre-release build is available as git-plugin.hpi
          Hide
          markewaite Mark Waite added a comment -

          On the master branch, will be included in git plugin 2.4.1

          Show
          markewaite Mark Waite added a comment - On the master branch, will be included in git plugin 2.4.1
          Hide
          kbaltrinic Kenneth Baltrinic added a comment -

          What is the time table for 2.4.1? On the plugin wiki page I see a time table for 2.5.x stuff that is already past. Did 2.4.1 get forgotten about? This issue is causing big headaches for us.

          Show
          kbaltrinic Kenneth Baltrinic added a comment - What is the time table for 2.4.1? On the plugin wiki page I see a time table for 2.5.x stuff that is already past. Did 2.4.1 get forgotten about? This issue is causing big headaches for us.
          Hide
          markewaite Mark Waite added a comment -

          The beta releases of 2.5.0 are unrelated to the 2.4.1 timeline. I have not forgotten about 2.4.1, but don't have time right now to test and release a new version of the git plugin.

          If it is causing bug headaches for you, can't you use the pre-release build that was referenced in the earlier comment?

          > A pre-release build is available as git-plugin.hpi

          Show
          markewaite Mark Waite added a comment - The beta releases of 2.5.0 are unrelated to the 2.4.1 timeline. I have not forgotten about 2.4.1, but don't have time right now to test and release a new version of the git plugin. If it is causing bug headaches for you, can't you use the pre-release build that was referenced in the earlier comment? > A pre-release build is available as git-plugin.hpi
          Hide
          kbaltrinic Kenneth Baltrinic added a comment - - edited

          We are generally leery of pre-release stuff here. I can try to get it approved but first, where is it? I don't see it as an attachment here, nor is it in the archive folder for the git plugin.

          Show
          kbaltrinic Kenneth Baltrinic added a comment - - edited We are generally leery of pre-release stuff here. I can try to get it approved but first, where is it? I don't see it as an attachment here, nor is it in the archive folder for the git plugin.
          Hide
          markewaite Mark Waite added a comment -

          The pre-release is hosted on my google drive (click the git-plugin.hpi link in the comment). If that's uncomfortable, you're also welcome to clone the sources and compile the plugin from source code. It should pass all the automated tests in the source code. If you're willing to do some searching, you may also be able to find the build on the CloudBees hosted job which compiles and tests the plugin when new commits are detected.

          Show
          markewaite Mark Waite added a comment - The pre-release is hosted on my google drive (click the git-plugin.hpi link in the comment). If that's uncomfortable, you're also welcome to clone the sources and compile the plugin from source code. It should pass all the automated tests in the source code. If you're willing to do some searching, you may also be able to find the build on the CloudBees hosted job which compiles and tests the plugin when new commits are detected.
          Hide
          kbaltrinic Kenneth Baltrinic added a comment - - edited

          Mark, we gave the pre-release a try for today but had to pull it out. It did fix the problem but introduced a significant new one. Previously (and correctly?) for every build, after the git checkout -f but before the git reset --hard there was a git rev-parse --verify HEAD command. Now in place of the single rev-parse command there is a git rev-parse /remotes/origin/... command for every remote branch that exists. With 17K+ remote branches, this added fifteen minutes to builds that previously took three to eight minutes total. Clearly unacceptable. Obviously we could stand to clean up some old branches but this behavior doesn't seem correct. I am not sure if I should open up a new issue for it though because it on a code base thats not even released yet. Thoughts?

          I should add that updating to the pre-relase also forced an update of git-client from 1.18.0 to 1.19.0. Rolling back the git plugin to 2.4.0 resolved the issue. We did not need to roll back the git client.

          Show
          kbaltrinic Kenneth Baltrinic added a comment - - edited Mark, we gave the pre-release a try for today but had to pull it out. It did fix the problem but introduced a significant new one. Previously (and correctly?) for every build, after the git checkout -f but before the git reset --hard there was a git rev-parse --verify HEAD command. Now in place of the single rev-parse command there is a git rev-parse /remotes/origin/... command for every remote branch that exists . With 17K+ remote branches, this added fifteen minutes to builds that previously took three to eight minutes total. Clearly unacceptable. Obviously we could stand to clean up some old branches but this behavior doesn't seem correct. I am not sure if I should open up a new issue for it though because it on a code base thats not even released yet. Thoughts? I should add that updating to the pre-relase also forced an update of git-client from 1.18.0 to 1.19.0. Rolling back the git plugin to 2.4.0 resolved the issue. We did not need to roll back the git client.
          Hide
          markewaite Mark Waite added a comment - - edited

          I don't think that change of behavior was introduced by the addition of submodule authentication. That's a very good catch, but it will need further investigation. If you're willing to help with the investigation, could you install git-client-plugin pre-release and git plugin pre-release and confirm that they also have that same behavior?

          I suspect the cause of that difference in behavior is not related to the authentication change, but would very much like to confirm that.

          Show
          markewaite Mark Waite added a comment - - edited I don't think that change of behavior was introduced by the addition of submodule authentication. That's a very good catch, but it will need further investigation. If you're willing to help with the investigation, could you install git-client-plugin pre-release and git plugin pre-release and confirm that they also have that same behavior? I suspect the cause of that difference in behavior is not related to the authentication change, but would very much like to confirm that.
          Hide
          kbaltrinic Kenneth Baltrinic added a comment -

          I set up a whole new Jenkins server to test this. The bad news is that I got the same behavior with these most recent plugins. The good news is, it is really easy to repro.

          1. Install the pre-release plugins in an otherwise baseline Jenkins install (we are using 1.625.2 LTS).
          2. Setup credentials so that it can authenticate to a remote repo (we use Atlasssian Stash).
          3. Create a freestyle job to pull from a remote git repo that has multiple branches.
          • branch specifier origin/master
          • Additional Behaviors: Prune stale remote-tracking branches (This is needed, turn it off - problem goes away)

          Run the build a few times. Every time it runs it rev-parses every remote branch.

          Revert to the current release version of the Git Plugin and rerun builds: rev-parsing stops.

          Show
          kbaltrinic Kenneth Baltrinic added a comment - I set up a whole new Jenkins server to test this. The bad news is that I got the same behavior with these most recent plugins. The good news is, it is really easy to repro. Install the pre-release plugins in an otherwise baseline Jenkins install (we are using 1.625.2 LTS). Setup credentials so that it can authenticate to a remote repo (we use Atlasssian Stash). Create a freestyle job to pull from a remote git repo that has multiple branches. branch specifier origin/master Additional Behaviors: Prune stale remote-tracking branches (This is needed, turn it off - problem goes away) Run the build a few times. Every time it runs it rev-parses every remote branch. Revert to the current release version of the Git Plugin and rerun builds: rev-parsing stops.
          Hide
          markewaite Mark Waite added a comment -

          Thanks very much for showing that the problem was introduced since the last release of the plugin. I'll make sure to investigate it before the next release of the plugin so that we don't have a regression from the change.

          Show
          markewaite Mark Waite added a comment - Thanks very much for showing that the problem was introduced since the last release of the plugin. I'll make sure to investigate it before the next release of the plugin so that we don't have a regression from the change.
          Hide
          kbaltrinic Kenneth Baltrinic added a comment -

          Still any timeline on when you expect to get a 2.4.1 out? This is a major issue for us.

          Show
          kbaltrinic Kenneth Baltrinic added a comment - Still any timeline on when you expect to get a 2.4.1 out? This is a major issue for us.
          Hide
          markewaite Mark Waite added a comment -

          Since you identified a new issue that needs to be investigated before 2.4.1 can release, my guess is that the 2.4.1 release won't be available for at least another few weeks.

          If you can identify the specific commit which caused that change of behavior, that would help me very much. If you can't, then I'll need to do that investigation, find the commit, then identify how to fix that.

          Show
          markewaite Mark Waite added a comment - Since you identified a new issue that needs to be investigated before 2.4.1 can release, my guess is that the 2.4.1 release won't be available for at least another few weeks. If you can identify the specific commit which caused that change of behavior, that would help me very much. If you can't, then I'll need to do that investigation, find the commit, then identify how to fix that.
          Hide
          osama_hf osama hf added a comment - - edited

          are there a solution of this issue ? i have installed the pre-release plugin of git, but the problem still exist.
          Any other solution ?

          thnx

          Show
          osama_hf osama hf added a comment - - edited are there a solution of this issue ? i have installed the pre-release plugin of git, but the problem still exist. Any other solution ? thnx
          Hide
          markewaite Mark Waite added a comment -

          Since you say that the solution in the pre-release does not work for you, please provided detailed instructions to duplicate the problem you are seeing with the pre-release. I've reopened the bug awaiting your detailed description to duplicate the problem.

          I'm not aware of any other technique to address the issue. Kenneth reported that the pre-release resolved the issue for him. I need to understand what's different in your case.

          Show
          markewaite Mark Waite added a comment - Since you say that the solution in the pre-release does not work for you, please provided detailed instructions to duplicate the problem you are seeing with the pre-release. I've reopened the bug awaiting your detailed description to duplicate the problem. I'm not aware of any other technique to address the issue. Kenneth reported that the pre-release resolved the issue for him. I need to understand what's different in your case.
          Hide
          osama_hf osama hf added a comment -

          Mark Waite I use the Jenkins1.639 version, and the pre-release 4.1 of git plugin.

          For my case am using a forked repository ( so i add a repository for every SCM). I get always the same problem,

          Merging Revision a54b7c523fb9703fb9bcff7ba7726c7d15bd0d17 (osama/hello/dev) to origin/dev, UserMergeOptions{mergeRemote='origin', mergeTarget='${gitlabTargetBranch}', mergeStrategy='default', fastForwardMode='--ff'}
           > git rev-parse origin/dev^{commit} # timeout=10
          FATAL: Command "git rev-parse origin/dev^{commit}" returned status code 128:
          stdout: origin/dev^{commit}
          
          stderr: fatal: ambiguous argument 'origin/dev^{commit}': unknown revision or path not in the working tree.
          Use '--' to separate paths from revisions, like this:
          'git <command> [<revision>...] -- [<file>...]'
          
          hudson.plugins.git.GitException: Command "git rev-parse origin/dev^{commit}" returned status code 128:
          stdout: origin/dev^{commit}
          
          stderr: fatal: ambiguous argument 'origin/dev^{commit}': unknown revision or path not in the working tree.
          Use '--' to separate paths from revisions, like this:
          'git <command> [<revision>...] -- [<file>...]'
          
          Show
          osama_hf osama hf added a comment - Mark Waite I use the Jenkins1.639 version, and the pre-release 4.1 of git plugin. For my case am using a forked repository ( so i add a repository for every SCM). I get always the same problem, Merging Revision a54b7c523fb9703fb9bcff7ba7726c7d15bd0d17 (osama/hello/dev) to origin/dev, UserMergeOptions{mergeRemote= 'origin' , mergeTarget= '${gitlabTargetBranch}' , mergeStrategy= ' default ' , fastForwardMode= '--ff' } > git rev-parse origin/dev^{commit} # timeout=10 FATAL: Command "git rev-parse origin/dev^{commit}" returned status code 128: stdout: origin/dev^{commit} stderr: fatal: ambiguous argument 'origin/dev^{commit}' : unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this : 'git <command> [<revision>...] -- [<file>...]' hudson.plugins.git.GitException: Command "git rev-parse origin/dev^{commit}" returned status code 128: stdout: origin/dev^{commit} stderr: fatal: ambiguous argument 'origin/dev^{commit}' : unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this : 'git <command> [<revision>...] -- [<file>...]'
          Hide
          markewaite Mark Waite added a comment -

          Please provide step by step instructions that will show the problem you're seeing in a freshly installed Jenkins using publicly hosted repositories. If you'd like a base starter Jenkins instance and are willing to use Docker and Linux, refer to my jenkins docker with updated plugins

          Show
          markewaite Mark Waite added a comment - Please provide step by step instructions that will show the problem you're seeing in a freshly installed Jenkins using publicly hosted repositories. If you'd like a base starter Jenkins instance and are willing to use Docker and Linux, refer to my jenkins docker with updated plugins
          Hide
          osama_hf osama hf added a comment -

          Hi Mark Waite

          You can see my Job in the 3 pictures below,

          When i create a merge request in my Gitlab, the job run the build to run the tests, so i get the same error.

          Merging Revision faa55d252e5ff0ec55f26b860696e6957a58df0b (osama/hi/master) to origin/master, UserMergeOptions{mergeRemote='origin', mergeTarget='${gitlabTargetBranch}', mergeStrategy='default', fastForwardMode='--ff'}
           > git rev-parse origin/master^{commit} # timeout=10
          FATAL: Command "git rev-parse origin/master^{commit}" returned status code 128:
          stdout: origin/master^{commit}
          
          stderr: fatal: ambiguous argument 'origin/master^{commit}': unknown revision or path not in the working tree.
          Use '--' to separate paths from revisions, like this:
          'git <command> [<revision>...] -- [<file>...]'
          
          hudson.plugins.git.GitException: Command "git rev-parse origin/master^{commit}" returned status code 128:
          stdout: origin/master^{commit}
          
          stderr: fatal: ambiguous argument 'origin/master^{commit}': unknown revision or path not in the working tree.
          Use '--' to separate paths from revisions, like this:
          'git <command> [<revision>...] -- [<file>...]'
          
          	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1640)
          	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1616)
          	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1612)
          	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1254)
          	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1266)
          	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:628)
          	at hudson.plugins.git.GitAPI.revParse(GitAPI.java:316)
          	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          	at java.lang.reflect.Method.invoke(Method.java:606)
          	at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:608)
          	at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:583)
          	at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:542)
          	at hudson.remoting.UserRequest.perform(UserRequest.java:120)
          	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
          	at hudson.remoting.Request$2.run(Request.java:326)
          	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
          	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
          	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
          	at java.lang.Thread.run(Thread.java:745)
          	at ......remote call to nodejsname-e0597da095d7(Native Method)
          	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
          	at hudson.remoting.UserResponse.retrieve(UserRequest.java:220)
          	at hudson.remoting.Channel.call(Channel.java:781)
          	at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:250)
          	at com.sun.proxy.$Proxy101.revParse(Unknown Source)
          	at org.jenkinsci.plugins.gitclient.RemoteGitImpl.revParse(RemoteGitImpl.java:546)
          	at hudson.plugins.git.extensions.impl.PreBuildMerge.decorateRevisionToBuild(PreBuildMerge.java:64)
          	at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:965)
          	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1054)
          	at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:129)
          	at hudson.scm.SCM.checkout(SCM.java:485)
          	at hudson.model.AbstractProject.checkout(AbstractProject.java:1276)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607)
          	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
          	at hudson.model.Run.execute(Run.java:1738)
          	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          	at hudson.model.ResourceController.execute(ResourceController.java:98)
          	at hudson.model.Executor.run(Executor.java:410)
          Finished: FAILURE
          



          Show
          osama_hf osama hf added a comment - Hi Mark Waite You can see my Job in the 3 pictures below, When i create a merge request in my Gitlab, the job run the build to run the tests, so i get the same error. Merging Revision faa55d252e5ff0ec55f26b860696e6957a58df0b (osama/hi/master) to origin/master, UserMergeOptions{mergeRemote= 'origin' , mergeTarget= '${gitlabTargetBranch}' , mergeStrategy= ' default ' , fastForwardMode= '--ff' } > git rev-parse origin/master^{commit} # timeout=10 FATAL: Command "git rev-parse origin/master^{commit}" returned status code 128: stdout: origin/master^{commit} stderr: fatal: ambiguous argument 'origin/master^{commit}' : unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this : 'git <command> [<revision>...] -- [<file>...]' hudson.plugins.git.GitException: Command "git rev-parse origin/master^{commit}" returned status code 128: stdout: origin/master^{commit} stderr: fatal: ambiguous argument 'origin/master^{commit}' : unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this : 'git <command> [<revision>...] -- [<file>...]' at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1640) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1616) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1612) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1254) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1266) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:628) at hudson.plugins.git.GitAPI.revParse(GitAPI.java:316) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:608) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:583) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:542) at hudson.remoting.UserRequest.perform(UserRequest.java:120) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang. Thread .run( Thread .java:745) at ......remote call to nodejsname-e0597da095d7(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416) at hudson.remoting.UserResponse.retrieve(UserRequest.java:220) at hudson.remoting.Channel.call(Channel.java:781) at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:250) at com.sun.proxy.$Proxy101.revParse(Unknown Source) at org.jenkinsci.plugins.gitclient.RemoteGitImpl.revParse(RemoteGitImpl.java:546) at hudson.plugins.git.extensions.impl.PreBuildMerge.decorateRevisionToBuild(PreBuildMerge.java:64) at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:965) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1054) at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:129) at hudson.scm.SCM.checkout(SCM.java:485) at hudson.model.AbstractProject.checkout(AbstractProject.java:1276) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) at hudson.model.Run.execute(Run.java:1738) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Finished: FAILURE
          Hide
          markewaite Mark Waite added a comment -

          Pull request PR296 has been included in git plugin 2.4.1 released 26 Dec 2015.

          Show
          markewaite Mark Waite added a comment - Pull request PR296 has been included in git plugin 2.4.1 released 26 Dec 2015.
          Hide
          kbaltrinic Kenneth Baltrinic added a comment -

          Mark Waite Did the issue with excessive git rev-parse invocations get resolved? I took a look through the post Dec 3 commit history and didn't see anything obvious. I plan to test this out over the holiday weekend to be sure and am hoping its is resolved.

          Show
          kbaltrinic Kenneth Baltrinic added a comment - Mark Waite Did the issue with excessive git rev-parse invocations get resolved? I took a look through the post Dec 3 commit history and didn't see anything obvious. I plan to test this out over the holiday weekend to be sure and am hoping its is resolved.
          Hide
          markewaite Mark Waite added a comment -

          No, I didn't take any steps to reduce the number of calls to git rev-parse in the git plugin 2.4.1 release or the git client plugin 1.19.1 release. I am interested if you still see the problem, but a fix for that problem will need to wait for the next release of the plugins.

          Show
          markewaite Mark Waite added a comment - No, I didn't take any steps to reduce the number of calls to git rev-parse in the git plugin 2.4.1 release or the git client plugin 1.19.1 release. I am interested if you still see the problem, but a fix for that problem will need to wait for the next release of the plugins.
          Hide
          kbaltrinic Kenneth Baltrinic added a comment -

          Just tested it out and yes, we are still seeing the issue. From our perspective, this is a major regression. I'll open up a separate ticket.

          Show
          kbaltrinic Kenneth Baltrinic added a comment - Just tested it out and yes, we are still seeing the issue. From our perspective, this is a major regression. I'll open up a separate ticket.

            People

            • Assignee:
              Unassigned
              Reporter:
              toypoodle Vasili Kvockin
            • Votes:
              2 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: