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

Duplicated Warnings links when used with Flexible Publish plugin

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      On my Visual Studio builds page, the MSBuild Warnings link displays twice, linking to the same report. However, on the report page, it only shows one link.

        Attachments

        1. 2014-07-10_11-00-51-2.png
          2014-07-10_11-00-51-2.png
          105 kB
        2. 2014-07-10_11-16-27-2.png
          2014-07-10_11-16-27-2.png
          82 kB
        3. 2014-08-06_15-18-16.png
          2014-08-06_15-18-16.png
          8 kB
        4. 2014-08-06_15-29-46.png
          2014-08-06_15-29-46.png
          28 kB
        5. build.log
          24 kB

          Activity

          davidruhmann David Ruhmann created issue -
          Hide
          drulli Ulli Hafner added a comment -

          Did you use the same parser twice? This is not yet supported: see JENKINS-18708.

          Show
          drulli Ulli Hafner added a comment - Did you use the same parser twice? This is not yet supported: see JENKINS-18708 .
          Hide
          davidruhmann David Ruhmann added a comment -

          My jobs build both the Release and Debug configurations of my project. As for the parsers selected in the post-build, I have just a single MSBuild and Doxygen selected.

          I have attached the log of one of my builds.

          Show
          davidruhmann David Ruhmann added a comment - My jobs build both the Release and Debug configurations of my project. As for the parsers selected in the post-build, I have just a single MSBuild and Doxygen selected. I have attached the log of one of my builds.
          davidruhmann David Ruhmann made changes -
          Field Original Value New Value
          Attachment build.log [ 26364 ]
          Hide
          drulli Ulli Hafner added a comment -

          I can't reproduce the problem.

          Is one of your builds very old? Maybe the results are using different IDs.
          What are the URLs of the duplicate links in the project page?

          Show
          drulli Ulli Hafner added a comment - I can't reproduce the problem. Is one of your builds very old? Maybe the results are using different IDs. What are the URLs of the duplicate links in the project page?
          Hide
          davidruhmann David Ruhmann added a comment -

          The URLs are both like http://build.group.com/jenkins/job/myProject/warnings31

          However, I now think that the issue has to do with an incompatibility with the Conditional BuildStep Plugin. As I see the exact same issue when I made the Klocwork publisher conditional.

          Attached is a screenshot of my Compiler warnings conditional.

          Show
          davidruhmann David Ruhmann added a comment - The URLs are both like http://build.group.com/jenkins/job/myProject/warnings31 However, I now think that the issue has to do with an incompatibility with the Conditional BuildStep Plugin . As I see the exact same issue when I made the Klocwork publisher conditional. Attached is a screenshot of my Compiler warnings conditional.
          davidruhmann David Ruhmann made changes -
          Attachment 2014-08-06_15-18-16.png [ 26500 ]
          Attachment 2014-08-06_15-29-46.png [ 26501 ]
          drulli Ulli Hafner made changes -
          Component/s conditional-buildstep [ 15947 ]
          drulli Ulli Hafner made changes -
          Summary MSBuild Warnings ling displays twice on builds MSBuild Warnings link displays twice on builds if added as conditional build step
          drulli Ulli Hafner made changes -
          Assignee Ulli Hafner [ drulli ] Dominik Bartholdi [ domi ]
          Hide
          drulli Ulli Hafner added a comment -

          Dominik Bartholdi: Is there anything I need to do in my plug-ins so that problem will not appear? Or is this something what needs to be done in the conditional-buildstep plugin?

          Show
          drulli Ulli Hafner added a comment - Dominik Bartholdi : Is there anything I need to do in my plug-ins so that problem will not appear? Or is this something what needs to be done in the conditional-buildstep plugin?
          Hide
          domi Dominik Bartholdi added a comment -

          which project type do you have this problem? maven? freestyle? both?

          Show
          domi Dominik Bartholdi added a comment - which project type do you have this problem? maven? freestyle? both?
          Hide
          davidruhmann David Ruhmann added a comment -

          Using the freestyle project type.

          Show
          davidruhmann David Ruhmann added a comment - Using the freestyle project type.
          Hide
          davidruhmann David Ruhmann added a comment -

          However, I have checked and if I do a similar publisher conditional on a maven project type, the same issue exists.

          Show
          davidruhmann David Ruhmann added a comment - However, I have checked and if I do a similar publisher conditional on a maven project type, the same issue exists.
          Hide
          domi Dominik Bartholdi added a comment -

          I think you are not using the conditional build step plugin here, but the flexible publish plugin https://wiki.jenkins-ci.org/display/JENKINS/Flexible+Publish+Plugin
          The conditional build step plugin only works with build steps, but you are using post actions/publishers

          can you confirm this are all "post build actions"?

          Show
          domi Dominik Bartholdi added a comment - I think you are not using the conditional build step plugin here, but the flexible publish plugin https://wiki.jenkins-ci.org/display/JENKINS/Flexible+Publish+Plugin The conditional build step plugin only works with build steps, but you are using post actions/publishers can you confirm this are all "post build actions"?
          Hide
          davidruhmann David Ruhmann added a comment -

          @Dominik Oh sorry about that. Yeah, it is the flexible publish plugin. I got them confused and thought they were the same.

          Show
          davidruhmann David Ruhmann added a comment - @Dominik Oh sorry about that. Yeah, it is the flexible publish plugin. I got them confused and thought they were the same.
          davidruhmann David Ruhmann made changes -
          Assignee Dominik Bartholdi [ domi ] ikedam [ ikedam ]
          Hide
          ikedam ikedam added a comment -

          I know this behavior well.
          I conclude that it's not a bug (a behavior to be fixed), but a limitation (a behavior not to be fixed).

          As it is very complicated, I'm not sure I can exactly explain the details (I know my English is poor). But I try that:

          • Post build steps (Publisher) displays links in the left side of project pages by implementing Publisher#getProjectActions.
          • You can use each Publisher at most only once in a project. For example, if you added "Archiving artifacts" to a project, you cannot add more new "Archiving artifacts" to that project.
          • Using Flexible Publish, you can define a same Publisher for multiple times. This is an irregular case. For example, you can add two "Archiving artifacts" for condition A and condition B. This results Publisher#getProjectActions of a same Publisher are called multiple times for a project. This results duplicated links in a project page.
          • As described before, Publisher should be defined only one in a project. So it's not a bug of Publisher to display duplicated links.
          • At the same time, Flexible Publish does not know how to handle links. Those links may be better to be displayed for each definition, or may be better to be displayed only once (like Warnings plugin).

          As far as I know, this behavior doesn't results harmful, and I don't plan to fix it.

          If you try to fix that, the way of SubProjectsAction of parameterized-trigger plugin may be helpful.
          https://github.com/jenkinsci/parameterized-trigger-plugin/blob/master/src/main/java/hudson/plugins/parameterizedtrigger/SubProjectsAction.java
          https://github.com/jenkinsci/parameterized-trigger-plugin/blob/master/src/main/resources/hudson/plugins/parameterizedtrigger/SubProjectsAction/jobMain.groovy

          If multiple {{SubProjectsAction}}s are defined to a build, it aggregates all {{SubProjectsAction}}s to display.
          I think aggregating WarningsProjectAction and displaying a link only for the first one would fix the behavior.
          But it would get so complicated, and may cause other problems.
          And you need to fix not warnings-plugin, but analysis-core-plugin. It may affect other plugins using analysis-core-plugin.

          Show
          ikedam ikedam added a comment - I know this behavior well. I conclude that it's not a bug (a behavior to be fixed), but a limitation (a behavior not to be fixed). As it is very complicated, I'm not sure I can exactly explain the details (I know my English is poor). But I try that: Post build steps ( Publisher ) displays links in the left side of project pages by implementing Publisher#getProjectActions . You can use each Publisher at most only once in a project. For example, if you added "Archiving artifacts" to a project, you cannot add more new "Archiving artifacts" to that project. Using Flexible Publish, you can define a same Publisher for multiple times. This is an irregular case. For example, you can add two "Archiving artifacts" for condition A and condition B. This results Publisher#getProjectActions of a same Publisher are called multiple times for a project. This results duplicated links in a project page. As described before, Publisher should be defined only one in a project. So it's not a bug of Publisher to display duplicated links. At the same time, Flexible Publish does not know how to handle links. Those links may be better to be displayed for each definition, or may be better to be displayed only once (like Warnings plugin). As far as I know, this behavior doesn't results harmful, and I don't plan to fix it. If you try to fix that, the way of SubProjectsAction of parameterized-trigger plugin may be helpful. https://github.com/jenkinsci/parameterized-trigger-plugin/blob/master/src/main/java/hudson/plugins/parameterizedtrigger/SubProjectsAction.java https://github.com/jenkinsci/parameterized-trigger-plugin/blob/master/src/main/resources/hudson/plugins/parameterizedtrigger/SubProjectsAction/jobMain.groovy If multiple {{SubProjectsAction}}s are defined to a build, it aggregates all {{SubProjectsAction}}s to display. I think aggregating WarningsProjectAction and displaying a link only for the first one would fix the behavior. But it would get so complicated, and may cause other problems. And you need to fix not warnings-plugin, but analysis-core-plugin. It may affect other plugins using analysis-core-plugin.
          ikedam ikedam made changes -
          Component/s analysis-core [ 15709 ]
          Component/s conditional-buildstep [ 15947 ]
          Assignee ikedam [ ikedam ] Ulli Hafner [ drulli ]
          Issue Type Bug [ 1 ] Improvement [ 4 ]
          Summary MSBuild Warnings link displays twice on builds if added as conditional build step Duplicated Warnings links when used with Flexible Publish plugin
          drulli Ulli Hafner made changes -
          Labels cosmetics warnings cosmetics
          drulli Ulli Hafner made changes -
          Component/s flexible-publish [ 16130 ]
          Component/s warnings [ 15513 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 156541 ] JNJira + In-Review [ 179316 ]
          drulli Ulli Hafner made changes -
          Resolution Won't Fix [ 2 ]
          Status Open [ 1 ] Resolved [ 5 ]

            People

            Assignee:
            drulli Ulli Hafner
            Reporter:
            davidruhmann David Ruhmann
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: