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

Duplicated Warnings links when used with Flexible Publish plugin

    XMLWordPrintable

Details

    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

          drulli Ulli Hafner added a comment -

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

          drulli Ulli Hafner added a comment - Did you use the same parser twice? This is not yet supported: see JENKINS-18708 .
          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 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.
          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?

          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?
          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 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.
          drulli Ulli Hafner added a comment -

          domi: 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?

          drulli Ulli Hafner added a comment - domi : 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?

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

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

          Using the freestyle project type.

          davidruhmann David Ruhmann added a comment - Using the freestyle project type.
          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.

          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.

          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"?

          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"?
          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 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.
          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 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.

          People

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

            Dates

              Created:
              Updated:
              Resolved: