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

Warnings-ng scanning wrong build tree

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • warnings-ng-plugin
    • None
    • Windows 10, jenkins 2.222.4, warnings-ng 8.1.0

      I have a build that previously had its source and build output in a single tree, but has been split to contain two parallel build trees. One is the checkout from git (so contains the source, including both Python and C++ source files), the other is where the code gets built (so contains the built executables from the C++ code but does not contain the Python files, since they don't need to be built).

      The build runs pylint over all my python files using a bat action to call python -m pylint looping over all the python files in the source tree (not the build tree). This works fine, the pylint output comes out in the log, all the files lint correctly. Once that's done I'm using the warnings-ng scanForIssues action to scan the log file for the results of the pylint runs. This was working when the two build trees were combined, but now they're split scanForIssues seems to be trying to find files in the build tree (not the source tree) and not finding them (because they aren't there). Not only that, it's trying repeatedly to find the same incorrect files.

      I don't understand why, because it's scanning the console log, and all of the pylint output in that scanned the correct files and worked fine.

      Sample console log output:

       

      E:\JenkinsMIDEBLD\workspace\16-btaylor-New_build_node_CYC268\cyclops>"C:\Python_3.7.9-x86\python.exe" -m pylint --rcfile="E:\JenkinsMIDEBLD\workspace\16-btaylor-New_build_node_CYC268\CyclopsInstall\build\pylintrc" "archive\archive.py" || exit 0 
      ************* Module archive
      [snipped]
      ------------------------------------------------------------------
      Your code has been rated at 7.97/10 (previous run: 7.97/10, +0.00)
      

       

      [snipped]

      [Pipeline] scanForIssues
      [Pylint] Sleeping for 5 seconds due to JENKINS-32191...
      [Pylint] Parsing console log (workspace: 'E:\JenkinsMIDEBLD\workspace\16-btaylor-New_build_node_CYC268\cyclops')
      [Pylint] Successfully parsed console log
      [Pylint] -> found 275 issues (skipped 2 duplicates)
      [Pylint] [-ERROR-] Can't create fingerprints for some files:
      [Pylint] [-ERROR-] - 'E:/JenkinsMIDEBLD/workspace/16-btaylor-New_build_node_CYC268/CyclopsInstall/cyclops/archive/archive.py', IO exception has been thrown: java.nio.file.NoSuchFileException: E:\JenkinsMIDEBLD\workspace\16-btaylor-New_build_node_CYC268\CyclopsInstall\cyclops\archive\archive.py
      [Pylint] [-ERROR-] - 'E:/JenkinsMIDEBLD/workspace/16-btaylor-New_build_node_CYC268/CyclopsInstall/cyclops/archive/archive.py', IO exception has been thrown: java.nio.file.NoSuchFileException: E:\JenkinsMIDEBLD\workspace\16-btaylor-New_build_node_CYC268\CyclopsInstall\cyclops\archive\archive.py
      [Pylint] [-ERROR-] - 'E:/JenkinsMIDEBLD/workspace/16-btaylor-New_build_node_CYC268/CyclopsInstall/cyclops/archive/archive.py', IO exception has been thrown: java.nio.file.NoSuchFileException: E:\JenkinsMIDEBLD\workspace\16-btaylor-New_build_node_CYC268\CyclopsInstall\cyclops\archive\archive.py

       

      The source tree is ...\cyclops and the build tree is ...\CyclopsInstall\cyclops. Just to avoid the inevitable confusion. You'll see that the pylint output in the first example is (correctly) linting the python code in ...\cyclops, but the errors refer to failing to find files in ...\CyclopsInstall. Both are inside a dir step that has them in the same working directory (or at least, two separate dir steps, but both changing to the same directory).

            drulli Ulli Hafner
            bentaylor Ben Taylor
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: