[JIRA] [github-plugin] (JENKINS-32021) URLs in changes list contain a superfluous "tree" on the end

1 view
Skip to first unread message

bruce.edge@gmail.com (JIRA)

unread,
Dec 10, 2015, 5:14:01 PM12/10/15
to jenkinsc...@googlegroups.com
Bruce Edge created an issue
 
Jenkins / Bug JENKINS-32021
URLs in changes list contain a superfluous "tree" on the end
Issue Type: Bug Bug
Assignee: Kanstantsin Shautsou
Attachments: Screen Shot 2015-12-10 at 2.06.41 PM.png
Components: github-plugin
Created: 10/Dec/15 10:13 PM
Environment: Ubuntu 12.04, jenkins 1.640, github plugin 1.14.0
Labels: changes github github-plugin
Priority: Minor Minor
Reporter: Bruce Edge

Changes page shows changes formatted like:

3.51.0-develop-115 6e9834e8 (Dec 8, 2015 10:16:19 AM)   
(commit: 62369686076f3b2edc69c1497f31312dd173df5dtree) — unknown / githubweb

(screenshot attached)

Note the "tree" on the end of the commit sha1 above.

The commit URL is:
https://github.com/Company/app/commit/62369686076f3b2edc69c1497f31312dd173df5dtree

(private repo, sorry, using "Company" and "app" in place of actual names)

Removing the "tree" at the end goes to the correct page.

Jenkins job "github project is of the format:
https://github.com/Company/app
as is the repository URL

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

gentoo.integer@gmail.com (JIRA)

unread,
Dec 10, 2015, 5:17:01 PM12/10/15
to jenkinsc...@googlegroups.com

bruce.edge@gmail.com (JIRA)

unread,
Dec 10, 2015, 6:15:02 PM12/10/15
to jenkinsc...@googlegroups.com
Bruce Edge updated an issue
 
Change By: Bruce Edge
Component/s: git-plugin
Component/s: github-plugin
Environment:
Ubuntu 12.04, jenkins 1.640, github plugin 1.14.0

git-plugin 2.4.0

bruce.edge@gmail.com (JIRA)

unread,
Dec 10, 2015, 6:16:01 PM12/10/15
to jenkinsc...@googlegroups.com

bruce.edge@gmail.com (JIRA)

unread,
Dec 10, 2015, 6:35:01 PM12/10/15
to jenkinsc...@googlegroups.com
Bruce Edge assigned an issue to Mark Waite
 
Change By: Bruce Edge
Assignee: Kanstantsin Shautsou Mark Waite

dbeck@cloudbees.com (JIRA)

unread,
Dec 10, 2015, 10:18:03 PM12/10/15
to jenkinsc...@googlegroups.com
Daniel Beck commented on Bug JENKINS-32021
 
Re: URLs in changes list contain a superfluous "tree" on the end

Kanstantsin Shautsou Not really, https://github.com/jenkinsci/github-plugin/blob/3990a367f84791f37dc978cbc5cc92e3f7b3a339/src/main/java/com/coravy/hudson/plugins/github/GithubLinkAnnotator.java#L45 renders the parenthesized part of the message.

However I have no idea how tree is appended to the ID.

Bruce Edge Could you check the API for the job to see whether it reports "tree" as part of the commit ID? http://yourjenkins/job/yourjob/api/xml?tree=builds[number,changeSet[items[commitId]]] should tell us this.

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

unread,
Dec 10, 2015, 11:06:01 PM12/10/15
to jenkinsc...@googlegroups.com

In my Jenkins install, I see that rendering only when I define a GitHub URL in the job definition section ("GitHub project"). It appears in my job definition directly above the parameterized build check box.

When I remove the value from that field (and leave the "Repository Browser" section of the git plugin set to "githubweb"), the hyperlink does not include any of the SHA1 information.

