Closed ggarcia24 closed 2 years ago
I think this is issue is related to this other one: https://github.com/jenkinsci/code-coverage-api-plugin/issues/433
According to what I can understand from that issue downgrading code-coverage-api-plugin
to 2.0.4 should resolve the issue
Interesting. Seems that the cobertura plug-in calls code of the code coverage plug-in. Actually these plugins should work independently. This problem indeed has the same root cause.
Can you elaborate why you are using the cobertura plug-in and not the code coverage plug-in? Maybe we can improve the code coverage plug-in so that it is not required to use the cobertura plug-in anymore.
Can we use your cobertura xml files in the test cases of the code coverage plug-in? I think we still have not enough examples for cobertura reports in the moment.
I can confirm that updating to code-coverage-api-plugin@v3.0.5
solved this issue! 🥳
To be honest I just recently learned about the existence of the code-coverage-api-plugin
because of this issue, I really like the way the it displays the values, also it seems to calculate the coverage a little bit more accurately
But the cobertura plugin displays a "drill down" of the source code (Package -> File -> Code), which is very helpful when we want to analyze coverage:
Package:
Files:
Code:
Thanks for the feedback! A drill down to the source code is available as well. I just removed the drill downs from module to package to file as I do not see a big help for my projects. Maybe I should restore those views in additional tabs. Please note that the code coverage API has the unique feature of showing delta reports (of pull requests).
Is there a chance that you can send us an (anonymized) versions of your Cobertura reports? We are currently improving the Cobertura and JaCoCo parsers and it seems that we cannot find enough Cobertura examples (Cobertura seems to be dead and does not support new Java versions anymore).
Sorry for the delay, yes! I can send you the report files, a small notice though, I'm currently using cobertura mainly because it's was the only way I knew to put Jest coverage reports in Jenkins, but I see that your plugin supports Istanbul; I'll have to look how to configure things, but it's very likely that I switch to your plugin
Small usability question: How do I get from here to the see the code (last picture in my example):
Clicking the file name doesn't do anything, and I'm not figuring it out
Jenkins and plugins versions report
Environment
```text Jenkins: 2.346.2 OS: Linux - 4.14.281-212.502.amzn2.x86_64 --- ace-editor:1.1 additional-identities-plugin:1.1 amazon-ecr:1.73.v741d474abe74 amazon-ecs:1.41 antisamy-markup-formatter:2.7 apache-httpcomponents-client-4-api:4.5.13-1.0 audit-trail:3.11 authentication-tokens:1.4 aws-credentials:191.vcb_f183ce58b_9 aws-java-sdk:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-cloudformation:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-codebuild:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-ec2:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-ecr:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-ecs:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-elasticbeanstalk:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-iam:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-logs:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-minimal:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-sns:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-sqs:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-ssm:1.12.246-349.v96b_b_f7eb_a_c3c bitbucket-scm-trait-commit-skip:0.4.0 blueocean:1.25.5 blueocean-autofavorite:1.2.5 blueocean-bitbucket-pipeline:1.25.5 blueocean-commons:1.25.5 blueocean-config:1.25.5 blueocean-core-js:1.25.5 blueocean-dashboard:1.25.5 blueocean-display-url:2.4.1 blueocean-events:1.25.5 blueocean-git-pipeline:1.25.5 blueocean-github-pipeline:1.25.5 blueocean-i18n:1.25.5 blueocean-jwt:1.25.5 blueocean-personalization:1.25.5 blueocean-pipeline-api-impl:1.25.5 blueocean-pipeline-editor:1.25.5 blueocean-pipeline-scm-api:1.25.5 blueocean-rest:1.25.5 blueocean-rest-impl:1.25.5 blueocean-web:1.25.5 bootstrap4-api:4.6.0-5 bootstrap5-api:5.1.3-7 bouncycastle-api:2.26 branch-api:2.1046.v0ca_37783ecc5 build-timeout:1.21 caffeine-api:2.9.3-65.v6a_47d0f4d1fe checks-api:1.7.4 cloudbees-bitbucket-branch-source:773.v4b_9b_005b_562b_ cloudbees-folder:6.729.v2b_9d1a_74d673 cobertura:1.17 code-coverage-api:3.0.3 codebuilder-cloud:1.0.1 command-launcher:84.v4a_97f2027398 credentials:1139.veb_9579fca_33b_ credentials-binding:523.vd859a_4b_122e6 cucumber-reports:5.7.3 data-tables-api:1.12.1-2 display-url-api:2.3.6 docker-commons:1.19 docker-java-api:3.2.13-37.vf3411c9828b9 docker-workflow:1.29 durable-task:496.va67c6f9eefa7 echarts-api:5.3.3-1 favorite:2.4.1 font-awesome-api:6.1.1-1 forensics-api:1.15.1 generic-webhook-trigger:1.84 git:4.11.3 git-client:3.11.0 git-forensics:1.9.0 git-server:1.11 github:1.34.4 github-api:1.303-400.v35c2d8258028 github-branch-source:1656.v77eddb_b_e95df google-chat-notification:1.4 google-hangouts-chat-notifier:1.0 handlebars:3.0.8 handy-uri-templates-2-api:2.1.8-22.v77d5b_75e6953 htmlpublisher:1.30 jackson2-api:2.13.3-285.vc03c0256d517 javax-activation-api:1.2.0-3 javax-mail-api:1.6.2-6 jaxb:2.3.6-1 jdk-tool:1.5 jenkins-design-language:1.25.5 jira:3.7.1 jjwt-api:0.11.5-77.v646c772fddb_0 jquery3-api:3.6.0-4 jsch:0.1.55.2 junit:1119.1121.vc43d0fc45561 locale:180.v207501dff9b_a_ lockable-resources:2.15 mailer:414.vcc4c33714601 matrix-auth:3.1.5 matrix-project:772.v494f19991984 mina-sshd-api-common:2.8.0-21.v493b_6b_db_22c6 mina-sshd-api-core:2.8.0-21.v493b_6b_db_22c6 momentjs:1.1.1 oic-auth:1.8 okhttp-api:4.9.3-105.vb96869f8ac3a pipeline-aws:1.43 pipeline-build-step:2.18 pipeline-config-history:1.6 pipeline-graph-analysis:195.v5812d95a_a_2f9 pipeline-groovy-lib:593.va_a_fc25d520e9 pipeline-input-step:449.v77f0e8b_845c4 pipeline-milestone-step:101.vd572fef9d926 pipeline-model-api:2.2097.v33db_b_de764b_e pipeline-model-definition:2.2097.v33db_b_de764b_e pipeline-model-extensions:2.2097.v33db_b_de764b_e pipeline-rest-api:2.24 pipeline-stage-step:293.v200037eefcd5 pipeline-stage-tags-metadata:2.2097.v33db_b_de764b_e pipeline-stage-view:2.24 plain-credentials:1.8 plugin-util-api:2.17.0 popper-api:1.16.1-3 popper2-api:2.11.5-2 prism-api:1.28.0-2 pubsub-light:1.16 resource-disposer:0.19 role-strategy:530.ved5445d4875a_ saml:2.298.vc7a_2b_3958628 scm-api:608.vfa_f971c5a_a_e9 script-security:1175.v4b_d517d6db_f0 simple-theme-plugin:103.va_161d09c38c7 snakeyaml-api:1.30.2-76.vc104f7ce9870 sse-gateway:1.25 ssh-credentials:291.v8211e4f8efb_c ssh-slaves:1.821.vd834f8a_c390e sshd:3.242.va_db_9da_b_26a_c3 structs:318.va_f3ccb_729b_71 timestamper:1.18 token-macro:293.v283932a_0a_b_49 trilead-api:1.66.v49c6758b_b_360 variant:1.4 windows-slaves:1.8.1 workflow-aggregator:590.v6a_d052e5a_a_b_5 workflow-api:1188.v0016b_4f29881 workflow-basic-steps:969.vc4ec3e4854b_f workflow-cps:2746.v0da_83a_332669 workflow-durable-task-step:1174.v73a_9a_17edce0 workflow-job:1207.ve6191ff089f8 workflow-multibranch:716.vc692a_e52371b_ workflow-scm-step:400.v6b_89a_1317c9a_ workflow-step-api:625.vd896b_f445a_f8 workflow-support:833.va_1c71061486b_ ws-cleanup:0.42 ```What Operating System are you using (both controller, and any agents involved in the problem)?
Jenkins master: Docker Image jenkins/jenkins:lts Jenkins slaves: Docker Image jenkins/inbound-agent:4.11-1-jdk11
Reproduction steps
Hello!
I've reported an issue in the Jenkins Jira instance, but I'm not sure if that's being reviewed by someone or not, so I'm also adding my report here, I'm really sorry if that causes any inconveniences and please close the one that's in the right place.
After updating the my jenkins instance plugins (cobertura was updated to version 1.17) I started getting error when publishing coverage and when trying to open the reports.
My Jenkinsfile has the following post stage action:
Our company code convention follows the following schema:
Which means that it's normal for us to have multiple files named
handlers.ts
in the same project (but part of a different "package"):The code inside handler is not that important as it's usually related to dependency injection, I do not remember the behavior before the update (I think they were all merged in the "main/src/handler.ts", hence not being correct, but it wasn't the point as it's not of interest for us, what I do remember was that the plugin was not causing any build problems like now)
Expected Results
Pipeline runs successfully
Actual Results
When the pipeline runs I'm getting this:
Anything else?
An extra weird thing is that sometimes I can open the coverage report and sometimes I get this NPE in the Jenkins logs (unsure if it's related or if it's a different issue)
I attempted to revert to the previous version reported by Jenkins (1.16) but it doesn't seem to solve the issue, I'm guessing that something has changed in another dependency and it's causing the issue, but I'm lost on where to start troubleshooting the issue.
Does anybody has a suggestion on where to start? (i.e revert to version XXX, change pipeline definition, ...)
Best regards Gonzalo G