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

JaCoCo reporting warning in Checks about unmodified lines

      In #8481, jglick you have edited the condition, now lacking test coverage, according to code coverage published on PRs.

      Unfortunately, this causes every new PR to contain code coverage checks warnings about the lack of coverage, as seen in #8510 for example, even if the PR is totally unrelated to yours.

      Would you mind filing a follow-up PR to silence the warnings, or would you recommend something else?

          [JENKINS-72060] JaCoCo reporting warning in Checks about unmodified lines

          Alexander Brandes created issue -

          Jesse Glick added a comment -

          I am afraid I am not very familiar with how this repository has configured JaCoCo reporting. Surely this is not the first method in all of Jenkins core to lack test coverage?! And why is the Checks displaying warnings about lines unrelated to a given PR? This seems like a misconfiguration in the reporting plugin, perhaps. Perhaps drulli understands the issue better.

          Jesse Glick added a comment - I am afraid I am not very familiar with how this repository has configured JaCoCo reporting. Surely this is not the first method in all of Jenkins core to lack test coverage?! And why is the Checks displaying warnings about lines unrelated to a given PR? This seems like a misconfiguration in the reporting plugin, perhaps. Perhaps drulli understands the issue better.

          Ulli Hafner added a comment -

          It makes sense to report checks only for new code, see https://www.jenkins.io/doc/pipeline/steps/code-coverage-api/ on how to do that (checksAnnotationScope).

          Ulli Hafner added a comment - It makes sense to report checks only for new code, see https://www.jenkins.io/doc/pipeline/steps/code-coverage-api/ on how to do that ( checksAnnotationScope ).

          Jesse Glick added a comment -

          drulli according to sources, this defaults to MODIFIED_LINES, and Jenkinsfile is not overriding that, so why would these annotations be shown?

          Jesse Glick added a comment - drulli according to sources, this defaults to MODIFIED_LINES , and Jenkinsfile is not overriding that, so why would these annotations be shown?

          Ulli Hafner added a comment -

          You are right, this option is already used. So this might be a bug somewhere in the plugin.

          The linked Jenkins build is already removed, so I cannot see in the logs what exactly went wrong here. The coverage checks message does not show a file delta, that means the delta computation (based on the Git history with respect to the master build) had a problem somehow. Alex, can you ping me, if that happens again? I looked through the latests code PRs but did not find such a build anymore.

          Ulli Hafner added a comment - You are right, this option is already used. So this might be a bug somewhere in the plugin. The linked Jenkins build is already removed, so I cannot see in the logs what exactly went wrong here. The coverage checks message does not show a file delta, that means the delta computation (based on the Git history with respect to the master build) had a problem somehow. Alex, can you ping me, if that happens again? I looked through the latests code PRs but did not find such a build anymore.

          I looked over a recent PR and didn't find any new warnings. I'm not sure where to look for, but I'll comment again once I find a new PR with warnings from an older one.

          Alexander Brandes added a comment - I looked over a recent PR and didn't find any new warnings. I'm not sure where to look for, but I'll comment again once I find a new PR with warnings from an older one.
          Jesse Glick made changes -
          Summary Original: Insufficient test coverage for StringIndexOutOfBoundsException in AbstractItem.getUrl New: JaCoCo reporting warning in Checks about unmodified lines
          Jesse Glick made changes -
          Component/s New: code-coverage-api-plugin [ 23723 ]
          Component/s Original: core [ 15593 ]
          Jesse Glick made changes -
          Assignee Original: Jesse Glick [ jglick ] New: Shenyu Zheng [ cizezsy ]

          Jesse Glick added a comment -

          (maybe should be moved to helpdesk)

          Jesse Glick added a comment - (maybe should be moved to helpdesk )

            drulli Ulli Hafner
            notmyfault Alexander Brandes
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: