Skip to content

HBASE-29155 Upgrade checkstyle to fix website build - #6727

Closed
PDavid wants to merge 1 commit into
apache:masterfrom
PDavid:HBASE-29155-chekstyle-upgrade-fix-site
Closed

HBASE-29155 Upgrade checkstyle to fix website build#6727
PDavid wants to merge 1 commit into
apache:masterfrom
PDavid:HBASE-29155-chekstyle-upgrade-fix-site

Conversation

@PDavid

Copy link
Copy Markdown
Contributor

The website build failed with the following error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.12.0:site (default-site) on project hbase: Error generating maven-checkstyle-plugin:3.1.0:checkstyle-aggregate report: Failed during checkstyle configuration: Exception was thrown while processing hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/replicas/ReplicaKey.java: IllegalStateException occurred while parsing file hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/replicas/ReplicaKey.java. hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/replicas/ReplicaKey.java:43:35: expecting RPAREN, found 'other' -> [Help 1]

Checkstyle is not able to parse ReplicaKey.java (because of instanceOf pattern match syntax).

Upgraded the maven-checkstyle-plugin plugin version and the checkstyle version which it uses.

The website build failed with the following error:
```
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.12.0:site (default-site) on project hbase: Error generating maven-checkstyle-plugin:3.1.0:checkstyle-aggregate report: Failed during checkstyle configuration: Exception was thrown while processing hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/replicas/ReplicaKey.java: IllegalStateException occurred while parsing file hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/replicas/ReplicaKey.java. hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/replicas/ReplicaKey.java:43:35: expecting RPAREN, found 'other' -> [Help 1]
```
Checkstyle is not able to parse ReplicaKey.java (because of instanceOf pattern match syntax).
Upgraded the maven-checkstyle-plugin plugin version and the checkstyle version which it uses.

@petersomogyipetersomogyi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm. Let's see the yetus test results.

@Apache9

Copy link
Copy Markdown
Contributor

IIRC we have a rule to not use java11+ grammer on branch-3 as long as we still need to support java 8 on branch-2.x.

So let's change the code instead of upgrading checkstyle?

We can disucss this again after we make our first 3.x release...

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 26sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗codespell0m 0scodespell was not available.
+0 🆗detsecrets0m 0sdetect-secrets was not available.
+1 💚@author0m 0sThe patch does not contain any @author tags.
_ master Compile Tests _
+1 💚mvninstall3m 10smaster passed
+1 💚compile7m 47smaster passed
+1 💚spotless0m 44sbranch has no errors when running spotless:check.
_ Patch Compile Tests _
+1 💚mvninstall2m 59sthe patch passed
+1 💚compile7m 48sthe patch passed
+1 💚javac7m 48sthe patch passed
+1 💚blanks0m 0sThe patch has no blanks issues.
+1 💚xmllint0m 0sNo new issues.
+1 💚hadoopcheck11m 45sPatch does not cause any errors with Hadoop 3.3.6 3.4.0.
+1 💚spotless0m 44spatch has no errors when running spotless:check.
_ Other Tests _
+1 💚asflicense0m 12sThe patch does not generate ASF License warnings.
42m 58s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6727/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#6727
Optional Testsdupname asflicense javac codespell detsecrets xmllint hadoopcheck spotless compile
unameLinux a41f9e21132a 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 9f84978
Default JavaEclipse Adoptium-17.0.11+9
Max. process+thread count188 (vs. ulimit of 30000)
modulesC: . U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6727/1/console
versionsgit=2.34.1 maven=3.9.8 xmllint=20913
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@PDavid

Copy link
Copy Markdown
ContributorAuthor

IIRC we have a rule to not use java11+ grammer on branch-3 as long as we still need to support java 8 on branch-2.x.

Thanks @Apache9, to be completely honest I did not know about this. Does this applies to master branch as well or is this rule only for branch-3?

So let's change the code instead of upgrading checkstyle?

OK, I opened another PR here which only changes the code: #6729

BTW do you see any problems upgrading checkstyle anyway?

@ndimiduk

Copy link
Copy Markdown
Member

IIRC we have a rule to not use java11+ grammer on branch-3 as long as we still need to support java 8 on branch-2.x.

Ah sorry, I didn't realize that was a community decision. I directed @rmdmattingly badly.

@ndimiduk

Copy link
Copy Markdown
Member

Can we not ErrorProne this on master?

@petersomogyi

Copy link
Copy Markdown
Contributor

The master branch is java17+, so there I think we should upgrade checkstyle to a version which is not java 8 only.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 27sDocker mode activated.
-0 ⚠️yetus0m 2sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚mvninstall3m 14smaster passed
+1 💚compile2m 9smaster passed
+1 💚javadoc1m 55smaster passed
+1 💚shadedjars5m 53sbranch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+1 💚mvninstall2m 59sthe patch passed
+1 💚compile2m 11sthe patch passed
+1 💚javac2m 11sthe patch passed
+1 💚javadoc1m 56sthe patch passed
+1 💚shadedjars5m 54spatch has no errors when building our shaded downstream artifacts.
_ Other Tests _
+1 💚unit291m 56sroot in the patch passed.
325m 16s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6727/1/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR#6727
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 5114cc4dffb5 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 9f84978
Default JavaEclipse Adoptium-17.0.11+9
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6727/1/testReport/
Max. process+thread count8312 (vs. ulimit of 30000)
modulesC: . U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6727/1/console
versionsgit=2.34.1 maven=3.9.8
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@PDavid

Copy link
Copy Markdown
ContributorAuthor

@PDavidPDavid closed this Feb 28, 2025
@PDavid
PDavid deleted the HBASE-29155-chekstyle-upgrade-fix-site branch March 10, 2025 12:31
Sign up for freeto 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.

5 participants

@PDavid@Apache9@Apache-HBase@ndimiduk@petersomogyi