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

Chu Cheng Li updated HDDS-15593:
--------------------------------
    Description: 
Fix protobuf/gRPC generated-source rewriting in {{hdds-interface-client}} and 
{{{}hdds-interface-server{}}}.

These modules generate Ratis protocol classes that must use Ratis-shaded 
packages, for example:
org.apache.ratis.thirdparty.io.grpcorg.apache.ratis.thirdparty.com.google.protobuforg.apache.ratis.thirdparty.com.google.common
 
The previous Ant {{<replace dir="...">}} configuration did not reliably rewrite 
nested generated Java files under:
{code:java}
target/generated-sources/proto-java-for-ratis/org/apache/hadoop/... {code}
This patch changes the replacement rules to use explicit recursive 
{{<fileset>}} entries over {{{}*{*}/{*}.java{}}}.
h3. Reproduction

A targeted clean build can fail before this patch:
mvn clean
mvn clean test-compile -pl hadoop-ozone/s3gateway -am
 
Example error:
{code:java}
XceiverClientProtocolServiceGrpc.java:[3,22] package io.grpc does not exist
IntraDatanodeProtocolServiceGrpc.java:[7,26] package io.grpc.stub.annotations 
does not exist{{}}{code}
This may be hidden by a prior full build or local cache, because downstream 
module-only tests can resolve already-installed snapshot artifacts from 
{{{}~/.m2{}}}.

 

  was:
Fix protobuf/gRPC generated-source rewriting in {{hdds-interface-client}} and 
{{{}hdds-interface-server{}}}.

These modules generate Ratis protocol classes that must use Ratis-shaded 
packages, for example:
org.apache.ratis.thirdparty.io.grpcorg.apache.ratis.thirdparty.com.google.protobuforg.apache.ratis.thirdparty.com.google.common
 
The previous Ant {{<replace dir="...">}} configuration did not reliably rewrite 
nested generated Java files under:
{code:java}
target/generated-sources/proto-java-for-ratis/org/apache/hadoop/... {code}
This patch changes the replacement rules to use explicit recursive 
{{<fileset>}} entries over {{{}**/*.java{}}}.
h3. Reproduction

A targeted clean build can fail before this patch:
mvn clean
mvn clean test-compile -pl hadoop-ozone/s3gateway -am
 
Example error:
XceiverClientProtocolServiceGrpc.java:[3,22] package io.grpc does not exist
IntraDatanodeProtocolServiceGrpc.java:[7,26] package io.grpc.stub.annotations 
does not exist{{}}
This may be hidden by a prior full build or local cache, because downstream 
module-only tests can resolve already-installed snapshot artifacts from 
{{{}~/.m2{}}}.

 


> Fix recursive Ratis protobuf import rewriting
> ---------------------------------------------
>
>                 Key: HDDS-15593
>                 URL: https://issues.apache.org/jira/browse/HDDS-15593
>             Project: Apache Ozone
>          Issue Type: Bug
>            Reporter: Chu Cheng Li
>            Assignee: Chu Cheng Li
>            Priority: Major
>              Labels: pull-request-available
>
> Fix protobuf/gRPC generated-source rewriting in {{hdds-interface-client}} and 
> {{{}hdds-interface-server{}}}.
> These modules generate Ratis protocol classes that must use Ratis-shaded 
> packages, for example:
> org.apache.ratis.thirdparty.io.grpcorg.apache.ratis.thirdparty.com.google.protobuforg.apache.ratis.thirdparty.com.google.common
>  
> The previous Ant {{<replace dir="...">}} configuration did not reliably 
> rewrite nested generated Java files under:
> {code:java}
> target/generated-sources/proto-java-for-ratis/org/apache/hadoop/... {code}
> This patch changes the replacement rules to use explicit recursive 
> {{<fileset>}} entries over {{{}*{*}/{*}.java{}}}.
> h3. Reproduction
> A targeted clean build can fail before this patch:
> mvn clean
> mvn clean test-compile -pl hadoop-ozone/s3gateway -am
>  
> Example error:
> {code:java}
> XceiverClientProtocolServiceGrpc.java:[3,22] package io.grpc does not exist
> IntraDatanodeProtocolServiceGrpc.java:[7,26] package io.grpc.stub.annotations 
> does not exist{{}}{code}
> This may be hidden by a prior full build or local cache, because downstream 
> module-only tests can resolve already-installed snapshot artifacts from 
> {{{}~/.m2{}}}.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to