I think this comes from the GItHub plugin. The field in the job definition file shows

  com.coravy.hudson.plugins.github.GithubProjectProperty plugin="git...@1.13.3"

as the config file section which stores that URL

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

unread,
Dec 10, 2015, 11:09:01 PM12/10/15
to jenkinsc...@googlegroups.com

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

unread,
Dec 10, 2015, 11:09:02 PM12/10/15
to jenkinsc...@googlegroups.com

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

unread,
Dec 10, 2015, 11:09:03 PM12/10/15
to jenkinsc...@googlegroups.com
Mark Waite assigned an issue to Unassigned
Change By: Mark Waite
Assignee: Mark Waite

bruce.edge@gmail.com (JIRA)

unread,
Dec 11, 2015, 2:33:06 AM12/11/15
to jenkinsc...@googlegroups.com
Bruce Edge commented on Bug JENKINS-32021
 
Re: URLs in changes list contain a superfluous "tree" on the end

Daniel Beck, Not sure of the exact syntax.

http://<server>:/view/Content/job/JobName/api/xml?tree=builds[1]

gets me

<mavenModuleSet><build/><build/><build/><build/><build/><build/><build/><build/><build/><build/><build/></mavenModuleSet>

What exactly are the [number,changeSet[items[commitId]]] parameters?

I tried to add /api to changes and found that going to:

http://host:/view/Content/job/JobName/115/api/115/api/xml

threw a stack trace:

ava.io.IOException: Failed to write timestamp
	at org.kohsuke.stapler.export.Property.writeTo(Property.java:122)
	at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:197)
	at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:192)
	at org.kohsuke.stapler.export.Property.writeValue(Property.java:241)
	at org.kohsuke.stapler.export.Property.writeValue(Property.java:172)
	at org.kohsuke.stapler.export.Property.writeValue(Property.java:139)
	at org.kohsuke.stapler.export.Property.writeTo(Property.java:116)
	at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:197)
	at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:192)
	at org.kohsuke.stapler.export.Property.writeValue(Property.java:241)
	at org.kohsuke.stapler.export.Property.writeValue(Property.java:139)
	at org.kohsuke.stapler.export.Property.writeTo(Property.java:116)
	at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:197)
	at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:192)
	at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:192)
	at org.kohsuke.stapler.export.Model.writeTo(Model.java:164)
	at org.kohsuke.stapler.ResponseImpl.serveExposedBean(ResponseImpl.java:267)
	at hudson.model.Api.doXml(Api.java:100)
	at sun.reflect.GeneratedMethodAccessor2397.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
	at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:121)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
	at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:211)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
	at org.kohsuke.stapler.MetaClass$13.dispatch(MetaClass.java:411)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
	at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:249)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
	at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:249)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
	at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
	at hudson.plugins.audit_trail.AuditTrailFilter.doFilter(AuditTrailFilter.java:95)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:129)
	at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:59)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:129)
	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:200)
	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:178)
	at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:85)
	at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:99)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:129)
	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:123)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
	at org.eclipse.jetty.server.Server.handle(Server.java:370)
	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
	at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:949)
	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1011)
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
	at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
	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)
Caused by: java.lang.reflect.InvocationTargetException
	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 org.kohsuke.stapler.export.MethodProperty.getValue(MethodProperty.java:66)
	at org.kohsuke.stapler.export.Property.writeTo(Property.java:116)
	... 109 more
Caused by: java.lang.NullPointerException
	at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1380)
	at java.text.DateFormat.parse(DateFormat.java:355)
	at hudson.plugins.git.GitChangeSet.getTimestamp(GitChangeSet.java:214)
	... 115 more

bruce.edge@gmail.com (JIRA)

unread,
Dec 11, 2015, 2:34:03 AM12/11/15
to jenkinsc...@googlegroups.com
Bruce Edge edited a comment on Bug JENKINS-32021
[~danielbeck], Not sure of the exact syntax.

{noformat}

http://<server>:/view/Content/job/JobName/api/xml?tree=builds[1]
{noformat}

gets me 


{noformat}

<mavenModuleSet><build/><build/><build/><build/><build/><build/><build/><build/><build/><build/><build/></mavenModuleSet>
{noformat}



What exactly are the [number,changeSet[items[commitId]]] parameters?

I  tried to add  played around adding  /api to  changes  things  and found that going to:


{noformat}
http://host:/view/Content/job/JobName/115/api/115/api/xml
{noformat}


threw a stack trace:


{noformat}
{noformat}



bruce.edge@gmail.com (JIRA)

unread,
Dec 11, 2015, 2:45:04 AM12/11/15
to jenkinsc...@googlegroups.com
Bruce Edge edited a comment on Bug JENKINS-32021
[~danielbeck], Not sure of the exact syntax.

{noformat}
http://<server>:/view/Content/job/JobName/api/xml?tree=builds[1]
{noformat}

gets me 


{noformat}
<mavenModuleSet><build/><build/><build/><build/><build/><build/><build/><build/><build/><build/><build/></mavenModuleSet>
{noformat}


What exactly are the [number,changeSet[items[commitId]]] parameters?

I played around adding /api to things and found that going to:

{noformat}
http://host:/view/Content/job/JobName/115/api/
115/api/ xml

bruce.edge@gmail.com (JIRA)

unread,
Dec 11, 2015, 2:49:03 AM12/11/15
to jenkinsc...@googlegroups.com
Bruce Edge updated an issue

The change-detail.png shows the same "tree" appended to the end of the github sha1.

One possible bit of relative info - This was not happening when the project was configured with "multiple repos", where github was then added a one of the repos.
I got rid of the other repos, so I went back to a plain "git" repo rather than "multiple SCMs", and that's when this started showing up.

Change By: Bruce Edge
Attachment: change-detail.png

bruce.edge@gmail.com (JIRA)

unread,
Dec 11, 2015, 3:31:04 AM12/11/15
to jenkinsc...@googlegroups.com
Bruce Edge commented on Bug JENKINS-32021
 
Re: URLs in changes list contain a superfluous "tree" on the end

Confirmed that this is repeatable by changing a multi-scm job to a git only job.
Copying the original job to a new one, and then replacing the multi-scm to a songle scm is OK.
Not a great option as it loses all the builds form the old tree, however it unblocks me.
I still think there's a bug floating around in the depths of the multi-scm -> git only change due to the problems with the change list as well as the stack exceptions I was able to generate looking at api/ data.

gentoo.integer@gmail.com (JIRA)

unread,
Dec 11, 2015, 5:23:05 AM12/11/15
to jenkinsc...@googlegroups.com
Sorry, multi-scm is not supported and will always have bugs. 

For NPE on single git project fill separate issue 
{
{ code} }
Caused by: java.lang.NullPointerException
at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1380)
at java.text.DateFormat.parse(DateFormat.java:355)
at hudson.plugins.git.GitChangeSet.getTimestamp(GitChangeSet.java:214)
{ { code} }

gentoo.integer@gmail.com (JIRA)

unread,
Dec 11, 2015, 5:23:05 AM12/11/15
to jenkinsc...@googlegroups.com

bruce.edge@gmail.com (JIRA)

unread,
Dec 11, 2015, 10:46:04 AM12/11/15
to jenkinsc...@googlegroups.com

I suppose if a project has been "polluted" by multi-scm, then all bets are off.

closing.

thanks.

bruce.edge@gmail.com (JIRA)

unread,
Dec 11, 2015, 10:47:03 AM12/11/15
to jenkinsc...@googlegroups.com
Bruce Edge closed an issue as Won't Do
 

Contamination from multi-scm

Change By: Bruce Edge
Status: Open Closed
Resolution: Won't Do
Reply all
Reply to author
Forward
0 new messages