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

Message filter does not work for multiple-line messages

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • analysis-model
    • None
    • Jenkins: 2.168
      warnings-ng-plugin: 4.0.0
    • 5.0.0 (analysis-model and warnings-ng)

      Pipeline:

      recordIssues enabledForFailure: true, filters: [
        excludeFile('.*qrc_icons\\.cpp.*'),
        excludeMessage('.*QVTKWidget.*'),
        excludeMessage('.*tmpnam.*')],
        tools: [gcc4(name: 'GCC-GUI', id: 'gcc4-gui', pattern: 'build/build*.log')],
        unstableTotalAll: 1
      

      With warnings-ng-plugin 3.0.3:

      Error Messages
      
      Can't resolve absolute paths for some files:
      - createSurface.cpp
      - Applications/DataExplorer/VtkVis/VtkVis_autogen/include/ui_VisualizationWidgetBase.h
      
      Information Messages
      
      Searching for all files in '/var/jenkins/workspace/ufz_ogs_PR-2429' that match the pattern 'build/build*.log'
      -> found 2 files
      Successfully parsed file /var/jenkins/workspace/ufz_ogs_PR-2429/build/build1.log
      -> found 2 issues (skipped 5 duplicates)
      Successfully parsed file /var/jenkins/workspace/ufz_ogs_PR-2429/build/build2.log
      -> found 2 issues (skipped 6 duplicates)
      Post processing issues on 'envinf11w' with source code encoding 'UTF-8'
      Resolving absolute file names for all issues in workspace '/var/jenkins/workspace/ufz_ogs_PR-2429'
      -> 0 resolved, 2 unresolved, 0 already resolved
      Copying affected files to Jenkins' build folder '/datadrive/jenkins-home/jobs/ufz/jobs/ogs/branches/PR-2429/builds/2/files-with-issues'
      -> 0 copied, 0 not in workspace, 2 not-found, 0 with I/O error
      Resolving module names from module definitions (build.xml, pom.xml, or Manifest.mf files)
      -> resolved module names for 2 issues
      Resolving package names (or namespaces) by parsing the affected files
      -> resolved package names of 2 affected files
      Applying 3 filters on the set of 2 issues (2 issues have been removed, 0 issues will be published)
      Creating fingerprints for all affected code blocks to track issues over different builds
      -> created fingerprints for 0 issues
      Invoking Git blamer to create author and commit information for all affected files
      GIT_COMMIT env = 'HEAD'
      Git working tree = '/var/jenkins/workspace/ufz_ogs_PR-2429'
      Git commit ID = 'ecd82eb50254ae2401a98c518f7305fccf7b2454'
      Job workspace = '/data3/var/jenkins/workspace/ufz_ogs_PR-2429'
      Created no blame requests - Git blame will be skipped
      -> blamed authors of issues in 0 files
      Using reference build 'ufz/ogs/PR-2429 #1' to compute new, fixed, and outstanding issues
      Issues delta (vs. reference build): outstanding: 0, new: 0, fixed: 0
      Evaluating quality gates
      -> PASSED - Total number of issues (any severity): 0 - Quality QualityGate: 1
      -> All quality gates have been passed
      Health report is disabled - skipping
      

      With warnings-ng-plugin 4.0.0:

      Error Messages
      
      Can't resolve absolute paths for some files:
      - createSurface.cpp
      - Applications/DataExplorer/VtkVis/VtkVis_autogen/include/ui_VisualizationWidgetBase.h
      Can't create fingerprints for some files:
      - 'Applications/DataExplorer/VtkVis/VtkVis_autogen/include/ui_VisualizationWidgetBase.h', IO exception has been thrown: java.nio.file.NoSuchFileException: Applications/DataExplorer/VtkVis/VtkVis_autogen/include/ui_VisualizationWidgetBase.h
      - 'Applications/DataExplorer/VtkVis/VtkVis_autogen/include/ui_VisualizationWidgetBase.h', IO exception has been thrown: java.nio.file.NoSuchFileException: Applications/DataExplorer/VtkVis/VtkVis_autogen/include/ui_VisualizationWidgetBase.h
      - 'Applications/DataExplorer/VtkVis/VtkVis_autogen/include/ui_VisualizationWidgetBase.h', IO exception has been thrown: java.nio.file.NoSuchFileException: Applications/DataExplorer/VtkVis/VtkVis_autogen/include/ui_VisualizationWidgetBase.h
      - 'Applications/DataExplorer/VtkVis/VtkVis_autogen/include/ui_VisualizationWidgetBase.h', IO exception has been thrown: java.nio.file.NoSuchFileException: Applications/DataExplorer/VtkVis/VtkVis_autogen/include/ui_VisualizationWidgetBase.h
      - 'Applications/DataExplorer/VtkVis/VtkVis_autogen/include/ui_VisualizationWidgetBase.h', IO exception has been thrown: java.nio.file.NoSuchFileException: Applications/DataExplorer/VtkVis/VtkVis_autogen/include/ui_VisualizationWidgetBase.h
      - 'Applications/DataExplorer/VtkVis/VtkVis_autogen/include/ui_VisualizationWidgetBase.h', IO exception has been thrown: java.nio.file.NoSuchFileException: Applications/DataExplorer/VtkVis/VtkVis_autogen/include/ui_VisualizationWidgetBase.h
      Can't create blame requests for some affected files:
      - Skipping non-workspace file Applications/DataExplorer/VtkVis/VtkVis_autogen/include/ui_VisualizationWidgetBase.h
      - Skipping non-workspace file Applications/DataExplorer/VtkVis/VtkVis_autogen/include/ui_VisualizationWidgetBase.h
      - Skipping non-workspace file Applications/DataExplorer/VtkVis/VtkVis_autogen/include/ui_VisualizationWidgetBase.h
      - Skipping non-workspace file Applications/DataExplorer/VtkVis/VtkVis_autogen/include/ui_VisualizationWidgetBase.h
      - Skipping non-workspace file Applications/DataExplorer/VtkVis/VtkVis_autogen/include/ui_VisualizationWidgetBase.h
      - Skipping non-workspace file Applications/DataExplorer/VtkVis/VtkVis_autogen/include/ui_VisualizationWidgetBase.h
      
      Information Messages
      
      Searching for all files in '/var/jenkins/workspace/ufz_ogs_PR-2429' that match the pattern 'build/build*.log'
      -> found 2 files
      Successfully parsed file /var/jenkins/workspace/ufz_ogs_PR-2429/build/build1.log
      -> found 7 issues (skipped 0 duplicates)
      Successfully parsed file /var/jenkins/workspace/ufz_ogs_PR-2429/build/build2.log
      -> found 7 issues (skipped 1 duplicate)
      Post processing issues on 'envinf56' with source code encoding 'UTF-8'
      Resolving absolute file names for all issues in workspace '/var/jenkins/workspace/ufz_ogs_PR-2429'
      -> 0 resolved, 2 unresolved, 0 already resolved
      Copying affected files to Jenkins' build folder '/datadrive/jenkins-home/jobs/ufz/jobs/ogs/branches/PR-2429/builds/3/files-with-issues'
      -> 0 copied, 0 not in workspace, 2 not-found, 0 with I/O error
      Resolving module names from module definitions (build.xml, pom.xml, or Manifest.mf files)
      -> resolved module names for 7 issues
      Resolving package names (or namespaces) by parsing the affected files
      -> resolved package names of 2 affected files
      Applying 3 filters on the set of 7 issues (1 issues have been removed, 6 issues will be published)
      Creating fingerprints for all affected code blocks to track issues over different builds
      -> created fingerprints for 0 issues
      Invoking Git blamer to create author and commit information for all affected files
      GIT_COMMIT env = 'HEAD'
      Git working tree = '/var/jenkins/workspace/ufz_ogs_PR-2429'
      Git commit ID = '84c4b4764737e38408db0eba5c0d97ba289702f1'
      Job workspace = '/var/jenkins/workspace/ufz_ogs_PR-2429'
      Created no blame requests - Git blame will be skipped
      -> blamed authors of issues in 0 files
      Using reference build 'ufz/ogs/PR-2429 #1' to compute new, fixed, and outstanding issues
      Issues delta (vs. reference build): outstanding: 0, new: 6, fixed: 0
      Evaluating quality gates
      -> WARNING - Total number of issues (any severity): 6 - Quality QualityGate: 1
      -> Some quality gates have been missed: overall result is WARNING
      Health report is disabled - skipping
      

      It is a CMake-based build and the file ui_VisualizationWidgetBase.h is located in the build-directory (it is auto-generated by Qt uic-compiler).

          [JENKINS-56612] Message filter does not work for multiple-line messages

          Lars Bilke created issue -

          Ulli Hafner added a comment -

          Does resolving of all other files work (typically the parser detects the absolute file names)? Since you provided a log of two versions, is it working in 3.0.3 and not in 4.0.0?

          Ulli Hafner added a comment - Does resolving of all other files work (typically the parser detects the absolute file names)? Since you provided a log of two versions, is it working in 3.0.3 and not in 4.0.0?

          Lars Bilke added a comment - - edited

          In 4.0.0 the excludeMessage('.*QVTKWidget.*') which should filter warnings coming from ui_VisualizationWidgetBase.h does not work. In 3.0.3 it is fine.

          Lars Bilke added a comment - - edited In 4.0.0 the excludeMessage('.* QVTKWidget. *') which should filter warnings coming from ui_VisualizationWidgetBase.h does not work. In 3.0.3 it is fine.

          Ulli Hafner added a comment -

          Ok, then the actual problem is that in 4.0 the message filter is not working? Why don't you filter by file name (ui_VisualizationWidgetBase.h)?

          What exactly is the warning message? (Maybe it helps if you also provide the log lines that are the basis for the warning.

          Ulli Hafner added a comment - Ok, then the actual problem is that in 4.0 the message filter is not working? Why don't you filter by file name (ui_VisualizationWidgetBase.h)? What exactly is the warning message? (Maybe it helps if you also provide the log lines that are the basis for the warning.

          Lars Bilke added a comment -

           Here is a warning message (full log):

          15:16:42  [521/891] Building CXX object Applications/DataExplorer/CMakeFiles/DataExplorer.dir/DataExplorer_autogen/mocs_compilation.cpp.o
          15:16:42  In file included from ../Applications/DataExplorer/VtkVis/VisualizationWidget.h:18:0,
          15:16:42                   from Applications/DataExplorer/DataExplorer_autogen/include/ui_mainwindow.h:29,
          15:16:42                   from Applications/DataExplorer/DataExplorer_autogen/EWIEGA46WW/../../../../../Applications/DataExplorer/mainwindow.h:18,
          15:16:42                   from Applications/DataExplorer/DataExplorer_autogen/EWIEGA46WW/moc_mainwindow.cpp:9,
          15:16:42                   from Applications/DataExplorer/DataExplorer_autogen/mocs_compilation.cpp:2:
          15:16:42  Applications/DataExplorer/VtkVis/VtkVis_autogen/include/ui_VisualizationWidgetBase.h: In member function 'void Ui_VisualizationWidgetBase::setupUi(QWidget*)':
          15:16:42  Applications/DataExplorer/VtkVis/VtkVis_autogen/include/ui_VisualizationWidgetBase.h:263:59: warning: 'QVTKWidget::QVTKWidget(QWidget*, Qt::WindowFlags)' is deprecated [-Wdeprecated-declarations]
          15:16:42           vtkWidget = new QVTKWidget(VisualizationWidgetBase);

           This specific message filter is not working maybe it is because it cannot generate the fingerprint of the specific file. Yes filter by name would work but this would also filter other warnings from this file and with 3.0.3 the message filter worked in this case. The build logs for the two examples above are exactly the same, please note that 4.0.0 also does not detect duplicates in this case.

          Lars Bilke added a comment -  Here is a warning message ( full log ): 15:16:42 [521/891] Building CXX object Applications/DataExplorer/CMakeFiles/DataExplorer.dir/DataExplorer_autogen/mocs_compilation.cpp.o 15:16:42 In file included from ../Applications/DataExplorer/VtkVis/VisualizationWidget.h:18:0, 15:16:42 from Applications/DataExplorer/DataExplorer_autogen/include/ui_mainwindow.h:29, 15:16:42 from Applications/DataExplorer/DataExplorer_autogen/EWIEGA46WW/../../../../../Applications/DataExplorer/mainwindow.h:18, 15:16:42 from Applications/DataExplorer/DataExplorer_autogen/EWIEGA46WW/moc_mainwindow.cpp:9, 15:16:42 from Applications/DataExplorer/DataExplorer_autogen/mocs_compilation.cpp:2: 15:16:42 Applications/DataExplorer/VtkVis/VtkVis_autogen/include/ui_VisualizationWidgetBase.h: In member function 'void Ui_VisualizationWidgetBase::setupUi(QWidget*)': 15:16:42 Applications/DataExplorer/VtkVis/VtkVis_autogen/include/ui_VisualizationWidgetBase.h:263:59: warning: 'QVTKWidget::QVTKWidget(QWidget*, Qt::WindowFlags)' is deprecated [-Wdeprecated-declarations] 15:16:42 vtkWidget = new QVTKWidget(VisualizationWidgetBase);  This specific message filter is not working maybe it is because it cannot generate the fingerprint of the specific file. Yes filter by name would work but this would also filter other warnings from this file and with 3.0.3 the message filter worked in this case. The build logs for the two examples above are exactly the same, please note that 4.0.0 also does not detect duplicates in this case.

          Ulli Hafner added a comment -

          Fixed with commit/44e3b6d. The problem was that now the parser reads multi-line messages.

          Ulli Hafner added a comment - Fixed with commit/44e3b6d . The problem was that now the parser reads multi-line messages.
          Ulli Hafner made changes -
          Component/s New: analysis-model [ 23523 ]
          Component/s Original: warnings-ng-plugin [ 24526 ]
          Summary Original: Can't create fingerprints for Qt auto-generated files New: Message filter does not work for multiple-line messages
          Ulli Hafner made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Fixed but Unreleased [ 10203 ]

          Ulli Hafner added a comment - - edited

          I wonder if we should add another issue for your logs: the details view button in the issues table should also show the messages in multiple lines. The message is currently separated by newline which does nothing in HTML.

          Ulli Hafner added a comment - - edited I wonder if we should add another issue for your logs: the details view button in the issues table should also show the messages in multiple lines. The message is currently separated by newline which does nothing in HTML.

          Ulli Hafner added a comment -

          And another tip/question: Normally the gcc parser detects the absolute path by combining the path of the current work directory and the relative path of the warning. In your case there is no current work directory printed. We currently have support for make and ninja messages. Would it be possible to add those messages to your build?

          Ulli Hafner added a comment - And another tip/question: Normally the gcc parser detects the absolute path by combining the path of the current work directory and the relative path of the warning. In your case there is no current work directory printed. We currently have support for make and ninja messages. Would it be possible to add those messages to your build?

            drulli Ulli Hafner
            bilke Lars Bilke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: