We will terminate SonarCloud on 11 January 2025. One of the main SonarCloud features that we rely on is Unit Test Code Coverage Quality Gate, this is to ensure that New Code always have sufficient Unit Test Coverage. We have built a solution to replace this functionality. Thus, we are starting the roll-out process to ensure that by 11 January 2025, all repositories have implemented the new solution.
All backend engineers
Please read and apply https://traveloka.roadie.so/docs/default/component/traveloka-backstage-docs/quality/testing-code-coverage/ to all Java repositories. Make sure to test the change by running ./gradlew test jacocoTestReport testCodeCoverageReport
. The jacocoTestReport
and testCodeCoverageReport
tasks shouldn't report any errors.
13 December 2024 |
|
16 December 2024 |
|
8 January 2025 |
|
10 January 2025 |
|
11 January 2025 |
|
13 January 2025 |
|
Should you have any questions or concerns, feel free to reply to this thread and/or reach out to
sonar
or testCodeCoverageReport
. Is this ok?dev_login.sh
and try running the gradle command again.
* What went wrong:
Plugin [id: 'com.traveloka.common.gradle.gradle-settings', version: '8.3.8'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Included Builds (No included builds contain this plugin)
- Plugin Repositories (could not resolve plugin artifact 'com.traveloka.common.gradle.gradle-settings:com.traveloka.common.gradle.gradle-settings.gradle.plugin:8.3.8')
Searched in the following repositories:
maven(https://org-codeartifact-domain-015110552125-242c507c3f-015110552125.d.codeartifact.ap-southeast-1.amazonaws.com/maven/org-backend_external_cache-maven-015110552125-4c9d05c06c701f074074/)
maven2(s3://beiartf-maven-artifacts-015110552125-aeb600c7e0343453.s3.ap-southeast-1.amazonaws.com/release)
MavenLocal(file:/Users/<your_username>/.m2/repository/)
cannot add a ReportSpec
when applying plugin base-root
Where:
Build file '/Users/<your_username>/Project/acd-marketing-backend/build.gradle' line: 51
What went wrong:
A problem occurred evaluating root project 'acd-marketing-backend'.
> Failed to apply plugin 'com.traveloka.common.gradle.base-root'.
> Cannot add a ReportSpec with name 'testCodeCoverageReport' as a ReportSpec with that name already exists.
testCodeCoverageReport
, there is an error can't add different class with same name
Caused by: java.lang.IllegalStateException: Can't add different class with same name: com/traveloka/flight/test/Bar
at org.jacoco.core.analysis.CoverageBuilder.visitCoverage(CoverageBuilder.java:106)
at org.jacoco.core.analysis.Analyzer$1.visitEnd(Analyzer.java:100)
at org.objectweb.asm.ClassVisitor.visitEnd(ClassVisitor.java:395)
at org.jacoco.core.internal.flow.ClassProbesAdapter.visitEnd(ClassProbesAdapter.java:100)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:749)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:425)
at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:117)
at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:133)
... 152 more