• Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • log-parser-plugin
    • None
    • Jenkins 2.182
      Log Parser Plugin 2.0

      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)
      

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

          Hugo Reis created issue -
          Martin Reinhardt made changes -
          Issue Type Original: Bug [ 1 ] New: Improvement [ 4 ]

          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

          Martin Reinhardt added a comment - 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
          Martin Reinhardt made changes -
          Assignee Original: Martin Reinhardt [ mreinhardt ] New: Hugo Reis [ hugo_reis ]
          Martin Reinhardt made changes -
          Description Original: 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) New:
          {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}
          Martin Reinhardt made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Martin Reinhardt made changes -
          Resolution New: Won't Fix [ 2 ]
          Status Original: In Progress [ 3 ] New: Closed [ 6 ]

          Hugo Reis added a comment -

          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().

          Hugo Reis added a comment - 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() .

            hugo_reis Hugo Reis
            hugo_reis Hugo Reis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: