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

Provide support for advanced action filtering

      I am using the forensics-api-plugin as part of the coverage-plugin for getting diffs. To determine the reference build, I call

      discoverReferenceBuild()
      

      in my pipeline.

      Doing so revealed that sometimes I would not get diffs. The reason seems to be that coverage can be disabled on a per-build basis in my case, thus the reference build sometimes does not contain any coverage data.

      For this reason, I would like to see support for some reference build filtering options, especially by action class and action ID.

          [JENKINS-72825] Provide support for advanced action filtering

          Ulli Hafner added a comment -

          In the warnings plugin I added a customization of the reference build

          https://github.com/jenkinsci/warnings-ng-plugin/blob/c538f186e085cd0ad58406a134aa9737982bb085/plugin/src/main/java/io/jenkins/plugins/analysis/core/steps/IssuesPublisher.java#L234

          It would make sense to use a similar way for the coverage plugin.

          I am not sure if this can or should be generalized in the forensics plugin.

          Ulli Hafner added a comment - In the warnings plugin I added a customization of the reference build https://github.com/jenkinsci/warnings-ng-plugin/blob/c538f186e085cd0ad58406a134aa9737982bb085/plugin/src/main/java/io/jenkins/plugins/analysis/core/steps/IssuesPublisher.java#L234 It would make sense to use a similar way for the coverage plugin. I am not sure if this can or should be generalized in the forensics plugin.

          Stefan added a comment -

          I have not been sure where this makes more sense - as the forensics plugin took over the reference build handling, I decided to report it there. But I am completely fine with a implementation inside the coverage plugin as well.

          Stefan added a comment - I have not been sure where this makes more sense - as the forensics plugin took over the reference build handling, I decided to report it there. But I am completely fine with a implementation inside the coverage plugin as well.

          Ulli Hafner added a comment -

          When this is generalized, then we might need multiple reference builds, one for the warnings plugin and one for the coverage build. This is something I want to avoid.

          What is the reason that your reference build does not contain valid results?

          Ulli Hafner added a comment - When this is generalized, then we might need multiple reference builds, one for the warnings plugin and one for the coverage build. This is something I want to avoid. What is the reason that your reference build does not contain valid results?

          Stefan added a comment -

          Coverage collection and reporting is an optional pipeline parameter in our case as the impact on the execution speed is quite huge for some projects. Whenever this parameter is disabled, we skip recordCoverage completely and thus get "invalid" reference builds.

          Stefan added a comment - Coverage collection and reporting is an optional pipeline parameter in our case as the impact on the execution speed is quite huge for some projects. Whenever this parameter is disabled, we skip recordCoverage completely and thus get "invalid" reference builds.

            drulli Ulli Hafner
            stefan6419846 Stefan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: