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-24065 Enable SpotBugs in PreCommit #1364

Closed

Conversation

ndimiduk
Copy link
Member

Yetus's SpotBugs module depends on maven_add_install. In
Jenkinsfile_GitHub, I'm pretty strict on my module definitions, with

GENERAL_CHECK_PLUGINS = 'all,-compile,-javac,-javadoc,-jira,-shadedjars,-unit'
JDK_SPECIFIC_PLUGINS = 'compile,github,htmlout,javac,javadoc,maven,mvninstall,shadedjars,unit'

The general check requests all but omits compile and maven, which
I think means the spotbugs check gets dropped. Before HBASE-23767,
we had just a single yetus that did all, so spotbugs would have been
run.

Yetus's SpotBugs module depends on `maven_add_install`. In
`Jenkinsfile_GitHub`, I'm pretty strict on my module definitions, with

```
GENERAL_CHECK_PLUGINS = 'all,-compile,-javac,-javadoc,-jira,-shadedjars,-unit'
JDK_SPECIFIC_PLUGINS = 'compile,github,htmlout,javac,javadoc,maven,mvninstall,shadedjars,unit'
```

The general check requests all but omits `compile` and `maven`, which
I think means the `spotbugs` check gets dropped. Before HBASE-23767,
we had just a single yetus that did all, so spotbugs would have been
run.
@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 28s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 0m 36s Maven dependency ordering for branch
_ Patch Compile Tests _
+0 🆗 mvndep 0m 11s Maven dependency ordering for patch
_ Other Tests _
2m 9s
Subsystem Report/Notes
Docker Client=19.03.8 Server=19.03.8 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/1/artifact/yetus-jdk8-hadoop2-check/output/Dockerfile
GITHUB PR #1364
Optional Tests
uname Linux f0c47a1a18ad 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / d05fccf
Max. process+thread count 52 (vs. ulimit of 10000)
modules C: U:
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/1/console
versions git=2.17.1 maven=2018-06-17T18:33:14Z)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 16s 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 35s Maven dependency ordering for branch
_ Patch Compile Tests _
+0 🆗 mvndep 0m 10s Maven dependency ordering for patch
_ Other Tests _
2m 51s
Subsystem Report/Notes
Docker Client=19.03.8 Server=19.03.8 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #1364
Optional Tests
uname Linux e6fc9f1d38f1 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / d05fccf
Max. process+thread count 52 (vs. ulimit of 10000)
modules C: U:
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/1/console
versions git=2.17.1 maven=2018-06-17T18:33:14Z)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 3m 19s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 shelldocs 0m 0s Shelldocs was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+0 🆗 mvndep 0m 42s Maven dependency ordering for branch
_ Patch Compile Tests _
+0 🆗 mvndep 0m 13s Maven dependency ordering for patch
+1 💚 shellcheck 0m 0s There were no new shellcheck issues.
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
_ Other Tests _
+0 🆗 asflicense 0m 0s ASF License check generated no output?
5m 34s
Subsystem Report/Notes
Docker Client=19.03.8 Server=19.03.8 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #1364
Optional Tests dupname asflicense shellcheck shelldocs
uname Linux d5bd9b28b17d 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 / d05fccf
Max. process+thread count 52 (vs. ulimit of 10000)
modules C: U:
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/1/console
versions git=2.17.1 maven=2018-06-17T18:33:14Z) shellcheck=0.4.6
Powered by Apache Yetus 0.11.1 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.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 shelldocs 0m 0s Shelldocs was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
_ Patch Compile Tests _
+1 💚 shellcheck 0m 0s There were no new shellcheck issues.
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 xml 0m 1s The patch has no ill-formed XML file.
+1 💚 hadoopcheck 12m 17s Patch does not cause any errors with Hadoop 2.10.0 or 3.1.2.
_ Other Tests _
+1 💚 asflicense 0m 17s The patch does not generate ASF License warnings.
20m 6s
Subsystem Report/Notes
Docker Client=19.03.8 Server=19.03.8 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #1364
Optional Tests dupname asflicense shellcheck shelldocs hadoopcheck xml
uname Linux 9e615bf17379 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / d05fccf
Max. process+thread count 63 (vs. ulimit of 10000)
modules C: . U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/2/console
versions git=2.17.1 maven=2018-06-17T18:33:14Z) shellcheck=0.4.6
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 33s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚 mvninstall 5m 56s master passed
+1 💚 compile 3m 11s master passed
+1 💚 shadedjars 5m 7s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 2m 45s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 5m 29s the patch passed
+1 💚 compile 3m 13s the patch passed
+1 💚 javac 3m 13s the patch passed
+1 💚 shadedjars 5m 4s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 2m 44s the patch passed
_ Other Tests _
-1 ❌ unit 12m 21s root in the patch failed.
48m 15s
Subsystem Report/Notes
Docker Client=19.03.8 Server=19.03.8 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/2/artifact/yetus-jdk8-hadoop2-check/output/Dockerfile
GITHUB PR #1364
Optional Tests javac javadoc unit shadedjars compile
uname Linux dcd486bf0ef2 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 / d05fccf
Default Java 1.8.0_232
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/2/artifact/yetus-jdk8-hadoop2-check/output/patch-unit-root.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/2/testReport/
Max. process+thread count 1092 (vs. ulimit of 10000)
modules C: . U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/2/console
versions git=2.17.1 maven=2018-06-17T18:33:14Z)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@ndimiduk ndimiduk force-pushed the 24065-enable-spotbugs-precommit branch from 4a9f96a to 46000cc Compare March 26, 2020 20:58
@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 33s 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 _
+1 💚 mvninstall 6m 51s master passed
+1 💚 compile 3m 59s master passed
+1 💚 shadedjars 6m 13s branch has no errors when building our shaded downstream artifacts.
-0 ⚠️ javadoc 0m 22s root in master failed.
_ Patch Compile Tests _
+1 💚 mvninstall 6m 17s the patch passed
+1 💚 compile 3m 58s the patch passed
+1 💚 javac 3m 58s the patch passed
+1 💚 shadedjars 6m 10s patch has no errors when building our shaded downstream artifacts.
-0 ⚠️ javadoc 0m 20s root in the patch failed.
_ Other Tests _
-0 ⚠️ unit 89m 38s root in the patch failed.
127m 26s
Subsystem Report/Notes
Docker Client=19.03.8 Server=19.03.8 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/2/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #1364
Optional Tests javac javadoc unit shadedjars compile
uname Linux 54957bf43591 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 / d05fccf
Default Java 2020-01-14
javadoc https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/2/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-root.txt
javadoc https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/2/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-root.txt
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/2/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-root.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/2/testReport/
Max. process+thread count 6856 (vs. ulimit of 10000)
modules C: . U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/2/console
versions git=2.17.1 maven=2018-06-17T18:33:14Z)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

Copy link
Contributor

@saintstack saintstack left a comment

Choose a reason for hiding this comment

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

LGTM. Try it. Comment below

@@ -46,6 +46,7 @@ pipeline {
TESTS_FILTER = 'cc,checkstyle,javac,javadoc,pylint,shellcheck,whitespace,perlcritic,ruby-lint,rubocop,mvnsite'
EXCLUDE_TESTS_URL = "${JENKINS_URL}/job/HBase-Find-Flaky-Tests/job/${CHANGE_TARGET}/lastSuccessfulBuild/artifact/excludes"

////
Copy link
Contributor

Choose a reason for hiding this comment

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

?

Copy link
Member Author

Choose a reason for hiding this comment

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

Trying to distinguish between comments that describe the following section of code vs. comments that describe the following line. Suggestions?

PLUGINS = "${JDK_SPECIFIC_PLUGINS}"
//
// run SpotBugs only once, and run it on JDK8.
PLUGINS = "${JDK_SPECIFIC_PLUGINS},spotbugs"
Copy link
Contributor

Choose a reason for hiding this comment

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

It used to be -findbugs with hyphen. No need of it when doing spotbugs?

Copy link
Member Author

Choose a reason for hiding this comment

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

-fingbugs explicitly disabled findbugs. I'm trying to explicitly enable spotbugs. The two appear to be driven by the same yetus "check", so I'm attempting to ensure that module is enabled. Because we don't ship findbugs binaries in our Dockerfile anymore, I think that "check" will do the right thing, as long as it's enabled (see earlier comments re: that check also requiring the maven check as a dependency).

Copy link
Contributor

Choose a reason for hiding this comment

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

The -fingbugs is from the release note of yetus, as the official way to enable spotbugs.

https://issues.apache.org/jira/browse/YETUS-749

Of course I haven't checked the code of yetus so maybe specify spotbugs also works.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 24s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 shelldocs 0m 0s Shelldocs was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
_ Patch Compile Tests _
+1 💚 shellcheck 0m 0s There were no new shellcheck issues.
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 xml 0m 1s The patch has no ill-formed XML file.
+1 💚 hadoopcheck 12m 22s Patch does not cause any errors with Hadoop 2.10.0 or 3.1.2.
_ Other Tests _
+1 💚 asflicense 0m 17s The patch does not generate ASF License warnings.
20m 11s
Subsystem Report/Notes
Docker Client=19.03.8 Server=19.03.8 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/3/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #1364
Optional Tests dupname asflicense shellcheck shelldocs hadoopcheck xml
uname Linux df98c0aeaf53 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 50c8f49
Max. process+thread count 63 (vs. ulimit of 10000)
modules C: . U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/3/console
versions git=2.17.1 maven=2018-06-17T18:33:14Z) shellcheck=0.4.6
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 37s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚 mvninstall 5m 57s master passed
+1 💚 compile 3m 16s master passed
+1 💚 shadedjars 5m 3s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 2m 49s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 5m 31s the patch passed
+1 💚 compile 3m 11s the patch passed
+1 💚 javac 3m 11s the patch passed
+1 💚 shadedjars 5m 6s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 2m 46s the patch passed
_ Other Tests _
-1 ❌ unit 9m 36s root in the patch failed.
45m 23s
Subsystem Report/Notes
Docker Client=19.03.8 Server=19.03.8 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/3/artifact/yetus-jdk8-hadoop2-check/output/Dockerfile
GITHUB PR #1364
Optional Tests javac javadoc unit shadedjars compile
uname Linux 9a155449dfc1 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 / 50c8f49
Default Java 1.8.0_232
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/3/artifact/yetus-jdk8-hadoop2-check/output/patch-unit-root.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/3/testReport/
Max. process+thread count 1094 (vs. ulimit of 10000)
modules C: . U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/3/console
versions git=2.17.1 maven=2018-06-17T18:33:14Z)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

Copy link
Contributor

@bharathv bharathv left a comment

Choose a reason for hiding this comment

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

Something looks off here. Is it just me or has the spotbugs disappeared from the build report?

The way I read https://issues.apache.org/jira/browse/YETUS-749 is --> -findbugs with SPOTBUGS_HOME set enables spotbugs. no? I thought this is what HBASE-23077 did. After HBASE-23077 I do see spot bugs warnings in the github PRs, is there something additional that we are trying to generate?

@ndimiduk
Copy link
Member Author

Is it just me or has the spotbugs disappeared from the build report?

That's what I'm trying to enable here. I think the functionality was dropped in HBASE-23077 or HBASE-23767.

The way I read https://issues.apache.org/jira/browse/YETUS-749 ...

Ah thanks, I hadn't read the Yetus side of the feature change. I believe that when SPOTBUGS_HOME is defined, as we do in our Dockerfile, -findbugs is not necessary since t that's the default mode.

I'm currently thinking there's a plugin dependency for spotbugs that I'm missing because of the explicit omission of all in the JDK-specific plugin lists. But I cannot find it. On this PR, for JDK8, I specify --plugins=compile,github,htmlout,javac,javadoc,maven,mvninstall,shadedjars,unit,spotbugs. When I run yetus locally using an even reduced list, --plugins=compile,javac,javadoc,mav en,mvninstall,spotbugs, I get the SpotBugs check as expected.

@ndimiduk
Copy link
Member Author

Oh, unless spotbugs only runs when a java file is modified...

function spotbugs_filefilter
{
  declare filename=$1

  if [[ ${BUILDTOOL} == maven
    || ${BUILDTOOL} == ant ]]; then
    if [[ ${filename} =~ \.java$
      || ${filename} =~ (^|/)${SPOTBUGS_MODE}-exclude.xml$ ]]; then
      add_test "${SPOTBUGS_MODE}"
    fi
  fi
}

@ndimiduk ndimiduk force-pushed the 24065-enable-spotbugs-precommit branch from 46000cc to 5e33ccf Compare March 26, 2020 23:28
@ndimiduk
Copy link
Member Author

that worked!

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 23s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 shelldocs 0m 0s Shelldocs was not available.
+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 _
+1 💚 mvninstall 5m 50s master passed
+1 💚 checkstyle 1m 17s master passed
+0 🆗 spotbugs 2m 16s Both FindBugs and SpotBugs are enabled, using SpotBugs.
+1 💚 spotbugs 2m 13s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 5m 52s the patch passed
+1 💚 checkstyle 1m 16s the patch passed
+1 💚 shellcheck 0m 0s There were no new shellcheck issues.
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 hadoopcheck 11m 55s Patch does not cause any errors with Hadoop 2.10.0 or 3.1.2.
+1 💚 spotbugs 2m 20s the patch passed
_ Other Tests _
+1 💚 asflicense 0m 11s The patch does not generate ASF License warnings.
38m 44s
Subsystem Report/Notes
Docker Client=19.03.8 Server=19.03.8 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/4/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #1364
Optional Tests dupname asflicense shellcheck shelldocs spotbugs findbugs hadoopcheck hbaseanti checkstyle
uname Linux 36dabb358b26 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 78eecd3
Max. process+thread count 83 (vs. ulimit of 10000)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/4/console
versions git=2.17.1 maven=2018-06-17T18:33:14Z) shellcheck=0.4.6 spotbugs=3.1.12
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

Copy link
Contributor

@bharathv bharathv left a comment

Choose a reason for hiding this comment

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

Perfect..nice catch.

Copy link
Contributor

@Apache9 Apache9 left a comment

Choose a reason for hiding this comment

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

To be honest I do not get the point here, what's the problem for the current pre commit spotbugs? It is run in the general check section, you want to move it to the jdk8 specific section? why?

PLUGINS = "${JDK_SPECIFIC_PLUGINS}"
//
// run SpotBugs only once, and run it on JDK8.
PLUGINS = "${JDK_SPECIFIC_PLUGINS},spotbugs"
Copy link
Contributor

Choose a reason for hiding this comment

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

The -fingbugs is from the release note of yetus, as the official way to enable spotbugs.

https://issues.apache.org/jira/browse/YETUS-749

Of course I haven't checked the code of yetus so maybe specify spotbugs also works.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 33s Docker mode activated.
-0 ⚠️ yetus 0m 2s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚 mvninstall 6m 45s master passed
+1 💚 compile 1m 10s master passed
+1 💚 shadedjars 6m 1s branch has no errors when building our shaded downstream artifacts.
-0 ⚠️ javadoc 0m 39s hbase-server in master failed.
_ Patch Compile Tests _
+1 💚 mvninstall 6m 28s the patch passed
+1 💚 compile 1m 13s the patch passed
+1 💚 javac 1m 13s the patch passed
+1 💚 shadedjars 6m 5s patch has no errors when building our shaded downstream artifacts.
-0 ⚠️ javadoc 0m 44s hbase-server in the patch failed.
_ Other Tests _
-0 ⚠️ unit 112m 38s hbase-server in the patch failed.
144m 24s
Subsystem Report/Notes
Docker Client=19.03.8 Server=19.03.8 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/4/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #1364
Optional Tests javac javadoc unit shadedjars compile
uname Linux 9e14f38b21ea 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 / 78eecd3
Default Java 2020-01-14
javadoc https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/4/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-server.txt
javadoc https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/4/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-server.txt
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/4/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/4/testReport/
Max. process+thread count 5529 (vs. ulimit of 10000)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/4/console
versions git=2.17.1 maven=2018-06-17T18:33:14Z)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 33s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚 mvninstall 5m 24s master passed
+1 💚 compile 0m 59s master passed
+1 💚 shadedjars 5m 3s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 36s master passed
+1 💚 spotbugs 2m 36s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 5m 26s the patch passed
+1 💚 compile 0m 58s the patch passed
+1 💚 javac 0m 58s the patch passed
+1 💚 shadedjars 5m 2s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 41s the patch passed
+1 💚 spotbugs 2m 44s the patch passed
_ Other Tests _
-1 ❌ unit 113m 32s hbase-server in the patch failed.
146m 1s
Subsystem Report/Notes
Docker Client=19.03.8 Server=19.03.8 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/4/artifact/yetus-jdk8-hadoop2-check/output/Dockerfile
GITHUB PR #1364
Optional Tests javac javadoc unit spotbugs shadedjars compile
uname Linux 0fb3d5e9e882 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 / 78eecd3
Default Java 1.8.0_232
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/4/artifact/yetus-jdk8-hadoop2-check/output/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/4/testReport/
Max. process+thread count 5200 (vs. ulimit of 10000)
modules C: hbase-server U: hbase-server
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1364/4/console
versions git=2.17.1 maven=2018-06-17T18:33:14Z) spotbugs=3.1.12
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

Copy link
Contributor

@bharathv bharathv left a comment

Choose a reason for hiding this comment

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

what's the problem for the current pre commit spotbugs? It is run in the general check section, you want to move it to the jdk8 specific section? why?

@Apache9 My last question was exactly this.

The way I read https://issues.apache.org/jira/browse/YETUS-749 is --> -findbugs with SPOTBUGS_HOME set enables spotbugs. no? I thought this is what HBASE-23077 did. After HBASE-23077 I do see spot bugs warnings in the github PRs, is there something additional that we are trying to generate?

I think the patch refactors to use a more sensible query option "spotbugs" rather than un-intuitive -findbugs, but I see your point that it can be run as a part of general checks itself . @ndimiduk can probably can answer that part.

@ndimiduk
Copy link
Member Author

You're correct @Apache9 ; and I apparently didn't get @bharathv 's question the first time around -- I was under the mistaken impression that SpotBugs wasn't being run. I guess the take-away here is that -findbugs is not required.

Pardon me fellas.

@ndimiduk ndimiduk closed this Mar 27, 2020
@ndimiduk ndimiduk deleted the 24065-enable-spotbugs-precommit branch March 27, 2020 16:37
@bharathv
Copy link
Contributor

Should we do the cosmetic change of -findbugs -> spotbugs? '-findbugs' is misleading for the readers if they don't know '-' actually disables the configs :-)

@ndimiduk
Copy link
Member Author

I think the -findbugs actually lets Yetus not print a warning about "SpotBugs and FindBugs requested, using SpotBugs," which I think isn't a big deal. A comment about the -findbugs with a reference off to YETUS-749 would be helpful to future readers though.

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