[JIRA] [clover-plugin] (JENKINS-34439) Clover plugin still has problems with pipeline builds

77 views
Skip to first unread message

perryt@vtls.com (JIRA)

unread,
Apr 25, 2016, 2:43:01 PM4/25/16
to jenkinsc...@googlegroups.com
Todd Perry created an issue
 
Jenkins / Bug JENKINS-34439
Clover plugin still has problems with pipeline builds
Issue Type: Bug Bug
Assignee: stephenconnolly
Components: clover-plugin
Created: 2016/Apr/25 6:42 PM
Priority: Minor Minor
Reporter: Todd Perry

After noting in

JENKINS-27302 that version 4.6.0 of the clover plugin supports pipeline builds, I tried setting it up on a test job using a custom step as documented:
    step([$class: 'CloverPublisher', cloverReportDir: 'build/tests/coverage', cloverReportFileName: 'clover.xml'])

This appears to work and puts a clover test result section in the results for an individual build, but after 2 builds it still doesn't display a coverage graph in the main Status page for the job.

I tried restarting Jenkins, and got the following stack trace:

WARNING: failed to load hudson.plugins.clover.CloverBuildAction@33885e1d from /var/lib/jenkins/jobs/plonk/builds/13/build.xml
java.lang.ClassCastException: org.jenkinsci.plugins.workflow.job.WorkflowRun cannot be cast to hudson.model.AbstractBuild
	at hudson.plugins.clover.CloverBuildAction.onLoad(CloverBuildAction.java:156)
	at hudson.model.Run.onLoad(Run.java:346)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun.onLoad(WorkflowRun.java:462)
	at hudson.model.RunMap.retrieve(RunMap.java:224)
	at hudson.model.RunMap.retrieve(RunMap.java:56)
	at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:479)
	at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:461)
	at jenkins.model.lazy.AbstractLazyLoadRunMap.getByNumber(AbstractLazyLoadRunMap.java:367)
	at jenkins.model.lazy.AbstractLazyLoadRunMap.search(AbstractLazyLoadRunMap.java:332)
	at jenkins.model.lazy.LazyBuildMixIn$RunMixIn.getPreviousBuild(LazyBuildMixIn.java:355)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun.getPreviousBuild(WorkflowRun.java:178)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun.getPreviousBuild(WorkflowRun.java:109)
	at hudson.model.Job.getBuildStabilityHealthReport(Job.java:1169)
	at hudson.model.Job.getBuildHealthReports(Job.java:1129)

After this, clover stats don't display anywhere in the build, including the individual build status page. The only way I could fix the startup error is to delete all the build histories that had clover info in them.

I'm not sure if the stack trace and failure to display the graph are actually the same problem.

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

neil.jarrett@maglabs.net (JIRA)

unread,
Jul 4, 2016, 5:59:02 AM7/4/16
to jenkinsc...@googlegroups.com
Neil Jarrett commented on Bug JENKINS-34439
 
Re: Clover plugin still has problems with pipeline builds

I am also seeing that after a period of time (not sure how long) the stats disappear. On a build page it is showing:

Clover Code Coverage - null% method null, conditional null, statement null.

Also, clicking on the Clover Summary Report gives the following stack trace error:

com.google.common.util.concurrent.UncheckedExecutionException: java.lang.NullPointerException
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2234)
	at com.google.common.cache.LocalCache.get(LocalCache.java:3965)
	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3969)
	at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4829)
	at hudson.plugins.clover.CloverBuildAction.getResult(CloverBuildAction.java:162)
	at hudson.plugins.clover.CloverBuildAction.getTarget(CloverBuildAction.java:111)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:674)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
	at org.kohsuke.stapler.MetaClass$11.dispatch(MetaClass.java:380)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
	at org.kohsuke.stapler.MetaClass$11.dispatch(MetaClass.java:380)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
	at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:233)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
	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:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:126)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	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:1652)
	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
	at org.eclipse.jetty.server.Server.handle(Server.java:499)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
	at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
	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)
Caused by: java.lang.NullPointerException
	at hudson.plugins.clover.CloverPublisher.getCloverXmlReport(CloverPublisher.java:131)
	at hudson.plugins.clover.CloverBuildAction.computeResult(CloverBuildAction.java:170)
	at hudson.plugins.clover.CloverBuildAction.access$000(CloverBuildAction.java:38)
	at hudson.plugins.clover.CloverBuildAction$1.load(CloverBuildAction.java:49)
	at hudson.plugins.clover.CloverBuildAction$1.load(CloverBuildAction.java:47)
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3568)
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2350)
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2313)
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2228)
	... 70 more
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

stephenconnolly@java.net (JIRA)

unread,
Jul 13, 2016, 4:20:04 AM7/13/16
to jenkinsc...@googlegroups.com
stephenconnolly assigned an issue to Unassigned
 
Change By: stephenconnolly
Assignee: stephenconnolly

mrose@sjm.com (JIRA)

unread,
Oct 3, 2016, 6:40:05 PM10/3/16
to jenkinsc...@googlegroups.com
Michael Rose commented on Bug JENKINS-34439
 
Re: Clover plugin still has problems with pipeline builds

I am seeing similar behaviour. The following error is in the console output:

IOException when checking workspace path:remote file operation failed: /JENKINS/WORKSPACE/PATH/FOR/PROJECT at hudson.remoting.Channel@7e2840c5:HOSTNAME: java.io.IOException: Unable to serialize hudson.FilePath$FileCallableWrapper@1359cfca

mrose@sjm.com (JIRA)

unread,
Oct 3, 2016, 7:04:02 PM10/3/16
to jenkinsc...@googlegroups.com
Michael Rose edited a comment on Bug JENKINS-34439
I am seeing similar behaviour. The following error is in the console output:

Originally I was seeing errors like this. When this was happening I would be able to access the Clover Summary Report but the Clover HTML Report was an empty page.
{quote}IOException when checking workspace path:remote file operation failed: /JENKINS/WORKSPACE/PATH/FOR/PROJECT at hudson.remoting.Channel@7e2840c5:HOSTNAME: java.io.IOException: Unable to serialize hudson.FilePath$FileCallableWrapper@1359cfca{quote}

Now, I am getting this error in the console output:
{quote}
java.lang.NullPointerException
at hudson.FilePath.isAbsolute(FilePath.java:271)
at hudson.FilePath.resolvePathIfRelative(FilePath.java:256)
at hudson.FilePath.<init>(FilePath.java:252)
at hudson.FilePath.child(FilePath.java:1267)
at hudson.plugins.clover.CloverPublisher.performImpl(CloverPublisher.java:161)
at hudson.plugins.clover.CloverPublisher.perform(CloverPublisher.java:152)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:68)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:59)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:49)
at hudson.security.ACL.impersonate(ACL.java:213)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:47)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
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)
{quote}
And the Clover Summary report in all builds now navigate to the oops page.

david-andor@kozpontiagy.hu (JIRA)

unread,
Oct 15, 2016, 9:55:05 AM10/15/16
to jenkinsc...@googlegroups.com

Same problem here

step([
  $class: 'CloverPublisher',
  cloverReportDir: 'tests/_output/coverage',
  cloverReportFileName: 'coverage.xml'
])
[Pipeline] step
Publishing Clover coverage report...
Publishing Clover HTML report...
Publishing Clover XML report...
Publishing Clover coverage results...
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // wrap
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
java.lang.NullPointerException
	at hudson.plugins.clover.CloverPublisher.processCloverXml(CloverPublisher.java:250)
	at hudson.plugins.clover.CloverPublisher.performImpl(CloverPublisher.java:202)
	at hudson.plugins.clover.CloverPublisher.perform(CloverPublisher.java:167)
	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:69)
	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:59)
	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:52)
	at hudson.security.ACL.impersonate(ACL.java:221)
	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:49)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	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)
Finished: FAILURE

david-andor@kozpontiagy.hu (JIRA)

unread,
Oct 15, 2016, 10:04:01 AM10/15/16
to jenkinsc...@googlegroups.com
Andor Dávid edited a comment on Bug JENKINS-34439
Same problem here

{code}

step([
  $class: 'CloverPublisher',
  cloverReportDir: 'tests/_output/coverage',
  cloverReportFileName: 'coverage.xml'
])
{code}

{code}
{code}

The error above comes with
Jenkins v2.25
Clover plugin v4.7.0

Downgrade the Clover plugin to v4.6.0 solves the problem

mark.cariddi@emc.com (JIRA)

unread,
Dec 7, 2016, 5:41:02 AM12/7/16
to jenkinsc...@googlegroups.com

I am still seeing this issue with the 4.6.0 plugin.

atyaf66@gmail.com (JIRA)

unread,
Dec 7, 2016, 7:19:01 PM12/7/16
to jenkinsc...@googlegroups.com

Andor Dávid Mark Cariddi We have seen this issue on my project. It turned out to be a missing config for the clover publisher. Specifically the <failingTarget> config. This config's absence is not handled properly in the plugin, I opened an issue here: https://issues.jenkins-ci.org/browse/JENKINS-40297

<hudson.plugins.clover.CloverPublisher>
<cloverReportDir>target/site/clover</cloverReportDir>
<cloverReportFileName>clover.xml</cloverReportFileName>
<healthyTarget>
<methodCoverage>70</methodCoverage>
<conditionalCoverage>80</conditionalCoverage>
<statementCoverage>80</statementCoverage>
</healthyTarget>
<unhealthyTarget>
<methodCoverage>40</methodCoverage>
<conditionalCoverage>40</conditionalCoverage>
<statementCoverage>40</statementCoverage>
</unhealthyTarget>
<failingTarget>
<methodCoverage>0</methodCoverage>
<conditionalCoverage>0</conditionalCoverage>
<statementCoverage>0</statementCoverage>
</failingTarget>
</hudson.plugins.clover.CloverPublisher>

sureshinus@gmail.com (JIRA)

unread,
Jan 13, 2017, 6:53:07 PM1/13/17
to jenkinsc...@googlegroups.com

mparfianowicz@atlassian.com (JIRA)

unread,
Jan 16, 2017, 4:40:04 AM1/16/17
to jenkinsc...@googlegroups.com
Marek Parfianowicz commented on Bug JENKINS-34439
 
Re: Clover plugin still has problems with pipeline builds

Can you confirm that this still happens in the latest Jenkins Clover Plugin - version 4.7.1?

I'm asking because in this version I fixed NPE and closed two other tickets: JENKINS-38956 and JENKINS-39410 which look very similar to yours.

I suspect that this bug report can be closed too.

matias@semexpert.com.ar (JIRA)

unread,
Mar 27, 2017, 1:30:05 PM3/27/17
to jenkinsc...@googlegroups.com

I can confirm that in 4.7.1 still there is no coverage graph in the main Status page for the job.

 

 

This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

marek.parfianowicz@gmail.com (JIRA)

unread,
Feb 13, 2018, 5:26:02 PM2/13/18
to jenkinsc...@googlegroups.com
Marek Parfianowicz started work on Bug JENKINS-34439
 
Change By: Marek Parfianowicz
Status: Open In Progress

marek.parfianowicz@gmail.com (JIRA)

unread,
Feb 13, 2018, 5:27:05 PM2/13/18
to jenkinsc...@googlegroups.com

marek.parfianowicz@gmail.com (JIRA)

unread,
Feb 13, 2018, 5:29:04 PM2/13/18
to jenkinsc...@googlegroups.com
Marek Parfianowicz resolved as Fixed
 
Change By: Marek Parfianowicz
Status: In Progress Resolved
Resolution: Fixed
Reply all
Reply to author
Forward
0 new messages