Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-43503

Performance plugin 2.2 breaks glob file finding

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • performance-plugin
    • None
    • Jenkins 2.46 LTS on RHEL

      Since updating from 2.1 to 2.2, glob lookups are failing for me.

      For example, in the "Publish performance test result report" box, in the JMeter "Report files" field, I have it configured to include "*/results/.jtl"

      This has worked for years

      However, as of the 2.2 update, I'm now getting this:

       

      ERROR: Step ‘Publish Performance test result report’ aborted due to exception:
      
      [java.io.FileNotFoundException|http://stacktrace.jenkins-ci.org/search?query=java.io.FileNotFoundException]
      
      : /var/lib/jenkins/workspace/job-name/HOST/[redacted]/**/results/*.jtl (No such file or directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.<init>(FileInputStream.java:138) at java.io.FileReader.<init>(FileReader.java:72) at hudson.plugins.performance.parsers.ParserDetector.detect(ParserDetector.java:21) at hudson.plugins.performance.parsers.ParserFactory.getParser(ParserFactory.java:26) at hudson.plugins.performance.PerformancePublisher.getParsers(PerformancePublisher.java:439) at hudson.plugins.performance.PerformancePublisher.perform(PerformancePublisher.java:481) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720) at hudson.model.Build$BuildExecution.post2(Build.java:186) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665) at hudson.model.Run.execute(Run.java:1753) at hudson.matrix.MatrixRun.run(MatrixRun.java:146) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:405)
      

      If I downgrade the plugin, it starts working as expected

      FWIW, this is on a Matrix style job.

      If I set the "Report files" field to include a specific file name, rather than glob-style, it works.

      So it looks like something in the latest release broke glob lookups, at least on Matrix jobs (I have not tested a non-matrix job)

        1. save result config.png
          save result config.png
          75 kB
        2. res.csv
          0.6 kB
        3. default1.jmx
          5 kB
        4. jmeter_test_results.jtl
          15 kB

          [JENKINS-43503] Performance plugin 2.2 breaks glob file finding

          For me too. The file (jtl) exist but I have this message :

          c:\Jenkins\workspace\PerformanceTestError>exit 0 ERROR: Step ‘Publish Performance test result report’ aborted due to exception:

          java.io.FileNotFoundException

          : c:\Jenkins\workspace\PerformanceTestError\Output\results\results.jtl (The system cannot find the path specified) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(Unknown Source) at java.io.FileInputStream.<init>(Unknown Source) at java.io.FileReader.<init>(Unknown Source) at hudson.plugins.performance.parsers.ParserDetector.detect(ParserDetector.java:21) at hudson.plugins.performance.parsers.ParserFactory.getParser(ParserFactory.java:26) at hudson.plugins.performance.PerformancePublisher.getParsers(PerformancePublisher.java:439) at hudson.plugins.performance.PerformancePublisher.perform(PerformancePublisher.java:481) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720) at hudson.model.Build$BuildExecution.post2(Build.java:186) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665) at hudson.model.Run.execute(Run.java:1758) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:405)

          Yannick FRINDEL added a comment - For me too. The file (jtl) exist but I have this message : c:\Jenkins\workspace\PerformanceTestError>exit 0 ERROR: Step ‘Publish Performance test result report’ aborted due to exception: java.io.FileNotFoundException : c:\Jenkins\workspace\PerformanceTestError\Output\results\results.jtl (The system cannot find the path specified) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(Unknown Source) at java.io.FileInputStream.<init>(Unknown Source) at java.io.FileReader.<init>(Unknown Source) at hudson.plugins.performance.parsers.ParserDetector.detect(ParserDetector.java:21) at hudson.plugins.performance.parsers.ParserFactory.getParser(ParserFactory.java:26) at hudson.plugins.performance.PerformancePublisher.getParsers(PerformancePublisher.java:439) at hudson.plugins.performance.PerformancePublisher.perform(PerformancePublisher.java:481) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720) at hudson.model.Build$BuildExecution.post2(Build.java:186) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665) at hudson.model.Run.execute(Run.java:1758) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:405)

          Andrey Pokhilko added a comment - Fixed with https://github.com/jenkinsci/performance-plugin/pull/96

          Code changed in jenkins
          User: Andrey Pokhilko
          Path:
          src/main/java/hudson/plugins/performance/PerformancePublisher.java
          src/main/java/hudson/plugins/performance/parsers/ParserFactory.java
          src/test/java/hudson/plugins/performance/parsers/ParserFactoryTest.java
          http://jenkins-ci.org/commit/performance-plugin/606994517f91f65977072b47ebac4f987b4fe24d
          Log:
          Merge pull request #96 from artem-fedorov/fix-43503

          Fix JENKINS-43503

          Compare: https://github.com/jenkinsci/performance-plugin/compare/10c66d9af907...606994517f91

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrey Pokhilko Path: src/main/java/hudson/plugins/performance/PerformancePublisher.java src/main/java/hudson/plugins/performance/parsers/ParserFactory.java src/test/java/hudson/plugins/performance/parsers/ParserFactoryTest.java http://jenkins-ci.org/commit/performance-plugin/606994517f91f65977072b47ebac4f987b4fe24d Log: Merge pull request #96 from artem-fedorov/fix-43503 Fix JENKINS-43503 Compare: https://github.com/jenkinsci/performance-plugin/compare/10c66d9af907...606994517f91

          Yannick FRINDEL added a comment - - edited

          So if I understand well, we need to update the performance plugin for solving the problem, right ?

          Yannick FRINDEL added a comment - - edited So if I understand well, we need to update the performance plugin for solving the problem, right ?

          Marc Esher added a comment -

          Wow. Thanks for the fast fix!

          Marc Esher added a comment - Wow. Thanks for the fast fix!

          yes, appreciate

          Yannick FRINDEL added a comment - yes, appreciate

          Currently, there is no release for this fix yet. You can download and install HPI snapshot from here: https://jenkins.ci.cloudbees.com/job/plugins/job/performance-plugin/ws/target/

          That would also help us verify that fix has actually fixed your specific issue.

          Andrey Pokhilko added a comment - Currently, there is no release for this fix yet. You can download and install HPI snapshot from here: https://jenkins.ci.cloudbees.com/job/plugins/job/performance-plugin/ws/target/ That would also help us verify that fix has actually fixed your specific issue.

          Ranadeep Palle added a comment - - edited

          I was having similar issue on Jenkins ver. 2.19.1 with the report so I've applied the HPI snapshot from above link and tried generating perfreport as below and am still having the same issue

          I tried with relative path

          def jmeterTestFile = 'jmeter_test'
          performanceReport parsers: [[$class: 'JMeterParser', glob: "jmeter_scripts
          $

          {jmeterTestFile}

          _results.jtl"]], relativeFailedThresholdNegative: 1.2, relativeFailedThresholdPositive: 1.89, relativeUnstableThresholdNegative: 1.8, relativeUnstableThresholdPositive: 1.5
          perfReport "jmeter_scripts
          ${jmeterTestFile}_results.jtl"

          java.lang.IllegalArgumentException: Can not detect file type: C:\tools\Jenkins\jobs\PerformanceTesting\builds\20\temp\jmeter_test_results.jtl
          at hudson.plugins.performance.parsers.ParserDetector.detect(ParserDetector.java:38)
          at hudson.plugins.performance.parsers.ParserFactory.getParser(ParserFactory.java:43)
          at hudson.plugins.performance.PerformancePublisher.getParsers(PerformancePublisher.java:439)
          at hudson.plugins.performance.PerformancePublisher.perform(PerformancePublisher.java:487)
          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(Unknown Source)
          at java.util.concurrent.FutureTask.run(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at java.lang.Thread.run(Unknown Source)

          And I tried with '*/.jtl' as below

          performanceReport parsers: [[$class: 'JMeterParser', glob: "**/*.jtl"]], relativeFailedThresholdNegative: 1.2, relativeFailedThresholdPositive: 1.89, relativeUnstableThresholdNegative: 1.8, relativeUnstableThresholdPositive: 1.5
          perfReport "*/.jtl"

          Performance: Recording JMeter reports '*/.jtl'
          Performance: Parsing JMeter report file 'C:\tools\Jenkins\jobs\PerformanceTesting\builds\21\performance-reports\JMeter\jmeter_test_results.jtl'.
          Performance: Failed to parse file 'C:\tools\Jenkins\jobs\PerformanceTesting\builds\21\performance-reports\JMeter\jmeter_test_results.jtl': Missing required column
          java.lang.Exception: Missing required column
          at hudson.plugins.performance.parsers.JMeterCsvParser.readCSVHeader(JMeterCsvParser.java:106)
          at hudson.plugins.performance.parsers.JMeterCsvParser.parse(JMeterCsvParser.java:61)
          at hudson.plugins.performance.parsers.JMeterParser.parseCsv(JMeterParser.java:191)
          at hudson.plugins.performance.parsers.JMeterParser.parse(JMeterParser.java:51)
          at hudson.plugins.performance.parsers.AbstractParser.parse(AbstractParser.java:67)
          at hudson.plugins.performance.PerformancePublisher.perform(PerformancePublisher.java:520)
          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(Unknown Source)
          at java.util.concurrent.FutureTask.run(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at java.lang.Thread.run(Unknown Source)

          In both cases I noticed plugin trying to look the jtl file in wrong location 'C:\tools\Jenkins\jobs\PerformanceTesting\builds\21\performance-reports\JMeter\jmeter_test_results.jtl' which doesnt exist on file system jtl file exists in `C:\tools\jenkins\workspace\PerformanceTesting\jmeter_scripts\jmeter_test_results.jtl` location

          Ranadeep Palle added a comment - - edited I was having similar issue on Jenkins ver. 2.19.1 with the report so I've applied the HPI snapshot from above link and tried generating perfreport as below and am still having the same issue I tried with relative path def jmeterTestFile = 'jmeter_test' performanceReport parsers: [[$class: 'JMeterParser', glob: "jmeter_scripts $ {jmeterTestFile} _results.jtl"]], relativeFailedThresholdNegative: 1.2, relativeFailedThresholdPositive: 1.89, relativeUnstableThresholdNegative: 1.8, relativeUnstableThresholdPositive: 1.5 perfReport "jmeter_scripts ${jmeterTestFile}_results.jtl" java.lang.IllegalArgumentException: Can not detect file type: C:\tools\Jenkins\jobs\PerformanceTesting\builds\20\temp\jmeter_test_results.jtl at hudson.plugins.performance.parsers.ParserDetector.detect(ParserDetector.java:38) at hudson.plugins.performance.parsers.ParserFactory.getParser(ParserFactory.java:43) at hudson.plugins.performance.PerformancePublisher.getParsers(PerformancePublisher.java:439) at hudson.plugins.performance.PerformancePublisher.perform(PerformancePublisher.java:487) 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(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) And I tried with '* / .jtl' as below performanceReport parsers: [ [$class: 'JMeterParser', glob: "**/*.jtl"] ], relativeFailedThresholdNegative: 1.2, relativeFailedThresholdPositive: 1.89, relativeUnstableThresholdNegative: 1.8, relativeUnstableThresholdPositive: 1.5 perfReport "* / .jtl" Performance: Recording JMeter reports '* / .jtl' Performance: Parsing JMeter report file 'C:\tools\Jenkins\jobs\PerformanceTesting\builds\21\performance-reports\JMeter\jmeter_test_results.jtl'. Performance: Failed to parse file 'C:\tools\Jenkins\jobs\PerformanceTesting\builds\21\performance-reports\JMeter\jmeter_test_results.jtl': Missing required column java.lang.Exception: Missing required column at hudson.plugins.performance.parsers.JMeterCsvParser.readCSVHeader(JMeterCsvParser.java:106) at hudson.plugins.performance.parsers.JMeterCsvParser.parse(JMeterCsvParser.java:61) at hudson.plugins.performance.parsers.JMeterParser.parseCsv(JMeterParser.java:191) at hudson.plugins.performance.parsers.JMeterParser.parse(JMeterParser.java:51) at hudson.plugins.performance.parsers.AbstractParser.parse(AbstractParser.java:67) at hudson.plugins.performance.PerformancePublisher.perform(PerformancePublisher.java:520) 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(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) In both cases I noticed plugin trying to look the jtl file in wrong location 'C:\tools\Jenkins\jobs\PerformanceTesting\builds\21\performance-reports\JMeter\jmeter_test_results.jtl' which doesnt exist on file system jtl file exists in `C:\tools\jenkins\workspace\PerformanceTesting\jmeter_scripts\jmeter_test_results.jtl` location

          Artem Fedorov added a comment -

          Ranadeep Palle, your's report in CSV format and you are missing one of the required column. Your report must contains the next columns: 
          - timestamp;
          - elapsed;
          - responseCode;
          - success;
          - URL or label. 

          Artem Fedorov added a comment - Ranadeep Palle, your's report in CSV format and you are missing one of the required column. Your report must contains the next columns:  - timestamp; - elapsed; - responseCode; - success; - URL or label. 

          I am using jmeter apache-jmeter-2.11_KL1, is that why am missing those columns in my jtl? jmeter_test_results.jtl

          Ranadeep Palle added a comment - I am using jmeter apache-jmeter-2.11_KL1, is that why am missing those columns in my jtl? jmeter_test_results.jtl

          Yes, but you can set JMeter property to enable those columns to be written into CSV. Or use GUI checkbox to enable it.

          Andrey Pokhilko added a comment - Yes, but you can set JMeter property to enable those columns to be written into CSV. Or use GUI checkbox to enable it.

          Artem Fedorov added a comment -

          Also your CSV file must contains CSV header, this property also can be enable in JMeter

          Artem Fedorov added a comment - Also your CSV file must contains CSV header, this property also can be enable in JMeter

          what are all the CSV headers those have to be in JTL? could you please provide all the headers

          Ranadeep Palle added a comment - what are all the CSV headers those have to be in JTL? could you please provide all the headers

          It's JMeter that writes headers. You just need to configure it to include headers into CSV files.

          Andrey Pokhilko added a comment - It's JMeter that writes headers. You just need to configure it to include headers into CSV files.

          Artem Fedorov added a comment -

          It is a simple default1.jmx test, that generate csv result file res.csv with a minimum set of columns.
          More config rows your can enable here

          Artem Fedorov added a comment - It is a simple default1.jmx test, that generate csv result file res.csv with a minimum set of columns. More config rows your can enable here

          It work, thank you

          Yannick FRINDEL added a comment - It work, thank you

          Marc Esher added a comment -

          Hi there. When do you expect to release this to the update center?

          Thanks,

          Marc

          Marc Esher added a comment - Hi there. When do you expect to release this to the update center? Thanks, Marc

          We have to polisth performance test executing feature, then we'll release it. No ETA, sorry

          Andrey Pokhilko added a comment - We have to polisth performance test executing feature, then we'll release it. No ETA, sorry

          Artem Fedorov added a comment - - edited

          Fixed: add Ant pattern for glob
          https://github.com/jenkinsci/performance-plugin/pull/96
          Available since 3.0 version

          Artem Fedorov added a comment - - edited Fixed: add Ant pattern for glob https://github.com/jenkinsci/performance-plugin/pull/96 Available since 3.0 version

            artem_fedorov Artem Fedorov
            marcesher Marc Esher
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: