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

Warnings plugin does strange things with a custom parser

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • warnings-plugin
    • None
    • Linux master, Windows slave.
      Jenkins 1.441, Warnings 3.24.

    Description

      I configured a parser in the main Configure section and verified that it would match and report a warning. However, it would only report one even if I copied extra lines?
      During an actual build (on the slave) it is reported to be run. I see the correct parser name (that I gave it), the correct file name of the log file, and it claims to have found 4 warnings ("Successfully parsed ... with 4 warnings").

      The problems are:

      • There should, by my count, be 18 warnings
      • It doesn't actually report warnings from the parser in the "Warnings" result

      There is one other warning parser involved, an MSBuild parser. There are 2 warnings from that (correct), and I also get 2 warnings from the not configured "PC-Lint" parser. The alleged PC-Lint warnings are identical to the MSBuild warnings, apart from the type.
      No warnings are reported for my parser.

      It could look like there's some mix-up of parsers? Is this by any chance related to JENKINS-11926?

      Further details:

      • Both warnings parsers are run on the same file.
      • The warnings I want to parse do not have file names nor line numbers. I've tried putting both "some text" and "" as file name, and 0 or 1 for line number. Neither worked any differently.

      Attachments

        Issue Links

          Activity

            torbent torbent created issue -
            drulli Ulli Hafner added a comment -

            It would help to reproduce the problem if you would attach some log messages and your input parameters to the custom parser.

            drulli Ulli Hafner added a comment - It would help to reproduce the problem if you would attach some log messages and your input parameters to the custom parser.
            torbent torbent added a comment -

            Of course it would Here comes (some names have been changed):

            Warning regexp:

            ^.*: XmlDoc warning (\w+): (.* type ([^\s]+)\..*)$

            Mapping script:

            import hudson.plugins.warnings.parser.Warning
            String fileName = matcher.group(3)
            String category = matcher.group(1)
            String message = matcher.group(2)
            return new Warning(fileName, 0, "Xml Doc", category, message);

            Example result (first relevant line of log, see below):

            One warning found
            file name: Ours.Log.LogSettings
            line number: 0
            priority: Normal Priority
            category: OUR0100
            type: Xml Doc
            message: Missing or insuffici[...]special notions for the type.

            In the output there's an extra space in front of "OUR0100", but it does not come from the regexp as far as I can determine. Probably not important, but looks slightly "off".

            Console output from a build:

            14:19:33 [WARNINGS] Parsing warnings in files 'buildlog*.txt' with parser MSBuild
            14:19:34 [WARNINGS] Parsing 1 files in S:\jenkins\workspaces\job-X
            14:19:34 [WARNINGS] Successfully parsed file S:\jenkins\workspaces\job-X\buildlogui.txt of module with 2 warnings.
            14:19:34 [WARNINGS] Parsing warnings in files 'buildlog*.txt' with parser XmlDoc Warnings
            14:19:35 [WARNINGS] Parsing 1 files in S:\jenkins\workspaces\job-X
            14:19:35 [WARNINGS] Successfully parsed file S:\jenkins\workspaces\job-X\buildlogui.txt of module with 4 warnings.

            Relevant parts of buildlogui.txt, cut to fit:

            StatusSource.cs(47,97): warning CS0618: 'System.Net.Dns.GetHostByName(string)' is obsolete: 'GetHostByName is obsoleted for this type, please use GetHostEntry instead. http://go.microsoft.com/fwlink/?linkid=14202'
            SystemNotifier.cs(23,20): warning CS0618: 'Ours.Util.ThreadUtils.MainThread' is obsolete: 'Use InvokeOnMainThread for Invoke calls or MainForm if you need the form'
            Common.targets : XmlDoc warning OUR0100: Missing or insufficient documentation for type Ours.Log.LogSettings. Types MUST be documented regardless of visibility, preferably describing the purpose/responsibility of, context of, correct use of, and special notions for the type.
            Common.targets : XmlDoc warning OUR0100: Missing or insufficient documentation for type Ours.SubscribeException. Types MUST be documented regardless of visibility, preferably describing the purpose/responsibility of, context of, correct use of, and special notions for the type.
            Common.targets : XmlDoc warning OUR0100: Missing or insufficient documentation for type Ours.UnsubscribeException. Types MUST be documented regardless of visibility, preferably describing the purpose/responsibility of, context of, correct use of, and special notions for the type.
            Common.targets : XmlDoc warning OUR0100: Missing or insufficient documentation for type Ours.NameServer.NameServerA. Types MUST be documented regardless of visibility, preferably describing the purpose/responsibility of, context of, correct use of, and special notions for the type.
            Common.targets : XmlDoc warning OUR0100: Missing or insufficient documentation for type Ours.Status.NotifierCollection. Types MUST be documented regardless of visibility, preferably describing the purpose/responsibility of, context of, correct use of, and special notions for the type.
            Common.targets : XmlDoc warning OUR0100: Missing or insufficient documentation for type Ours.Status.NotifierCollectionEnumerator. Types MUST be documented regardless of visibility, preferably describing the purpose/responsibility of, context of, correct use of, and special notions for the type.
            Common.targets : XmlDoc warning OUR0100: Missing or insufficient documentation for type Ours.Management.Notifier. Types MUST be documented regardless of visibility, preferably describing the purpose/responsibility of, context of, correct use of, and special notions for the type.
            Common.targets : XmlDoc warning OUR0100: Missing or insufficient documentation for type Ours.Management.StatusNotifier. Types MUST be documented regardless of visibility, preferably describing the purpose/responsibility of, context of, correct use of, and special notions for the type.
            Common.targets : XmlDoc warning OUR0100: Missing or insufficient documentation for type Ours.Management.Worker. Types MUST be documented regardless of visibility, preferably describing the purpose/responsibility of, context of, correct use of, and special notions for the type.

            And the resulting warnings, as seen on the "detail" tab of the warning list:

            StatusSource.cs:47, PC-Lint, Priority: Normal
            'System.Net.Dns.GetHostByName(string)' is obsolete: 'GetHostByName is obsoleted for this type, please use GetHostEntry instead. http://go.microsoft.com/fwlink/?linkid=14202'
            StatusSource.cs:47, MSBuild, Priority: Normal
            'System.Net.Dns.GetHostByName(string)' is obsolete: 'GetHostByName is obsoleted for this type, please use GetHostEntry instead. http://go.microsoft.com/fwlink/?linkid=14202'
            SystemNotifier.cs:23, PC-Lint, Priority: Normal
            'Ours.Util.ThreadUtils.MainThread' is obsolete: 'Use InvokeOnMainThread for Invoke calls or MainForm if you need the form'
            SystemNotifier.cs:23, MSBuild, Priority: Normal
            'Ours.Util.ThreadUtils.MainThread' is obsolete: 'Use InvokeOnMainThread for Invoke calls or MainForm if you need the form'

            The only warning parsers enabled for this job are MSBuild and ours, not PC-Lint.

            torbent torbent added a comment - Of course it would Here comes (some names have been changed): Warning regexp: ^.*: XmlDoc warning (\w+): (.* type ( [^\s] +)\..*)$ Mapping script: import hudson.plugins.warnings.parser.Warning String fileName = matcher.group(3) String category = matcher.group(1) String message = matcher.group(2) return new Warning(fileName, 0, "Xml Doc", category, message); Example result (first relevant line of log, see below): One warning found file name: Ours.Log.LogSettings line number: 0 priority: Normal Priority category: OUR0100 type: Xml Doc message: Missing or insuffici [...] special notions for the type. In the output there's an extra space in front of "OUR0100", but it does not come from the regexp as far as I can determine. Probably not important, but looks slightly "off". Console output from a build: 14:19:33 [WARNINGS] Parsing warnings in files 'buildlog*.txt' with parser MSBuild 14:19:34 [WARNINGS] Parsing 1 files in S:\jenkins\workspaces\job-X 14:19:34 [WARNINGS] Successfully parsed file S:\jenkins\workspaces\job-X\buildlogui.txt of module with 2 warnings. 14:19:34 [WARNINGS] Parsing warnings in files 'buildlog*.txt' with parser XmlDoc Warnings 14:19:35 [WARNINGS] Parsing 1 files in S:\jenkins\workspaces\job-X 14:19:35 [WARNINGS] Successfully parsed file S:\jenkins\workspaces\job-X\buildlogui.txt of module with 4 warnings. Relevant parts of buildlogui.txt, cut to fit: StatusSource.cs(47,97): warning CS0618: 'System.Net.Dns.GetHostByName(string)' is obsolete: 'GetHostByName is obsoleted for this type, please use GetHostEntry instead. http://go.microsoft.com/fwlink/?linkid=14202 ' SystemNotifier.cs(23,20): warning CS0618: 'Ours.Util.ThreadUtils.MainThread' is obsolete: 'Use InvokeOnMainThread for Invoke calls or MainForm if you need the form' Common.targets : XmlDoc warning OUR0100: Missing or insufficient documentation for type Ours.Log.LogSettings. Types MUST be documented regardless of visibility, preferably describing the purpose/responsibility of, context of, correct use of, and special notions for the type. Common.targets : XmlDoc warning OUR0100: Missing or insufficient documentation for type Ours.SubscribeException. Types MUST be documented regardless of visibility, preferably describing the purpose/responsibility of, context of, correct use of, and special notions for the type. Common.targets : XmlDoc warning OUR0100: Missing or insufficient documentation for type Ours.UnsubscribeException. Types MUST be documented regardless of visibility, preferably describing the purpose/responsibility of, context of, correct use of, and special notions for the type. Common.targets : XmlDoc warning OUR0100: Missing or insufficient documentation for type Ours.NameServer.NameServerA. Types MUST be documented regardless of visibility, preferably describing the purpose/responsibility of, context of, correct use of, and special notions for the type. Common.targets : XmlDoc warning OUR0100: Missing or insufficient documentation for type Ours.Status.NotifierCollection. Types MUST be documented regardless of visibility, preferably describing the purpose/responsibility of, context of, correct use of, and special notions for the type. Common.targets : XmlDoc warning OUR0100: Missing or insufficient documentation for type Ours.Status.NotifierCollectionEnumerator. Types MUST be documented regardless of visibility, preferably describing the purpose/responsibility of, context of, correct use of, and special notions for the type. Common.targets : XmlDoc warning OUR0100: Missing or insufficient documentation for type Ours.Management.Notifier. Types MUST be documented regardless of visibility, preferably describing the purpose/responsibility of, context of, correct use of, and special notions for the type. Common.targets : XmlDoc warning OUR0100: Missing or insufficient documentation for type Ours.Management.StatusNotifier. Types MUST be documented regardless of visibility, preferably describing the purpose/responsibility of, context of, correct use of, and special notions for the type. Common.targets : XmlDoc warning OUR0100: Missing or insufficient documentation for type Ours.Management.Worker. Types MUST be documented regardless of visibility, preferably describing the purpose/responsibility of, context of, correct use of, and special notions for the type. And the resulting warnings, as seen on the "detail" tab of the warning list: StatusSource.cs:47, PC-Lint, Priority: Normal 'System.Net.Dns.GetHostByName(string)' is obsolete: 'GetHostByName is obsoleted for this type, please use GetHostEntry instead. http://go.microsoft.com/fwlink/?linkid=14202 ' StatusSource.cs:47, MSBuild, Priority: Normal 'System.Net.Dns.GetHostByName(string)' is obsolete: 'GetHostByName is obsoleted for this type, please use GetHostEntry instead. http://go.microsoft.com/fwlink/?linkid=14202 ' SystemNotifier.cs:23, PC-Lint, Priority: Normal 'Ours.Util.ThreadUtils.MainThread' is obsolete: 'Use InvokeOnMainThread for Invoke calls or MainForm if you need the form' SystemNotifier.cs:23, MSBuild, Priority: Normal 'Ours.Util.ThreadUtils.MainThread' is obsolete: 'Use InvokeOnMainThread for Invoke calls or MainForm if you need the form' The only warning parsers enabled for this job are MSBuild and ours, not PC-Lint.
            torbent torbent added a comment -

            Oh yes, by the way: I did state that there should be 18 warnings from our parser, but I've only copied 9 of them to the comment above - just to take the edge off of any potential confusion

            torbent torbent added a comment - Oh yes, by the way: I did state that there should be 18 warnings from our parser, but I've only copied 9 of them to the comment above - just to take the edge off of any potential confusion
            drulli Ulli Hafner added a comment -

            Ok, thanks. I'll have a look at it next week. I'll try to wrap your examples into a small unit test case...

            drulli Ulli Hafner added a comment - Ok, thanks. I'll have a look at it next week. I'll try to wrap your examples into a small unit test case...
            drulli Ulli Hafner made changes -
            Field Original Value New Value
            Status Open [ 1 ] In Progress [ 3 ]

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            src/test/java/hudson/plugins/warnings/parser/AntJavacParserTest.java
            src/test/java/hudson/plugins/warnings/parser/ArmccCompilerParserTest.java
            src/test/java/hudson/plugins/warnings/parser/CoolfluxChessccParserTest.java
            src/test/java/hudson/plugins/warnings/parser/DoxygenParserTest.java
            src/test/java/hudson/plugins/warnings/parser/DynamicParserTest.java
            src/test/java/hudson/plugins/warnings/parser/EclipseParserTest.java
            src/test/java/hudson/plugins/warnings/parser/FlexSDKParserTest.java
            src/test/java/hudson/plugins/warnings/parser/Gcc4CompilerParserTest.java
            src/test/java/hudson/plugins/warnings/parser/Gcc4LinkerParserTest.java
            src/test/java/hudson/plugins/warnings/parser/GccParserTest.java
            src/test/java/hudson/plugins/warnings/parser/GhsMultiParserTest.java
            src/test/java/hudson/plugins/warnings/parser/IntelCParserTest.java
            src/test/java/hudson/plugins/warnings/parser/JavaDocParserTest.java
            src/test/java/hudson/plugins/warnings/parser/JavacParserTest.java
            src/test/java/hudson/plugins/warnings/parser/MsBuildParserTest.java
            src/test/java/hudson/plugins/warnings/parser/ParserRegistryTest.java
            src/test/java/hudson/plugins/warnings/parser/ParserTester.java
            src/test/java/hudson/plugins/warnings/parser/TiCcsParserTest.java
            src/test/java/hudson/plugins/warnings/parser/TnsdlParserTest.java
            src/test/java/hudson/plugins/warnings/parser/YuiCompressorParserTest.java
            src/test/resources/hudson/plugins/warnings/parser/issue12280.txt
            http://jenkins-ci.org/commit/warnings-plugin/3dae5bc01893dcc882173d70db559d825f2266cd
            Log:
            JENKINS-12280 Added testcase for dynamic parser.

            Compare: https://github.com/jenkinsci/warnings-plugin/compare/13c8d00...3dae5bc

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/test/java/hudson/plugins/warnings/parser/AntJavacParserTest.java src/test/java/hudson/plugins/warnings/parser/ArmccCompilerParserTest.java src/test/java/hudson/plugins/warnings/parser/CoolfluxChessccParserTest.java src/test/java/hudson/plugins/warnings/parser/DoxygenParserTest.java src/test/java/hudson/plugins/warnings/parser/DynamicParserTest.java src/test/java/hudson/plugins/warnings/parser/EclipseParserTest.java src/test/java/hudson/plugins/warnings/parser/FlexSDKParserTest.java src/test/java/hudson/plugins/warnings/parser/Gcc4CompilerParserTest.java src/test/java/hudson/plugins/warnings/parser/Gcc4LinkerParserTest.java src/test/java/hudson/plugins/warnings/parser/GccParserTest.java src/test/java/hudson/plugins/warnings/parser/GhsMultiParserTest.java src/test/java/hudson/plugins/warnings/parser/IntelCParserTest.java src/test/java/hudson/plugins/warnings/parser/JavaDocParserTest.java src/test/java/hudson/plugins/warnings/parser/JavacParserTest.java src/test/java/hudson/plugins/warnings/parser/MsBuildParserTest.java src/test/java/hudson/plugins/warnings/parser/ParserRegistryTest.java src/test/java/hudson/plugins/warnings/parser/ParserTester.java src/test/java/hudson/plugins/warnings/parser/TiCcsParserTest.java src/test/java/hudson/plugins/warnings/parser/TnsdlParserTest.java src/test/java/hudson/plugins/warnings/parser/YuiCompressorParserTest.java src/test/resources/hudson/plugins/warnings/parser/issue12280.txt http://jenkins-ci.org/commit/warnings-plugin/3dae5bc01893dcc882173d70db559d825f2266cd Log: JENKINS-12280 Added testcase for dynamic parser. Compare: https://github.com/jenkinsci/warnings-plugin/compare/13c8d00...3dae5bc
            drulli Ulli Hafner added a comment -

            Finally, I managed it to create a small test case. However, the test case seem to correctly parse the file. Do you think this problem is related to the line ending of the messages? Did you try to run the build on the master?

            Maybe it would be help, if you would rather attach the output as a file. Otherwise Jira might convert something already.

            drulli Ulli Hafner added a comment - Finally, I managed it to create a small test case. However, the test case seem to correctly parse the file. Do you think this problem is related to the line ending of the messages? Did you try to run the build on the master? Maybe it would be help, if you would rather attach the output as a file. Otherwise Jira might convert something already.
            dogfood dogfood added a comment -

            Integrated in plugins_warnings #346
            JENKINS-12280 Added testcase for dynamic parser.

            Ulli Hafner :
            Files :

            • src/test/java/hudson/plugins/warnings/parser/CoolfluxChessccParserTest.java
            • src/test/java/hudson/plugins/warnings/parser/YuiCompressorParserTest.java
            • src/test/java/hudson/plugins/warnings/parser/TnsdlParserTest.java
            • src/test/java/hudson/plugins/warnings/parser/ParserRegistryTest.java
            • src/test/java/hudson/plugins/warnings/parser/ParserTester.java
            • src/test/java/hudson/plugins/warnings/parser/EclipseParserTest.java
            • src/test/java/hudson/plugins/warnings/parser/ArmccCompilerParserTest.java
            • src/test/java/hudson/plugins/warnings/parser/IntelCParserTest.java
            • src/test/java/hudson/plugins/warnings/parser/MsBuildParserTest.java
            • src/test/java/hudson/plugins/warnings/parser/TiCcsParserTest.java
            • src/test/java/hudson/plugins/warnings/parser/Gcc4LinkerParserTest.java
            • src/test/java/hudson/plugins/warnings/parser/DynamicParserTest.java
            • src/test/java/hudson/plugins/warnings/parser/Gcc4CompilerParserTest.java
            • src/test/java/hudson/plugins/warnings/parser/FlexSDKParserTest.java
            • src/test/java/hudson/plugins/warnings/parser/DoxygenParserTest.java
            • src/test/java/hudson/plugins/warnings/parser/GccParserTest.java
            • src/test/resources/hudson/plugins/warnings/parser/issue12280.txt
            • src/test/java/hudson/plugins/warnings/parser/AntJavacParserTest.java
            • src/test/java/hudson/plugins/warnings/parser/JavaDocParserTest.java
            • src/test/java/hudson/plugins/warnings/parser/JavacParserTest.java
            • src/test/java/hudson/plugins/warnings/parser/GhsMultiParserTest.java
            dogfood dogfood added a comment - Integrated in plugins_warnings #346 JENKINS-12280 Added testcase for dynamic parser. Ulli Hafner : Files : src/test/java/hudson/plugins/warnings/parser/CoolfluxChessccParserTest.java src/test/java/hudson/plugins/warnings/parser/YuiCompressorParserTest.java src/test/java/hudson/plugins/warnings/parser/TnsdlParserTest.java src/test/java/hudson/plugins/warnings/parser/ParserRegistryTest.java src/test/java/hudson/plugins/warnings/parser/ParserTester.java src/test/java/hudson/plugins/warnings/parser/EclipseParserTest.java src/test/java/hudson/plugins/warnings/parser/ArmccCompilerParserTest.java src/test/java/hudson/plugins/warnings/parser/IntelCParserTest.java src/test/java/hudson/plugins/warnings/parser/MsBuildParserTest.java src/test/java/hudson/plugins/warnings/parser/TiCcsParserTest.java src/test/java/hudson/plugins/warnings/parser/Gcc4LinkerParserTest.java src/test/java/hudson/plugins/warnings/parser/DynamicParserTest.java src/test/java/hudson/plugins/warnings/parser/Gcc4CompilerParserTest.java src/test/java/hudson/plugins/warnings/parser/FlexSDKParserTest.java src/test/java/hudson/plugins/warnings/parser/DoxygenParserTest.java src/test/java/hudson/plugins/warnings/parser/GccParserTest.java src/test/resources/hudson/plugins/warnings/parser/issue12280.txt src/test/java/hudson/plugins/warnings/parser/AntJavacParserTest.java src/test/java/hudson/plugins/warnings/parser/JavaDocParserTest.java src/test/java/hudson/plugins/warnings/parser/JavacParserTest.java src/test/java/hudson/plugins/warnings/parser/GhsMultiParserTest.java
            torbent torbent added a comment -

            The build as such cannot run on the Master, so I can't try that.
            I'll try just running the warnings parser on a "static" file on the master.
            I'll be back

            torbent torbent added a comment - The build as such cannot run on the Master, so I can't try that. I'll try just running the warnings parser on a "static" file on the master. I'll be back
            torbent torbent added a comment -

            I made a test job that only creates the file and runs the warning plugin on it.
            The file is identical to the one you use in your unittest (copied it). I don't think line endings make a difference. These tests were run with "unix" line endings; the original builds used Windows LE.

            I tested a number of scenarios.
            When I build on the (Linux) master everything works. I can use just the dynamic parser or the dynamic parser alongside the MSBuild parser - all warnings are reported correctly.
            When I build on a slave, whether it's Linux or Windows makes no difference. Using just the MSBuild parser works fine. When I use the dynamic parser (alone or with MSBuild) I always get the 4 warnings mentioned originally (duplicates of the MSBuild warnings, one tagged as "MSBuild", one as "PC-Lint").
            Note that I get them like that even when I'm not using the MSBuild parser.
            Buliding on a slave with MSBuild and GCC parsers gave the expected results (just 2 MSBuild warnings)

            It sort of suggests that the plugin running on the slave does not get the correct information (whatever that should have been) when using the dynamic parser.

            torbent torbent added a comment - I made a test job that only creates the file and runs the warning plugin on it. The file is identical to the one you use in your unittest (copied it). I don't think line endings make a difference. These tests were run with "unix" line endings; the original builds used Windows LE. I tested a number of scenarios. When I build on the (Linux) master everything works. I can use just the dynamic parser or the dynamic parser alongside the MSBuild parser - all warnings are reported correctly. When I build on a slave, whether it's Linux or Windows makes no difference. Using just the MSBuild parser works fine. When I use the dynamic parser (alone or with MSBuild) I always get the 4 warnings mentioned originally (duplicates of the MSBuild warnings, one tagged as "MSBuild", one as "PC-Lint"). Note that I get them like that even when I'm not using the MSBuild parser. Buliding on a slave with MSBuild and GCC parsers gave the expected results (just 2 MSBuild warnings) It sort of suggests that the plugin running on the slave does not get the correct information (whatever that should have been) when using the dynamic parser.
            torbent torbent made changes -
            Link This issue is related to JENKINS-11926 [ JENKINS-11926 ]
            drulli Ulli Hafner added a comment -

            Ok, I think now I understand what is going on. You get MSBUild warnings even if you don't check the MSBuild parser in the configuration? Seems that the parsers to apply is not correctly serialized, then as a workaround all available parsers are used... Strange that this has worked in my test on our master/slave instance. Maybe I missed something.

            drulli Ulli Hafner added a comment - Ok, I think now I understand what is going on. You get MSBUild warnings even if you don't check the MSBuild parser in the configuration? Seems that the parsers to apply is not correctly serialized, then as a workaround all available parsers are used... Strange that this has worked in my test on our master/slave instance. Maybe I missed something.
            torbent torbent added a comment -

            Well, if I only specify MSBuild parser it works. Or when using multiple pre-defined parsers. It's only when the dynamic parser is involved that there are errors. In our setup it extracts the 2 MSBuild warnings and duplicates them also as PC-Lint warnings.

            torbent torbent added a comment - Well, if I only specify MSBuild parser it works. Or when using multiple pre-defined parsers. It's only when the dynamic parser is involved that there are errors. In our setup it extracts the 2 MSBuild warnings and duplicates them also as PC-Lint warnings.
            drulli Ulli Hafner added a comment -

            Hmm, I just tried your test, however it works on my machine

            I get 4 warnings for the unit test file using the dynamic parser.

            [WARNINGS] Successfully parsed file /home/hafner/slave/workspace/Jenkins Analysis Core/issue12280.txt of module Static Analysis Utilities with 4 warnings.
            

            Maybe the problem is the connection type. How do you connect your master and slave? I'm using JLNP Agent (clicking on the JNLP Image Button in the slave configuration view).

            drulli Ulli Hafner added a comment - Hmm, I just tried your test, however it works on my machine I get 4 warnings for the unit test file using the dynamic parser. [WARNINGS] Successfully parsed file /home/hafner/slave/workspace/Jenkins Analysis Core/issue12280.txt of module Static Analysis Utilities with 4 warnings. Maybe the problem is the connection type. How do you connect your master and slave? I'm using JLNP Agent (clicking on the JNLP Image Button in the slave configuration view).
            torbent torbent added a comment -

            Great, you've reproduced the problem!
            4 warnings is wrong. There should be 9 for the dynamic and 2 for MSBuild. 4 is also what I get (2 real MSBuild and 2 wrong PC-Lint).

            Perhaps your test should verify more than the number of warnings?

            And yes, my slave setup also uses JNLP. The tests I did to reproduce (as described on 17/Jan) were made in a setup where the slave was started via SSH from the server. Same outcome.

            torbent torbent added a comment - Great, you've reproduced the problem! 4 warnings is wrong. There should be 9 for the dynamic and 2 for MSBuild. 4 is also what I get (2 real MSBuild and 2 wrong PC-Lint). Perhaps your test should verify more than the number of warnings? And yes, my slave setup also uses JNLP. The tests I did to reproduce (as described on 17/Jan) were made in a setup where the slave was started via SSH from the server. Same outcome.
            drulli Ulli Hafner added a comment -

            Ups, seems that I didn't realize that I managed it to reproduce I thought that there should be only 4 warnings. But you are right There should by 9...

            drulli Ulli Hafner added a comment - Ups, seems that I didn't realize that I managed it to reproduce I thought that there should be only 4 warnings. But you are right There should by 9...
            drulli Ulli Hafner added a comment -

            Ok, I can confirm that this is the same as JENKINS-11926. The problem is that on the slave I don't have direct access to the dynamic parsers (and to the parsers registered via extension point). I.e., these parsers need to be serialized to the slave...

            drulli Ulli Hafner added a comment - Ok, I can confirm that this is the same as JENKINS-11926 . The problem is that on the slave I don't have direct access to the dynamic parsers (and to the parsers registered via extension point). I.e., these parsers need to be serialized to the slave...

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            src/main/java/hudson/plugins/warnings/WarningsPublisher.java
            src/main/java/hudson/plugins/warnings/parser/FileWarningsParser.java
            src/main/java/hudson/plugins/warnings/parser/ParserRegistry.java
            src/main/java/hudson/plugins/warnings/parser/RegexpParser.java
            src/main/java/hudson/plugins/warnings/parser/WarningsParser.java
            http://jenkins-ci.org/commit/warnings-plugin/87c2191c54bb75abc7ac0373a3cf00687ba42a3b
            Log:
            [FIXED JENKINS-12280] Make all parsers be serializable in order to be
            available on the slave.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/main/java/hudson/plugins/warnings/WarningsPublisher.java src/main/java/hudson/plugins/warnings/parser/FileWarningsParser.java src/main/java/hudson/plugins/warnings/parser/ParserRegistry.java src/main/java/hudson/plugins/warnings/parser/RegexpParser.java src/main/java/hudson/plugins/warnings/parser/WarningsParser.java http://jenkins-ci.org/commit/warnings-plugin/87c2191c54bb75abc7ac0373a3cf00687ba42a3b Log: [FIXED JENKINS-12280] Make all parsers be serializable in order to be available on the slave.
            scm_issue_link SCM/JIRA link daemon made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Resolved [ 5 ]
            dogfood dogfood added a comment -

            Integrated in plugins_warnings #348
            [FIXED JENKINS-12280] Make all parsers be serializable in order to be (Revision 87c2191c54bb75abc7ac0373a3cf00687ba42a3b)

            Result = SUCCESS
            Ulli Hafner :
            Files :

            • src/main/java/hudson/plugins/warnings/WarningsPublisher.java
            • src/main/java/hudson/plugins/warnings/parser/WarningsParser.java
            • src/main/java/hudson/plugins/warnings/parser/RegexpParser.java
            • src/main/java/hudson/plugins/warnings/parser/FileWarningsParser.java
            • src/main/java/hudson/plugins/warnings/parser/ParserRegistry.java
            dogfood dogfood added a comment - Integrated in plugins_warnings #348 [FIXED JENKINS-12280] Make all parsers be serializable in order to be (Revision 87c2191c54bb75abc7ac0373a3cf00687ba42a3b) Result = SUCCESS Ulli Hafner : Files : src/main/java/hudson/plugins/warnings/WarningsPublisher.java src/main/java/hudson/plugins/warnings/parser/WarningsParser.java src/main/java/hudson/plugins/warnings/parser/RegexpParser.java src/main/java/hudson/plugins/warnings/parser/FileWarningsParser.java src/main/java/hudson/plugins/warnings/parser/ParserRegistry.java
            drulli Ulli Hafner added a comment - - edited

            I changed the serialisation now. I'll test this fix next week. If you would like to test, please pick up the latest build from our CI server: http://ci.jenkins-ci.org/job/plugins_warnings/348/

            drulli Ulli Hafner added a comment - - edited I changed the serialisation now. I'll test this fix next week. If you would like to test, please pick up the latest build from our CI server: http://ci.jenkins-ci.org/job/plugins_warnings/348/
            drulli Ulli Hafner added a comment -

            Seems, that I need to serialize yet another object...

            drulli Ulli Hafner added a comment - Seems, that I need to serialize yet another object...
            drulli Ulli Hafner made changes -
            Resolution Fixed [ 1 ]
            Status Resolved [ 5 ] Reopened [ 4 ]

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            src/main/java/hudson/plugins/warnings/parser/GroovyExpressionMatcher.java
            http://jenkins-ci.org/commit/warnings-plugin/a39922f468a93eeaef749034ee42aede81ad7088
            Log:
            [FIXED JENKINS-12280] [FIXED JENKINS-11926] Make GroovyExpressionMatcher
            serializable.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/main/java/hudson/plugins/warnings/parser/GroovyExpressionMatcher.java http://jenkins-ci.org/commit/warnings-plugin/a39922f468a93eeaef749034ee42aede81ad7088 Log: [FIXED JENKINS-12280] [FIXED JENKINS-11926] Make GroovyExpressionMatcher serializable.
            dogfood dogfood added a comment -

            Integrated in plugins_warnings #350
            [FIXED JENKINS-12280] [FIXED JENKINS-11926] Make GroovyExpressionMatcher (Revision a39922f468a93eeaef749034ee42aede81ad7088)

            Result = SUCCESS
            Ulli Hafner :
            Files :

            • src/main/java/hudson/plugins/warnings/parser/GroovyExpressionMatcher.java
            dogfood dogfood added a comment - Integrated in plugins_warnings #350 [FIXED JENKINS-12280] [FIXED JENKINS-11926] Make GroovyExpressionMatcher (Revision a39922f468a93eeaef749034ee42aede81ad7088) Result = SUCCESS Ulli Hafner : Files : src/main/java/hudson/plugins/warnings/parser/GroovyExpressionMatcher.java
            drulli Ulli Hafner added a comment -

            Fixed in 3.27.

            drulli Ulli Hafner added a comment - Fixed in 3.27.
            drulli Ulli Hafner made changes -
            Resolution Fixed [ 1 ]
            Status Reopened [ 4 ] Resolved [ 5 ]
            drulli Ulli Hafner added a comment -

            @torbent: is release 3.27 fixing the problem for you? Seems that JENKINS-11926 is reopened.

            drulli Ulli Hafner added a comment - @torbent: is release 3.27 fixing the problem for you? Seems that JENKINS-11926 is reopened.
            torbent torbent added a comment -

            Sorry about the delay.
            Just checked. Running Jenkins 1.445 and Warnings plugin 3.27 on a test-ish setup.
            Both master and slave are Linux-based.
            I get all the warnings I expect, so it seems to be working for me
            Now I'll take it into our production environment and check it. It has a Linux server and both Linux and Windows based slaves. I'll get back tomorrow with the results of that test.

            torbent torbent added a comment - Sorry about the delay. Just checked. Running Jenkins 1.445 and Warnings plugin 3.27 on a test-ish setup. Both master and slave are Linux-based. I get all the warnings I expect, so it seems to be working for me Now I'll take it into our production environment and check it. It has a Linux server and both Linux and Windows based slaves. I'll get back tomorrow with the results of that test.
            torbent torbent added a comment -

            Closing. Confirmed to work in production setup as well (Linux master, Windows slave).

            torbent torbent added a comment - Closing. Confirmed to work in production setup as well (Linux master, Windows slave).
            torbent torbent made changes -
            Status Resolved [ 5 ] Closed [ 6 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 142602 ] JNJira + In-Review [ 205581 ]

            People

              drulli Ulli Hafner
              torbent torbent
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: