• Icon: Story Story
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • cobertura-plugin
    • None

      "Code Coverage Plugin" has reached "end-of-life" and got replaced by "Coverage Plugin".

      However, it cannot be uninstalled because "Cobertura Plugin" has a dependency on it.

      "Cobertura Plugin" should switch to "Coverage Plugin" instead.

          [JENKINS-73238] Switch to "Coverage Plugin"

          Elias Balasis added a comment - - edited

          markewaite, I think you have slightly misunderstood, or I have misunderstood what you are trying to say.

          As I pointed out initially, "Code Coverage Plugin" and "Coverage Plugin" are different.
          see also https://github.com/jenkinsci/cobertura-plugin/issues/219#issuecomment-2206771023 where the same is pointed out.

          "Code Coverage Plugin" is deprecated but "Cobertura Plugin" still depends on it, preventing removal of "Code Coverage Plugin" from Jenkins.

          "Cobertura plugin" has to start making use of the new "Coverage Plugin" instead of the deprecated "Code Coverage Plugin".

          I personally doubt that any significant transformation is required in "Cobertura plugin" besides re-pointing it to "Coverage Plugin" but I will defer to the experts.

          Elias Balasis added a comment - - edited markewaite , I think you have slightly misunderstood, or I have misunderstood what you are trying to say. As I pointed out initially, "Code Coverage Plugin" and "Coverage Plugin" are different. see also https://github.com/jenkinsci/cobertura-plugin/issues/219#issuecomment-2206771023 where the same is pointed out. "Code Coverage Plugin" is deprecated but "Cobertura Plugin" still depends on it, preventing removal of "Code Coverage Plugin" from Jenkins. "Cobertura plugin" has to start making use of the new "Coverage Plugin" instead of the deprecated "Code Coverage Plugin". I personally doubt that any significant transformation is required in "Cobertura plugin" besides re-pointing it to "Coverage Plugin" but I will defer to the experts.

          Mark Waite added a comment -

          Thanks eliasbalasis. I was trying to understand why the Cobertura plugin is used in a Jenkins environment when the Warnings plugin already supports test report outputs from the Cobertura coverage reporting tool. The Warnings plugin has a wide array of outputs and is actively maintained by drulli.

          I assumed that the simplest path forward for most users was to remove the Cobertura plugin and change their jobs to use the Warnings plugin instead of the Cobertura plugin.

          Mark Waite added a comment - Thanks eliasbalasis . I was trying to understand why the Cobertura plugin is used in a Jenkins environment when the Warnings plugin already supports test report outputs from the Cobertura coverage reporting tool. The Warnings plugin has a wide array of outputs and is actively maintained by drulli . I assumed that the simplest path forward for most users was to remove the Cobertura plugin and change their jobs to use the Warnings plugin instead of the Cobertura plugin.

          Elias Balasis added a comment -

          I am afraid removing "Cobertura" would be impossible because it is part of a chain that leads to other plugins critical to certain functions.

          I don't think this links only to the "Warnings" plugin.

          I cannot remember exactly off the top of my head but I am quite certain from last time I checked it is linked to a chain that leads to Jenkins Pipelines functions which are critical to a very large variety of builds.

          Elias Balasis added a comment - I am afraid removing "Cobertura" would be impossible because it is part of a chain that leads to other plugins critical to certain functions. I don't think this links only to the "Warnings" plugin. I cannot remember exactly off the top of my head but I am quite certain from last time I checked it is linked to a chain that leads to Jenkins Pipelines functions which are critical to a very large variety of builds.

          Elias Balasis added a comment - - edited

          I checked again.

          "Cobertura" plugin , besides probably being used individually by certain builds, is used by "Job and Stage monitoring" plugin which is used for sending "GitHub" notifications which is critical in code reviews for blocking pull requests on unsuccessful builds etc.

          Removing it would break the chain of operations I am afraid.

          Elias Balasis added a comment - - edited I checked again. "Cobertura" plugin , besides probably being used individually by certain builds, is used by "Job and Stage monitoring" plugin which is used for sending "GitHub" notifications which is critical in code reviews for blocking pull requests on unsuccessful builds etc. Removing it would break the chain of operations I am afraid.

          Mark Waite added a comment - - edited

          Thanks. I thought that the GitHub Checks plugin provided all the notifications needed for GitHub pull requests. We use it very often on ci.jenkins.io to show things like:

          Mark Waite added a comment - - edited Thanks. I thought that the GitHub Checks plugin provided all the notifications needed for GitHub pull requests. We use it very often on ci.jenkins.io to show things like: Code coverage Compilation warnings

          Elias Balasis added a comment - - edited

          Good point.

          It is possible that GitHub Checks plugin provides all the notifications needed for GitHub pull requests, unless there is some hidden relationship to "Job and Stage monitoring" which is what I am suspecting, probably for per-stage build status notification (see https://plugins.jenkins.io/github-autostatus/)


          I am finally thinking that we could remove "Cobertura" plugin, in favor of the probably more capable "Warnings" plugin, assuming we can afford losing the per-stage GitHub notifications feature.

          Elias Balasis added a comment - - edited Good point. It is possible that GitHub Checks plugin provides all the notifications needed for GitHub pull requests, unless there is some hidden relationship to " Job and Stage monitoring " which is what I am suspecting, probably for per-stage build status notification (see https://plugins.jenkins.io/github-autostatus/ ) I am finally thinking that we could remove "Cobertura" plugin, in favor of the probably more capable "Warnings" plugin, assuming we can afford losing the per-stage GitHub notifications feature.

          Ulli Hafner added a comment - - edited

          When you want to get rid of the Cobertura plugin then you need to install the Coverage plugin, not the warnings plugin!

          BTW: the Coverage plugin is a replacement for all the following Jenkins plugins: JaCoCo, Cobertura, PIT, Clover, VectorCAST Coverage, Emma, OpenCover.

          I am finally thinking that we could remove "Cobertura" plugin, in favor of the probably more capable "Warnings" plugin, assuming we can afford losing the per-stage GitHub notifications feature.

          You will get GitHub notifications with the coverage plugin as well, so you should not loose any functionality.

          Ulli Hafner added a comment - - edited When you want to get rid of the Cobertura plugin then you need to install the Coverage plugin , not the warnings plugin! BTW: the Coverage plugin is a replacement for all the following Jenkins plugins: JaCoCo, Cobertura, PIT, Clover, VectorCAST Coverage, Emma, OpenCover. I am finally thinking that we could remove "Cobertura" plugin, in favor of the probably more capable "Warnings" plugin, assuming we can afford losing the per-stage GitHub notifications feature. You will get GitHub notifications with the coverage plugin as well, so you should not loose any functionality.

          Elias Balasis added a comment - - edited

          Thanks drulli, I thought that "Coverage" replaces "Code Coverage".

          So, if I have understood correctly, I can remove "Cobertura" and "Code Coverage" without sacrificing per-stage GitHub notifications through "Job and Stage monitoring" as long as I have "Coverage" installed.

          However, "Cobertura" is required by "Job and Stage monitoring" which sounds like a blocker.

          I will give it a try as I am not explicitly using "Cobertura" or "Code Coverage" and see how it goes.

          Elias Balasis added a comment - - edited Thanks drulli , I thought that "Coverage" replaces "Code Coverage". So, if I have understood correctly, I can remove "Cobertura" and "Code Coverage" without sacrificing per-stage GitHub notifications through "Job and Stage monitoring" as long as I have "Coverage" installed. However, "Cobertura" is required by "Job and Stage monitoring" which sounds like a blocker. I will give it a try as I am not explicitly using "Cobertura" or "Code Coverage" and see how it goes.

          Ulli Hafner added a comment -

          I never used the Job and Stage monitoring plugin. Since the last release is 4 years ago I think that it is not maintained anymore. From the README it looks like it does provide features that are similar to the features of the github-checks-plugin (or a subset?). It just uses a wrong architecture as it clearly violates the dependency inversion principle. So it brings hard dependencies to JaCoCo and Cobertura even though one might not need it.

          Can't you create a prototype job that uses the coverage plugin with the GitHub checks plugin to see if that satisfies all your requirements? Then you can see if the Job and Stage monitoring plugin can be replaced.

          Ulli Hafner added a comment - I never used the Job and Stage monitoring plugin. Since the last release is 4 years ago I think that it is not maintained anymore. From the README it looks like it does provide features that are similar to the features of the github-checks-plugin (or a subset?). It just uses a wrong architecture as it clearly violates the dependency inversion principle. So it brings hard dependencies to JaCoCo and Cobertura even though one might not need it. Can't you create a prototype job that uses the coverage plugin with the GitHub checks plugin to see if that satisfies all your requirements? Then you can see if the Job and Stage monitoring plugin can be replaced.

          Elias Balasis added a comment -

          "Coverage" is needed by "Code Coverage" which is needed by "Cobertura" which is needed by "Job and Stage monitoring".

          I have decided finally to remove the whole chain of plugins in favor of integrity and newer plugins.

          Elias Balasis added a comment - "Coverage" is needed by "Code Coverage" which is needed by "Cobertura" which is needed by "Job and Stage monitoring". I have decided finally to remove the whole chain of plugins in favor of integrity and newer plugins.

            Unassigned Unassigned
            eliasbalasis Elias Balasis
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: