[JIRA] (JENKINS-58284) Avoid calling getLogFile in Log Parser Plugin

57 views
Skip to first unread message

hugodvreis@gmail.com (JIRA)

unread,
Jul 1, 2019, 9:18:03 AM7/1/19
to jenkinsc...@googlegroups.com
Hugo Reis created an issue
 
Jenkins / Bug JENKINS-58284
Avoid calling getLogFile in Log Parser Plugin
Issue Type: Bug Bug
Assignee: Martin Reinhardt
Components: log-parser-plugin
Created: 2019-07-01 13:17
Environment: Jenkins 2.182
Log Parser Plugin 2.0
Priority: Minor Minor
Reporter: Hugo Reis

2019-07-01 12:59:15.161+0000 [id=318562] WARNING o.j.p.workflow.job.WorkflowRun#getLogFile: Avoid calling getLogFile on compile.xyz #392019-07-01 12:59:15.161+0000 [id=318562] WARNING o.j.p.workflow.job.WorkflowRun#getLogFile: Avoid calling getLogFile on compile.xyz #39java.lang.UnsupportedOperationException at org.jenkinsci.plugins.workflow.job.WorkflowRun.getLogFile(WorkflowRun.java:1085) at hudson.plugins.logparser.LogParserParser.parseLog(LogParserParser.java:84) at hudson.plugins.logparser.LogParserPublisher.perform(LogParserPublisher.java:131) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) 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:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)

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

hypery2k@web.de (JIRA)

unread,
Jul 1, 2019, 2:22:02 PM7/1/19
to jenkinsc...@googlegroups.com
Martin Reinhardt updated an issue
 
Jenkins / Improvement JENKINS-58284
Change By: Martin Reinhardt
Issue Type: Bug Improvement

hypery2k@web.de (JIRA)

unread,
Jul 1, 2019, 2:24:02 PM7/1/19
to jenkinsc...@googlegroups.com
Martin Reinhardt commented on Improvement JENKINS-58284
 
Re: Avoid calling getLogFile in Log Parser Plugin

it's not a real bug as it's an warning. Do you have a suggestion what to use instead? The API seems not to be deprecated

hypery2k@web.de (JIRA)

unread,
Jul 1, 2019, 2:25:01 PM7/1/19
to jenkinsc...@googlegroups.com
Martin Reinhardt updated an issue
Change By: Martin Reinhardt

{code:bash}
2019-07-01 12:59:15.161+0000 [id=318562] WARNING o.j.p.workflow.job.WorkflowRun#getLogFile: Avoid calling getLogFile on compile.xyz #392019-07-01 12:59:15.161+0000 [id=318562] WARNING o.j.p.workflow.job.WorkflowRun#getLogFile: Avoid calling getLogFile on compile.xyz #39java.lang.UnsupportedOperationException at org.jenkinsci.plugins.workflow.job.WorkflowRun.getLogFile(WorkflowRun.java:1085) at hudson.plugins.logparser.LogParserParser.parseLog(LogParserParser.java:84) at hudson.plugins.logparser.LogParserPublisher.perform(LogParserPublisher.java:131) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) 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:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)

{code}

hypery2k@web.de (JIRA)

unread,
Jul 1, 2019, 2:25:02 PM7/1/19
to jenkinsc...@googlegroups.com
Martin Reinhardt assigned an issue to Hugo Reis
Change By: Martin Reinhardt
Assignee: Martin Reinhardt Hugo Reis

hypery2k@web.de (JIRA)

unread,
Jul 1, 2019, 4:11:02 PM7/1/19
to jenkinsc...@googlegroups.com
Martin Reinhardt started work on Improvement JENKINS-58284
 
Change By: Martin Reinhardt
Status: Open In Progress

hypery2k@web.de (JIRA)

unread,
Jul 8, 2019, 12:27:02 AM7/8/19
to jenkinsc...@googlegroups.com
Martin Reinhardt closed an issue as Won't Fix
Change By: Martin Reinhardt
Status: In Progress Closed
Resolution: Won't Fix

hugodvreis@gmail.com (JIRA)

unread,
Jul 8, 2019, 4:23:02 AM7/8/19
to jenkinsc...@googlegroups.com
Hugo Reis commented on Improvement JENKINS-58284
 
Re: Avoid calling getLogFile in Log Parser Plugin

It seems that getLogFile is deprecated: 

https://javadoc.jenkins-ci.org/hudson/model/Run.html#getLogFile--

https://javadoc.jenkins.io/plugin/workflow-job/org/jenkinsci/plugins/workflow/job/WorkflowRun.html#getLogFile--

 
Deprecated. Assumes file-based storage of the log, which is not necessarily the case for Pipelines after JEP-210. Use other methods giving various kinds of streams such as getLogReader()getLogInputStream(), or getLogText().

Reply all
Reply to author
Forward
0 new messages