You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "lhotari (via GitHub)" <gi...@apache.org> on 2024/06/24 12:40:22 UTC

[PR] [fix][ci] Fix jacoco code coverage report aggregation [pulsar]

lhotari opened a new pull request, #22964:
URL: https://github.com/apache/pulsar/pull/22964

   ### Motivation
   
   Jacoco code coverage report aggregation is currently broken in CI.
   
   [Example failure](https://github.com/apache/pulsar/actions/runs/9644239258/job/26599083286?pr=22962#step:10:258)
   ```
     Error: Exception in thread "main" java.io.IOException: Error while analyzing /tmp/jacocoDir/pulsar_lib/org.apache.pulsar-jetcd-core-shaded-3.4.0-SNAPSHOT-shaded.jar@META-INF/versions/11/io/vertx/core/DeploymentOptions.class with JaCoCo 0.8.11.202310140853/f33756c.
     	at org.jacoco.cli.internal.core.analysis.Analyzer.analyzerError(Analyzer.java:163)
     	at org.jacoco.cli.internal.core.analysis.Analyzer.analyzeClass(Analyzer.java:135)
     	at org.jacoco.cli.internal.core.analysis.Analyzer.analyzeClass(Analyzer.java:158)
     	at org.jacoco.cli.internal.core.analysis.Analyzer.analyzeAll(Analyzer.java:195)
     	at org.jacoco.cli.internal.core.analysis.Analyzer.analyzeZip(Analyzer.java:267)
     	at org.jacoco.cli.internal.core.analysis.Analyzer.analyzeAll(Analyzer.java:198)
     	at org.jacoco.cli.internal.core.analysis.Analyzer.analyzeAll(Analyzer.java:228)
     	at org.jacoco.cli.internal.core.analysis.Analyzer.analyzeAll(Analyzer.java:223)
     	at org.jacoco.cli.internal.commands.Report.analyze(Report.java:110)
     	at org.jacoco.cli.internal.commands.Report.execute(Report.java:84)
     	at org.jacoco.cli.internal.Main.execute(Main.java:90)
     	at org.jacoco.cli.internal.Main.main(Main.java:105)
     Caused by: java.lang.IllegalStateException: Can't add different class with same name: org/apache/pulsar/jetcd/shaded/io/vertx/core/DeploymentOptions
     	at org.jacoco.cli.internal.core.analysis.CoverageBuilder.visitCoverage(CoverageBuilder.java:106)
     	at org.jacoco.cli.internal.core.analysis.Analyzer$1.visitEnd(Analyzer.java:100)
     	at org.jacoco.cli.internal.asm.ClassVisitor.visitEnd(ClassVisitor.java:395)
     	at org.jacoco.cli.internal.core.internal.flow.ClassProbesAdapter.visitEnd(ClassProbesAdapter.java:100)
     	at org.jacoco.cli.internal.asm.ClassReader.accept(ClassReader.java:749)
     	at org.jacoco.cli.internal.asm.ClassReader.accept(ClassReader.java:425)
     	at org.jacoco.cli.internal.core.analysis.Analyzer.analyzeClass(Analyzer.java:117)
     	at org.jacoco.cli.internal.core.analysis.Analyzer.analyzeClass(Analyzer.java:133)
   ```
   
   ### Modifications
   
   Jacoco doesn't support Multi-release Jar files and the classes must be excluded (https://github.com/jacoco/jacoco/issues/407)
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   *(Please pick either of the following options)*
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   *(or)*
   
   This change is already covered by existing tests, such as *(please describe tests)*.
   
   *(or)*
   
   This change added tests and can be verified as follows:
   
   *(example:)*
     - *Added integration tests for end-to-end deployment with large payloads (10MB)*
     - *Extended integration test for recovery after broker failure*
   
   ### Does this pull request potentially affect one of the following parts:
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   *If the box was checked, please highlight the changes*
   
   - [ ] Dependencies (add or upgrade a dependency)
   - [ ] The public API
   - [ ] The schema
   - [ ] The default values of configurations
   - [ ] The threading model
   - [ ] The binary protocol
   - [ ] The REST endpoints
   - [ ] The admin CLI options
   - [ ] The metrics
   - [ ] Anything that affects deployment
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
   - [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   
   ### Matching PR in forked repository
   
   PR in forked repository: <!-- ENTER URL HERE -->
   
   <!--
   After opening this PR, the build in apache/pulsar will fail and instructions will
   be provided for opening a PR in the PR author's forked repository.
   
   apache/pulsar pull requests should be first tested in your own fork since the 
   apache/pulsar CI based on GitHub Actions has constrained resources and quota.
   GitHub Actions provides separate quota for pull requests that are executed in 
   a forked repository.
   
   The tests will be run in the forked repository until all PR review comments have
   been handled, the tests pass and the PR is approved by a reviewer.
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [fix][ci] Fix jacoco code coverage report aggregation [pulsar]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #22964:
URL: https://github.com/apache/pulsar/pull/22964#issuecomment-2186487634

   @lhotari Please add the following content to your PR description and select a checkbox:
   ```
   - [ ] `doc` <!-- Your PR contains doc changes -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
   - [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org