HDDS-15593. Fix recursive Ratis protobuf import rewriting#10537
HDDS-15593. Fix recursive Ratis protobuf import rewriting#10537peterxcli wants to merge 1 commit into
Conversation
Note: must have dependencies of mvn -am -pl :hdds-interface-client -DskipTests clean install
rm -fr ~/.m2/repository/org/apache/ozone/hdds-interface-clientI cannot reproduce the problem with your command on: Do you have different versions? Do you have some AI agent working in parallel on the same source root? |
|
@adoroszlai Thanks for checking out!
sorry the reproduction command is (updated in PR description): mvn clean
mvn clean test-compile -pl hadoop-ozone/s3gateway -am
my
Actually I was using zed's UI to directly run single test case, for example, the auto generate command by zed is: /bin/sh -i -c 'package="org.apache.hadoop.ozone.s3.endpoint"; outer=""; inner="TestObjectDelete"; method="testDelete"; sep="$"; if [ -n "$outer" ]; then c="$outer$sep$inner"; else c="$inner"; fi; if [ -n "$package" ]; then fqc="$package.$c"; else fqc="$c"; fi; f="/Users/lixucheng/Documents/oss/apache/ozone/hadoop-ozone/s3gateway/src/test/java/org/apache/hadoop/ozone/s3/endpoint/TestObjectDelete.java"; p="$PWD"; d=$(dirname "${f#$p/}"); if [ -f pom.xml ]; then m="."; md="$d"; while [ "$md" != "." ] && [ "$md" != "/" ]; do if [ -f "$md/pom.xml" ]; then m="$md"; break; fi; md=$(dirname "$md"); done; [ -f ./mvnw ] && CMD="./mvnw" || CMD="mvn"; if [ "$m" = "." ]; then $CMD clean test -Dtest="$fqc#$method"; else $CMD clean test-compile -pl "$m" -am && $CMD test -pl "$m" -Dtest="$fqc#$method"; fi; elif [ -f build.gradle ] || [ -f build.gradle.kts ] || [ -f settings.gradle ] || [ -f settings.gradle.kts ]; then m="."; md="$d"; while [ "$md" != "." ] && [ "$md" != "/" ]; do if [ -f "$md/build.gradle" ] || [ -f "$md/build.gradle.kts" ]; then m="$md"; break; fi; md=$(dirname "$md"); done; if [ "$m" = "." ]; then mp=""; else mp=":$(echo "$m" | tr '/' ':')"; fi; [ -f ./gradlew ] && CMD="./gradlew" || CMD="gradle"; $CMD ${mp}:test --tests "$fqc.$method"; else >&2 echo 'No build tool found'; exit 1; fi;' |
|
cc @yandrey321 might be related to #10030 |
Sorry, that doesn't fail either (even after
|
|
I'm not sure that adding a filter would fix anything here. As far as I understand the fix is to disable incremental build for the parts that do shading/renaming. |
@adoroszlai maybe mvn clean test-compile -pl hadoop-ozone/s3gateway -am -Ddevelocity.cache.local.enabled=false |
Nope, |
I don't know if the description is accurate or not, but you might want to experiment with setting it to |
What changes were proposed in this pull request?
Fix protobuf/gRPC generated-source rewriting in
hdds-interface-clientandhdds-interface-server.These modules generate Ratis protocol classes that must use Ratis-shaded packages, for example:
The previous Ant
<replace dir="...">configuration did not reliably rewrite nested generated Java files under:This patch changes the replacement rules to use explicit recursive
<fileset>entries over**/*.java.Reproduction
A targeted clean build can fail before this patch:
Example error:
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.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-15593
How was this patch tested?
(Please explain how this patch was tested. Ex: unit tests, manual tests, workflow run on the fork git repo.)
(If this patch involves UI changes, please attach a screenshot; otherwise, remove this.)