[JIRA] [git-plugin] (JENKINS-30283) syntax error determining changeset

13 views
Skip to first unread message

dseay@bluestripe.com (JIRA)

unread,
Sep 3, 2015, 10:36:02 AM9/3/15
to jenkinsc...@googlegroups.com
Douglas Seay created an issue
 
Jenkins / Bug JENKINS-30283
syntax error determining changeset
Issue Type: Bug Bug
Assignee: Nicolas De Loof
Components: git-plugin
Created: 03/Sep/15 2:35 PM
Environment: jenkins 1.627 on RHEL 7. All plugins are current.
Priority: Minor Minor
Reporter: Douglas Seay

I'm looking into migrating from subversion to git, so I've created a git playpen and I'm trying to build it. The clone went well enough, but after committing a change, I get the following error determining the change set (which is exactly one file in this case).

Checking out Revision d90fbc8159fcfe465fad42c4af4c5b502111e709 (refs/remotes/origin/master)
> git config core.sparsecheckout # timeout=10
> git checkout -f d90fbc8159fcfe465fad42c4af4c5b502111e709 # timeout=10
> git rev-list d90fbc8159fcfe465fad42c4af4c5b502111e709 # timeout=10
git whatchanged --no-abbrev -M --format=commit %H%ntree %T%nparent %P%nauthor %aN <%aE> %ai%ncommitter %cN <%cE> %ci%n%n%w(76,4,4)%s%n%n%b -n 1024 d90fbc8159fcfe465fad42c4af4c5b502111e709 ^d90fbc8159fcfe465fad42c4af4c5b502111e709
fatal: invalid --pretty format: commit
ERROR: Unable to retrieve changeset
hudson.plugins.git.GitException: Error launching git whatchanged
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:765)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145)
at hudson.remoting.UserRequest.perform(UserRequest.java:121)
at hudson.remoting.UserRequest.perform(UserRequest.java:49)
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:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at ......remote call to doug-rhel7-base(Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1413)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:221)
at hudson.remoting.Channel.call(Channel.java:778)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:145)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:131)
at com.sun.proxy.$Proxy54.execute(Unknown Source)
at hudson.plugins.git.GitSCM.computeChangeLog(GitSCM.java:1148)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1069)
at hudson.scm.SCM.checkout(SCM.java:485)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1277)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
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:381)
[EnvInject] - Executing scripts and injecting environment variables after the SCM step.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

mark.earl.waite@gmail.com (JIRA)

unread,
Sep 3, 2015, 10:47:01 AM9/3/15
to jenkinsc...@googlegroups.com
Mark Waite commented on Bug JENKINS-30283
 
Re: syntax error determining changeset

What version of git is installed on your Red Hat 7 machine, and where is it installed?

What locale are you running on your Red Hat 7 machine?

Is there anything else especially distinctive about your Red Hat 7 machine which would make it distinctive from the CentOS 7 x64 machine that is included in the standard automated tests of the git plugin and the git client plugin?

dseay@bluestripe.com (JIRA)

unread,
Sep 3, 2015, 11:46:02 AM9/3/15
to jenkinsc...@googlegroups.com

git version says 1.8.3.1. The RHEL box is a VM on an ESX server at our colo. It started as the base RHEL 7.0 but has gotten a decent number of yum installs. I can't think of anything that is really out of the ordinary. I don't know anything about the centos test systems, but I'd guess that they would be very similar.

mark.earl.waite@gmail.com (JIRA)

unread,
Sep 3, 2015, 1:21:02 PM9/3/15
to jenkinsc...@googlegroups.com

Thanks. I'm at the Jenkins User Conference today and likely won't be able to investigate for another 1-2 days. It surprises me that message would occur for you, yet not be readily visible in many of the 60000+ installations of the git plugin. I suspect there is something different about your installation, but can't offer any useful hints about what is different.

The standard git version with CentOS 7.1 x64 is definitely tested with Jenkins, and I'm pretty sure (without access to my test coverage reports) that the "git whatchanged" call is included in automated tests.

Any chance your user account has aliased the "git whatchanged" command to something else? That seems unlikely, since you said you are just evaluating the change from subversion to git, but ...?

dseay@bluestripe.com (JIRA)

unread,
Sep 4, 2015, 9:14:02 AM9/4/15
to jenkinsc...@googlegroups.com

Mark, thanks for taking time from your conference to talk to me about this. I appreciate it.

I agree that it is likely to be on my end in that I don't think I'm doing anything that isn't pretty close to default. I'd hope that clicking boxes isn't going to break this sort of thing. The line "git whatchanged --no-abbrev -M --format=commit %H%ntree %T%nparent %P%nauthor %aN <%aE> %ai%ncommitter %cN <%cE> %ci%n%n%w(76,4,4)%s%n%n%b -n 1024 d90fbc8159fcfe465fad42c4af4c5b502111e709 ^d90fbc8159fcfe465fad42c4af4c5b502111e709" shows the problem. The word "commit" is not one of the valid values for --format. My guess is that string construction is what has gone wonky. I don't have any idea how I could have broken that.

Just in case, here are more version numbers from rpm

[RHEL7.0] doug@doug-rhel7-base:~> rpm --query --all | grep -i java | sort
java-1.8.0-openjdk-1.8.0.51-1.b16.el7_1.x86_64
java-1.8.0-openjdk-headless-1.8.0.51-1.b16.el7_1.x86_64
javapackages-tools-3.4.1-6.el7_0.noarch
python-javapackages-3.4.1-6.el7_0.noarch
tzdata-java-2015e-1.el7.noarch

[RHEL7.0] doug@doug-rhel7-base:~> rpm --query --all | grep -i git | sort
crontabs-1.11-6.20121102git.el7.noarch
git-1.8.3.1-4.el7.x86_64
git-daemon-1.8.3.1-4.el7.x86_64
git-svn-1.8.3.1-4.el7.x86_64
libertas-sd8686-firmware-20140213-0.3.git4164c23.el7.noarch
libertas-sd8787-firmware-20140213-0.3.git4164c23.el7.noarch
libertas-usb8388-firmware-20140213-0.3.git4164c23.el7.noarch
linux-firmware-20140213-0.3.git4164c23.el7.noarch
ModemManager-glib-1.1.0-6.git20130913.el7.x86_64
NetworkManager-0.9.9.1-13.git20140326.4dba720.el7.x86_64
NetworkManager-config-server-0.9.9.1-13.git20140326.4dba720.el7.x86_64
NetworkManager-glib-0.9.9.1-13.git20140326.4dba720.el7.x86_64
NetworkManager-tui-0.9.9.1-13.git20140326.4dba720.el7.x86_64
perl-Git-1.8.3.1-4.el7.noarch
xdg-utils-1.1.0-0.16.20120809git.el7.noarch

mark.earl.waite@gmail.com (JIRA)

unread,
Sep 4, 2015, 9:35:03 AM9/4/15
to jenkinsc...@googlegroups.com

I launched a Jenkins master on my CentOS 7 machine and confirmed that it is able to show changes correctly through both the "Recent Changes" and the "Changes" links of the job page. The CentOS 7 machine I'm running also has git 1.8.3.1, just as your does. Are you clicking a link other that "Changes" or "Recent Changes" when you see that problem?

It almost seems as if something is causing the quotes surrounding the format definition to be stripped from the string before it is passed to the git program. I'm sorry, but I'm at a loss to guess what makes your configuration different from mine, and different from others which are running successfully.

Is there anything in the Jenkins environment which might cause the quoting to be altered?

Do you have a script named "git" which is somehow earlier in the path and which then attempts to pass its arguments to the actual git implementation?

dseay@bluestripe.com (JIRA)

unread,
Sep 4, 2015, 10:15:05 AM9/4/15
to jenkinsc...@googlegroups.com
Douglas Seay closed an issue as Fixed
 

User error.

In an earlier test of git I had shimmed in something which echo'd the command before exec'ing the real git. That extra output must have messed up some parsing. Getting rid of the shim fixed it.

I'm sorry to have bothered everyone.

Change By: Douglas Seay
Status: Open Closed
Resolution: Fixed

mark.earl.waite@gmail.com (JIRA)

unread,
Sep 4, 2015, 10:36:02 AM9/4/15
to jenkinsc...@googlegroups.com

It was not the extra output, but the failure to handle args with spaces in the shim. That is very hard to do in a shell script

mark.earl.waite@gmail.com (JIRA)

unread,
Sep 4, 2015, 3:30:02 PM9/4/15
to jenkinsc...@googlegroups.com
Mark Waite resolved as Not A Defect
Change By: Mark Waite
Status: Reopened Resolved
Resolution: Not A Defect

mark.earl.waite@gmail.com (JIRA)

unread,
Sep 4, 2015, 3:30:02 PM9/4/15
to jenkinsc...@googlegroups.com
Mark Waite closed an issue as Not A Defect
Change By: Mark Waite
Status: Resolved Closed

mark.earl.waite@gmail.com (JIRA)

unread,
Sep 4, 2015, 3:30:02 PM9/4/15
to jenkinsc...@googlegroups.com
Mark Waite reopened an issue
Change By: Mark Waite
Resolution: Fixed
Status: Closed Reopened

Anton.BarroquilloJr@willistowerswatson.com (JIRA)

unread,
May 22, 2019, 2:08:02 AM5/22/19
to jenkinsc...@googlegroups.com

Hi, I encountered the same error. Can you share what exactly was causing it and what's the detailed step to resolve it please? 

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

mark.earl.waite@gmail.com (JIRA)

unread,
May 22, 2019, 7:08:02 AM5/22/19
to jenkinsc...@googlegroups.com

Review the comments by opening them and you will see the explanation

Reply all
Reply to author
Forward
0 new messages