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

Make Warnings Plugin compatible with parallel Workflow

    • 5.0.0-beta2

      29959 made it compatible with a single build.
      But it doesn't yet work nicely for multiple parallel builds.

      If one puts the WarningsPublisher inside each parallel task, then the build page contains a link to the warning output once per task. But each link points to the same page and only contains the warnings of one task.

      If instead one runs the WarningsPublisher step only once after all all parallel tasks, then the links to the source code do not work (because the workspace path is different on the different node) and the list of warnings doesn't show for which task/node the warning occurred.

      Based on how other plugins (e.g. junit) work, I assume the first is how it should work. To it work, the warnings plugin should summarize the warnings before reporting them.

      To make the 2nd work it would need to parse the task label in the console output (to display the task) and resolve the workspace relative to the node of that task.

      Is anyone working on this? Any suggestions of how to get started on fixing this?

          [JENKINS-30551] Make Warnings Plugin compatible with parallel Workflow

          Roland Schulz created issue -

          Ulli Hafner added a comment -

          I think nobody is working on this issue. Are you are interested in providing a pull request? I don't use the workflow-plugin on my own but may get give you some hints on how to implement it here...

          Ulli Hafner added a comment - I think nobody is working on this issue. Are you are interested in providing a pull request? I don't use the workflow-plugin on my own but may get give you some hints on how to implement it here...

          Teemu Murtola added a comment -

          I think there are two slightly separate issues here:

          1. If the warning plugin is run more than once in a workflow, it should merge the results into a single report, producing results similar to what it does for a matrix/multiconfiguration build, or similar to what the JUnit plugin does in a workflow.
          2. It should be possible to run the warnings plugin only on a subset of the console output in a workflow job. For the original case where this is reported from, the desire would be to scan the warnings from the console output of each of the parallel branches separately. Currently, the warnings plugin just scans the whole console log up to the point where it is invoked, which means that each invocation will see all the warnings from all the branches. To make this work, changes to the workflow plugin can be required.

          Teemu Murtola added a comment - I think there are two slightly separate issues here: If the warning plugin is run more than once in a workflow, it should merge the results into a single report, producing results similar to what it does for a matrix/multiconfiguration build, or similar to what the JUnit plugin does in a workflow. It should be possible to run the warnings plugin only on a subset of the console output in a workflow job. For the original case where this is reported from, the desire would be to scan the warnings from the console output of each of the parallel branches separately. Currently, the warnings plugin just scans the whole console log up to the point where it is invoked, which means that each invocation will see all the warnings from all the branches. To make this work, changes to the workflow plugin can be required.
          Teemu Murtola made changes -
          Labels New: workflow
          Patrick Wolf made changes -
          Epic Link New: JENKINS-34657 [ 170293 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 165663 ] New: JNJira + In-Review [ 182075 ]
          Andrew Bayer made changes -
          Labels Original: workflow New: pipeline workflow
          Andrew Bayer made changes -
          Labels Original: pipeline workflow New: pipeline

          Ulli Hafner added a comment - - edited

          It would be helpful, if someone can provide an ATH test case for such a build. I never used parallel pipelines up to now.

          Ulli Hafner added a comment - - edited It would be helpful, if someone can provide an ATH test case for such a build. I never used parallel pipelines up to now.
          Ulli Hafner made changes -
          Link New: This issue is related to JENKINS-38399 [ JENKINS-38399 ]

            drulli Ulli Hafner
            rschulz Roland Schulz
            Votes:
            4 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: