Skip to content

Conversation

@PDavid
Copy link
Contributor

@PDavid PDavid commented Feb 27, 2025

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.
Copy link
Contributor

@petersomogyi petersomogyi left a comment

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
Contributor

Apache9 commented Feb 27, 2025

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

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 26s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+1 💚 mvninstall 3m 10s master passed
+1 💚 compile 7m 47s master passed
+1 💚 spotless 0m 44s branch has no errors when running spotless:check.
_ Patch Compile Tests _
+1 💚 mvninstall 2m 59s the patch passed
+1 💚 compile 7m 48s the patch passed
+1 💚 javac 7m 48s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 xmllint 0m 0s No new issues.
+1 💚 hadoopcheck 11m 45s Patch does not cause any errors with Hadoop 3.3.6 3.4.0.
+1 💚 spotless 0m 44s patch has no errors when running spotless:check.
_ Other Tests _
+1 💚 asflicense 0m 12s The patch does not generate ASF License warnings.
42m 58s
Subsystem Report/Notes
Docker ClientAPI=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 Tests dupname asflicense javac codespell detsecrets xmllint hadoopcheck spotless compile
uname Linux 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 tool maven
Personality dev-support/hbase-personality.sh
git revision master / 9f84978
Default Java Eclipse Adoptium-17.0.11+9
Max. process+thread count 188 (vs. ulimit of 30000)
modules C: . U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6727/1/console
versions git=2.34.1 maven=3.9.8 xmllint=20913
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@PDavid
Copy link
Contributor Author

PDavid commented Feb 27, 2025

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
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
Member

Can we not ErrorProne this on master?

@petersomogyi
Copy link
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

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 27s Docker mode activated.
-0 ⚠️ yetus 0m 2s Unprocessed 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 💚 mvninstall 3m 14s master passed
+1 💚 compile 2m 9s master passed
+1 💚 javadoc 1m 55s master passed
+1 💚 shadedjars 5m 53s branch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 2m 59s the patch passed
+1 💚 compile 2m 11s the patch passed
+1 💚 javac 2m 11s the patch passed
+1 💚 javadoc 1m 56s the patch passed
+1 💚 shadedjars 5m 54s patch has no errors when building our shaded downstream artifacts.
_ Other Tests _
+1 💚 unit 291m 56s root in the patch passed.
325m 16s
Subsystem Report/Notes
Docker ClientAPI=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 Tests javac javadoc unit shadedjars compile
uname Linux 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 tool maven
Personality dev-support/hbase-personality.sh
git revision master / 9f84978
Default Java Eclipse Adoptium-17.0.11+9
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6727/1/testReport/
Max. process+thread count 8312 (vs. ulimit of 30000)
modules C: . U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6727/1/console
versions git=2.34.1 maven=3.9.8
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@PDavid
Copy link
Contributor Author

PDavid commented Feb 28, 2025

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

5 participants