Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix][ci] Fix jacoco code coverage report aggregation #22964

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

lhotari
Copy link
Member

@lhotari lhotari commented Jun 24, 2024

Motivation

Jacoco code coverage report aggregation is currently broken in CI. This broke with #22892 changes.

Example failure

  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

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Copy link

@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 -->

@github-actions github-actions bot added doc-label-missing doc-not-needed Your PR changes do not impact docs and removed doc-label-missing labels Jun 24, 2024
@lhotari lhotari force-pushed the lh-fix-jacoco-report branch 2 times, most recently from ec3f2b7 to 608f838 Compare June 24, 2024 15:25
@lhotari lhotari marked this pull request as draft June 24, 2024 16:57
@lhotari lhotari marked this pull request as ready for review June 24, 2024 17:01
@lhotari lhotari merged commit aa03c0e into apache:master Jun 24, 2024
49 of 50 checks passed
lhotari added a commit that referenced this pull request Jun 24, 2024
(cherry picked from commit aa03c0e)

# Conflicts:
#	pom.xml
lhotari added a commit that referenced this pull request Jun 24, 2024
lhotari added a commit that referenced this pull request Jun 24, 2024
lhotari added a commit that referenced this pull request Jun 24, 2024
nikhil-ctds pushed a commit to datastax/pulsar that referenced this pull request Jul 1, 2024
(cherry picked from commit aa03c0e)
(cherry picked from commit 5328417)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Jul 1, 2024
(cherry picked from commit aa03c0e)
(cherry picked from commit 5328417)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants