Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HBASE-26622 Update error-prone to 2.10 #3979

Closed
wants to merge 2 commits into from

Conversation

madrob
Copy link
Contributor

@madrob madrob commented Dec 23, 2021

https://issues.apache.org/jira/browse/HBASE-26622

Tested via mvn package -DskipTests -PerrorProne - it probably won't build with Java 8, but it's an opt-in profile so I'm not worried about strict compatibility. Did not run unit tests.

There are (still? newly?) hundreds of warnings that y'all can sort through as follow-on work.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 27s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 1m 6s Maven dependency ordering for branch
+1 💚 mvninstall 3m 59s master passed
+1 💚 compile 2m 49s master passed
+1 💚 shadedjars 8m 22s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 3m 41s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 21s Maven dependency ordering for patch
+1 💚 mvninstall 3m 48s the patch passed
+1 💚 compile 2m 50s the patch passed
+1 💚 javac 2m 50s the patch passed
+1 💚 shadedjars 8m 30s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 3m 36s the patch passed
_ Other Tests _
-1 ❌ unit 28m 5s root in the patch failed.
69m 45s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3979/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR #3979
Optional Tests javac javadoc unit shadedjars compile
uname Linux c4bc3f5a461b 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 70703ca
Default Java AdoptOpenJDK-1.8.0_282-b08
unit https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3979/1/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-root.txt
Test Results https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3979/1/testReport/
Max. process+thread count 1122 (vs. ulimit of 30000)
modules C: hbase-build-configuration hbase-common hbase-asyncfs hbase-server . U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3979/1/console
versions git=2.17.1 maven=3.6.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 32s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 0m 54s Maven dependency ordering for branch
+1 💚 mvninstall 5m 10s master passed
+1 💚 compile 3m 34s master passed
+1 💚 shadedjars 9m 56s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 5m 4s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 24s Maven dependency ordering for patch
+1 💚 mvninstall 5m 2s the patch passed
+1 💚 compile 3m 39s the patch passed
+1 💚 javac 3m 38s the patch passed
+1 💚 shadedjars 9m 26s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 4m 53s the patch passed
_ Other Tests _
-1 ❌ unit 23m 51s root in the patch failed.
74m 38s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3979/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #3979
Optional Tests javac javadoc unit shadedjars compile
uname Linux 0b86e1f59970 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 70703ca
Default Java AdoptOpenJDK-11.0.10+9
unit https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3979/1/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-root.txt
Test Results https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3979/1/testReport/
Max. process+thread count 838 (vs. ulimit of 30000)
modules C: hbase-build-configuration hbase-common hbase-asyncfs hbase-server . U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3979/1/console
versions git=2.17.1 maven=3.6.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 1s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+0 🆗 mvndep 0m 52s Maven dependency ordering for branch
+1 💚 mvninstall 4m 4s master passed
+1 💚 compile 8m 57s master passed
+1 💚 checkstyle 2m 2s master passed
+1 💚 spotbugs 13m 23s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 21s Maven dependency ordering for patch
+1 💚 mvninstall 3m 50s the patch passed
-1 ❌ compile 0m 24s root in the patch failed.
-0 ⚠️ javac 0m 24s root in the patch failed.
-0 ⚠️ checkstyle 2m 0s root: The patch generated 1 new + 81 unchanged - 1 fixed = 82 total (was 82)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 xml 0m 3s The patch has no ill-formed XML file.
+1 💚 hadoopcheck 19m 34s Patch does not cause any errors with Hadoop 3.1.2 3.2.2 3.3.1.
+1 💚 spotbugs 14m 21s the patch passed
_ Other Tests _
+1 💚 asflicense 1m 10s The patch does not generate ASF License warnings.
81m 20s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3979/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #3979
Optional Tests dupname asflicense javac spotbugs hadoopcheck hbaseanti checkstyle compile xml
uname Linux f390188fd770 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 70703ca
Default Java AdoptOpenJDK-1.8.0_282-b08
compile https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3979/1/artifact/yetus-general-check/output/patch-compile-root.txt
javac https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3979/1/artifact/yetus-general-check/output/patch-compile-root.txt
checkstyle https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3979/1/artifact/yetus-general-check/output/diff-checkstyle-root.txt
Max. process+thread count 141 (vs. ulimit of 30000)
modules C: hbase-build-configuration hbase-common hbase-asyncfs hbase-server . U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3979/1/console
versions git=2.17.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 2s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+0 🆗 mvndep 0m 21s Maven dependency ordering for branch
+1 💚 mvninstall 3m 48s master passed
+1 💚 compile 8m 58s master passed
+1 💚 checkstyle 1m 57s master passed
+1 💚 spotbugs 15m 57s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 21s Maven dependency ordering for patch
+1 💚 mvninstall 3m 50s the patch passed
-1 ❌ compile 0m 22s root in the patch failed.
-0 ⚠️ javac 0m 22s root in the patch failed.
-0 ⚠️ checkstyle 1m 58s root: The patch generated 1 new + 84 unchanged - 1 fixed = 85 total (was 85)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 xml 0m 3s The patch has no ill-formed XML file.
+1 💚 hadoopcheck 19m 18s Patch does not cause any errors with Hadoop 3.1.2 3.2.2 3.3.1.
+1 💚 spotbugs 17m 47s the patch passed
_ Other Tests _
+1 💚 asflicense 1m 47s The patch does not generate ASF License warnings.
87m 43s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3979/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #3979
Optional Tests dupname asflicense javac spotbugs hadoopcheck hbaseanti checkstyle compile xml
uname Linux eeb01cb91ce4 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 70703ca
Default Java AdoptOpenJDK-1.8.0_282-b08
compile https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3979/2/artifact/yetus-general-check/output/patch-compile-root.txt
javac https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3979/2/artifact/yetus-general-check/output/patch-compile-root.txt
checkstyle https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3979/2/artifact/yetus-general-check/output/diff-checkstyle-root.txt
Max. process+thread count 141 (vs. ulimit of 30000)
modules C: hbase-build-configuration hbase-common hbase-asyncfs hbase-server hbase-mapreduce hbase-thrift hbase-endpoint . U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3979/2/console
versions git=2.17.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 25s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 0m 21s Maven dependency ordering for branch
+1 💚 mvninstall 4m 39s master passed
+1 💚 compile 3m 19s master passed
+1 💚 shadedjars 8m 29s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 6m 11s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 21s Maven dependency ordering for patch
+1 💚 mvninstall 4m 43s the patch passed
+1 💚 compile 3m 21s the patch passed
+1 💚 javac 3m 21s the patch passed
+1 💚 shadedjars 8m 37s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 6m 7s the patch passed
_ Other Tests _
+1 💚 unit 192m 53s root in the patch passed.
243m 57s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3979/2/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #3979
Optional Tests javac javadoc unit shadedjars compile
uname Linux 8b975504c594 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 70703ca
Default Java AdoptOpenJDK-11.0.10+9
Test Results https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3979/2/testReport/
Max. process+thread count 6922 (vs. ulimit of 30000)
modules C: hbase-build-configuration hbase-common hbase-asyncfs hbase-server hbase-mapreduce hbase-thrift hbase-endpoint . U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3979/2/console
versions git=2.17.1 maven=3.6.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache9
Copy link
Contributor

Apache9 commented Dec 27, 2021

Long time no see @madrob

Seems there is something wrong while building with error prone enabled?

@madrob
Copy link
Contributor Author

madrob commented Dec 27, 2021

Yes, the latest version doesn’t work with java 8. Still should fix the other bugs tho

@Apache9
Copy link
Contributor

Apache9 commented Dec 27, 2021

Maybe we could change the pre commit compile stage to use java11 with --release=8?

Copy link
Member

@ndimiduk ndimiduk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great @madrob !

@@ -1102,10 +1102,11 @@ private int calculateHashForKey(Cell cell) {
*/
@Override
public KeyValue clone() throws CloneNotSupportedException {
super.clone();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wtf was this even doing?

@@ -68,11 +68,6 @@
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this check is run by precommit testing only, I'm fine with bumping this check over to JDK11. Please make sure that test-patch is calling it from the jdk11 incantation instead of the jdk8 incantation.

@ndimiduk
Copy link
Member

ndimiduk commented Jan 5, 2022

Maybe we could change the pre commit compile stage to use java11 with --release=8?

Doesn't work, #3974

@ndimiduk
Copy link
Member

ndimiduk commented Jan 5, 2022

Yes, the latest version doesn’t work with java 8. Still should fix the other bugs tho

Per my read of https://errorprone.info/docs/installation#jdk-8, 2.10.0 is the last version with support for JDK8.

@ndimiduk
Copy link
Member

@madrob I applied this patch but reverted your changes to hbase-build-configuration/pom.xml. I then reproduced the ErrorProne violation from #3968. The upgraded version of ErrorProne fails with a meaningful error message. Which means, the upgrade here does fix the the pre-commit issue I saw over there.

[ERROR] /Users/ndimiduk/repos/apache/hbase/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java:[1604,50] error: [RestrictedApi] Should only be called in self or ZKUtil

Please revert the change to hbase-build-configuration/pom.xml, keeping ErrorProne configured for JDK8, and you have my +1 on this change.

If you want me to take it over, let me know.

Thanks for the drive-by 👍

@ndimiduk
Copy link
Member

@madrob
Copy link
Contributor Author

madrob commented Jan 12, 2022

Fair Nick, if you can find the time
To drive this task complete with care
Then I would much be in your debt
And credit for the work we'd share

System.arraycopy(this.bytes, this.offset, b, 0, this.length);
KeyValue ret = new KeyValue(b, 0, b.length);
KeyValue ret = (KeyValue) super.clone();
ret.bytes = new byte[this.length];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe simpler to use Arrays.copyOfRange here?

@ndimiduk
Copy link
Member

ndimiduk commented Mar 2, 2022

Resolved via #4133

@ndimiduk ndimiduk closed this Mar 2, 2022
@ndimiduk
Copy link
Member

ndimiduk commented Mar 2, 2022

Thanks for getting us started, @madrob !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants