[ 
https://issues.apache.org/jira/browse/HDDS-17836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated HDDS-17836:
----------------------------------
    Labels: pull-request-available  (was: )

> coverage.sh misses rocksdb-checkpoint-differ and includes generated ipc_ 
> protobuf classes
> -----------------------------------------------------------------------------------------
>
>                 Key: HDDS-17836
>                 URL: https://issues.apache.org/jira/browse/HDDS-17836
>             Project: Apache Ozone
>          Issue Type: Bug
>          Components: CI
>            Reporter: Chi-Hsuan Huang
>            Assignee: Andy Huang
>            Priority: Minor
>              Labels: pull-request-available
>
> {{coverage.sh}} builds the JaCoCo report from classes unzipped out of the 
> dist {{share/ozone/lib}} jars. Comparing its {{all.xml}} with SonarCloud for 
> master commit 82207730b6, I found two class selection gaps:
> * {{rocksdb-checkpoint-differ.jar}} is never unzipped, because the {{find}} 
> only matches {{hdds-*.jar}} and {{ozone-*.jar}}. {{jacoco-all.exec}} does 
> contain execution data for its classes (e.g. {{RocksDBCheckpointDiffer}}), 
> but the report drops them. Sonar shows the module at 0% (1,258 lines).
> * Generated classes in {{org.apache.hadoop.ipc_.protobuf}} are kept, because 
> the exclusion only matches directories named {{proto}}. They add about 3,500 
> lines to the report, and top the package table added in HDDS-17463.
> Root cause: {{coverage.sh}} selects classes by naming convention (jar name 
> prefix, directory name blocklist), so modules or generated packages that do 
> not follow the convention are silently handled wrong.
> Background: these two gaps, plus modules that {{coverage.sh}} intentionally 
> leaves out but Sonar still counts as uncovered (freon, vapor, test 
> utilities), account for most of the difference between the HDDS-17463 summary 
> (81.8%) and Sonar (79.9%). Aligning Sonar's coverage scope can be a separate 
> task.
> Possible fix: select jars by Maven metadata 
> ({{META-INF/maven/org.apache.ozone/}}) instead of file name, and exclude 
> generated packages based on the {{java_package}} options declared in 
> {{.proto}} files. A minimal alternative is to add 
> {{rocksdb-checkpoint-differ.jar}} and the {{ipc_/protobuf}} directory to the 
> existing patterns.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to