jasonosullivan34 opened a new pull request, #9893:
URL: https://github.com/apache/ozone/pull/9893

   ## What changes were proposed in this pull request?
   Provide a one-liner summary of the changes in the PR **Title** field above.
   It should be in the form of `HDDS-1234. Short summary of the change`.
   
   Please describe your PR in detail:
   The ozone-filesystem-shaded module's maven-shade-plugin contained relocation 
rules using bare keyword patterns without a trailing dot — specifically 
<pattern>io</pattern>, <pattern>kotlin</pattern>, and <pattern>info</pattern>. 
Because the shade plugin does prefix string replacement on JVM constant pool 
entries, these rules incorrectly matched any string constant starting with 
those characters — not just genuine package references.
   
   The fix adds a trailing dot to both <pattern> and <shadedPattern> for each 
affected rule, e.g.:
   `<pattern>io.</pattern>
   <shadedPattern>${ozone.shaded.prefix}.io.</shadedPattern>`
   
   This restricts matching to genuine package references (io.grpc, io.netty 
etc.) and prevents false positive matches against binary protobuf descriptor 
data, Netty system property names, and Kotlin compiler metadata strings.
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-14778
   
   ## How was this patch tested?
   
   Binary analysis of ozone-filesystem-shaded-2.0.0.jar confirms the bug was 
actively corrupting 13 class files in the released 2.0.0 artifact, including 
OzoneManagerProtocolProtos and StorageContainerLocationProtocolProtos, causing 
ExceptionInInitializerError / InvalidProtocolBufferException: Protocol message 
tag had invalid wire type at class load time.
   
   The bug does not currently manifest in master (2.2.0-SNAPSHOT) due to a 
coincidental change in how the protobuf codegen version structures descriptor 
chunks — the root cause is unchanged and remains latent.
   
   A verification script 
[check-shading.py](https://github.com/user-attachments/files/25872947/check-shading.py)
 is included that scans all class files in the shaded JAR for corrupted 
constant pool entries:
   `python3 check-shading.py`
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to