[JIRA] (JENKINS-57660) Git plugin crash on saving the project on Amazon EC while using git for Amazon Code Commit

18 views
Skip to first unread message

audrius.meskauskas@meska.info (JIRA)

unread,
May 24, 2019, 8:24:02 AM5/24/19
to jenkinsc...@googlegroups.com
Audrius Meskauskas updated an issue
 
Jenkins / Bug JENKINS-57660
Git plugin crash on saving the project on Amazon EC while using git for Amazon Code Commit
Change By: Audrius Meskauskas
Summary: Git plugin crash on saving the project on Amazon EC while using git from for Amazon Code Commit
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

audrius.meskauskas@meska.info (JIRA)

unread,
May 24, 2019, 8:25:01 AM5/24/19
to jenkinsc...@googlegroups.com
Audrius Meskauskas updated an issue
When using Jenkins inside Amazon EC cloud (and using Amazon Code Commit git provider), the attached stack trace was observed while trying to modify and save the build project settings. The crash is relevant to hudson.plugins.git.GitSCM.

The project uses git to fetch the sources. This initially worked, and the project actually even runs the build no problem, but it cannot be modified because of the crash. Strange to see the Git plugin crash on action that itself should not include any interaction with repository.


Using Jenkins 

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

unread,
May 24, 2019, 8:26:02 AM5/24/19
to jenkinsc...@googlegroups.com

audrius.meskauskas@meska.info (JIRA)

unread,
May 24, 2019, 8:26:02 AM5/24/19
to jenkinsc...@googlegroups.com
Audrius Meskauskas updated an issue
Change By: Audrius Meskauskas
When using Jenkins inside Amazon EC cloud (and using Amazon Code Commit git provider), the attached stack trace was observed while trying to modify and save the build project settings. The crash is relevant to hudson.plugins.git.GitSCM.

The project uses git to fetch the sources. This initially worked, and the project actually even runs the build no problem, but it cannot be modified because of the crash. Strange to see the Git plugin crash on action that itself should not include any interaction with repository.

Using Jenkins  2.164.3. 

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

unread,
May 24, 2019, 8:33:01 AM5/24/19
to jenkinsc...@googlegroups.com
Mark Waite commented on Bug JENKINS-57660
 
Re: Git plugin crash on saving the project on Amazon EC while using git for Amazon Code Commit

I believe the stack trace message is correct. The refspec is invalid. It needs to be corrected.

If the Amazon Code Commit plugin created that refspec, it needs to be changed to provide a correct refspec.

If a person entered that refspec, then they need to change the refspec to use a correct value.

I agree that this is a bug, since the stack trace is much too ugly a way of showing a failure to the user.

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

unread,
May 24, 2019, 8:48:02 AM5/24/19
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-57660
I believe the stack trace message is correct.  The refspec is invalid.  It needs to be corrected.

If the Amazon Code Commit plugin created that refspec, it needs to be changed to provide a correct refspec.

If a person entered that refspec, then they need to change the refspec to use a correct value.

I
agree that this is a bug, since the stack trace is much too ugly a way of showing a failure to the user.


When I use that invalid refspec in the "Advanced" section of the git repository configuration, saving the form shows the following message:
{noformat}
java.lang.IllegalArgumentException: Invalid wildcards refs/remotes/*/master/*
at org.eclipse.jgit.transport.RefSpec.<init>(RefSpec.java:196)
at org.eclipse.jgit.transport.RefSpec.<init>(RefSpec.java:226)
at org.eclipse.jgit.lib.DefaultTypedConfigGetter.getRefSpecs(DefaultTypedConfigGetter.java:302)
at org.eclipse.jgit.lib.Config.getRefSpecs(Config.java:502)
at org.eclipse.jgit.transport.RemoteConfig.<init>(RemoteConfig.java:195)
at org.eclipse.jgit.transport.RemoteConfig.getAllRemoteConfigs(RemoteConfig.java:124)
at hudson.plugins.git.GitSCM$DescriptorImpl.createRepositoryConfigurations(GitSCM.java:1612)
Caused: hudson.plugins.git.GitException: Error creating repositories
at hudson.plugins.git.GitSCM$DescriptorImpl.createRepositoryConfigurations(GitSCM.java:1614)
at hudson.plugins.git.GitSCM.updateFromUserData(GitSCM.java:264)
at hudson.plugins.git.GitSCM.<init>(GitSCM.java:214)
at jdk.internal.reflect.GeneratedConstructorAccessor213.newInstance(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.kohsuke.stapler.RequestImpl.invokeConstructor(RequestImpl.java:529)
at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:784)
at org.kohsuke.stapler.RequestImpl.access$200(RequestImpl.java:83)
at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:678)
at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:478)
at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:474)
at hudson.model.Descriptor.newInstance(Descriptor.java:596)
{noformat}

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

unread,
May 26, 2019, 9:11:02 PM5/26/19
to jenkinsc...@googlegroups.com

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

unread,
May 26, 2019, 9:13:02 PM5/26/19
to jenkinsc...@googlegroups.com


It should instead use the more common Jenkins field validation techniques to check that the refspec is valid and highlight the field when the refspec is not valid.
Reply all
Reply to author
Forward
0 new messages