Skip to content

TEZ-4387: use new doclet API in Java 9+ - #296

Merged
abstractdog merged 7 commits into
apache:masterfrom
abstractdog:TEZ-4387-abstractdog
Dec 30, 2024
Merged

TEZ-4387: use new doclet API in Java 9+#296
abstractdog merged 7 commits into
apache:masterfrom
abstractdog:TEZ-4387-abstractdog

Conversation

@abstractdog

@abstractdogabstractdog commented Jun 23, 2023

Copy link
Copy Markdown
Contributor

wThis PR ensures about JDK 8-17 compile-time compatibility with JDK dependent source folders in tez-javadoc-tools module:

cd tez-tools && mvn clean install -DskipTests

JDK 8-16:

export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
export JAVA_HOME=`/usr/libexec/java_home -v 11`

JDK 17:

export JAVA_HOME=`/usr/libexec/java_home -v 17`

original code was contributed by @LA-Toth (which utilized different modules), now I'm trying to hit the PR until all the precommits problems disappear

@tez-yetus

This comment was marked as outdated.

@ayushtkn

Copy link
Copy Markdown
Member

@abstractdog If we can get this in, we might be able to have compile time support for JDK-17

@abstractdog

abstractdog commented Dec 23, 2024

Copy link
Copy Markdown
ContributorAuthor

@abstractdog If we can get this in, we might be able to have compile time support for JDK-17

yeah, let me take a look
after resolving conflicts, I'll have to check compilation failures in precommit (most probably related to the fact that this patch introduced different profiles for different JDK versions

pushed again to get a new precommit result (old one is not available)

@abstractdog
abstractdogforce-pushed the TEZ-4387-abstractdog branch 3 times, most recently from 46ac3dc to b2f0b8dCompareDecember 23, 2024 11:14
@abstractdog

Copy link
Copy Markdown
ContributorAuthor

JDK17 compilation passed successfully locally, added a JDK17 build step to github actions

@tez-yetus

This comment was marked as outdated.

@tez-yetus

This comment was marked as outdated.

@tez-yetus

This comment was marked as outdated.

@tez-yetus

This comment was marked as outdated.

@abstractdog
abstractdogforce-pushed the TEZ-4387-abstractdog branch 2 times, most recently from e8d405e to 253913aCompareDecember 24, 2024 12:31
@tez-yetus

This comment was marked as outdated.

@abstractdog

abstractdog commented Dec 24, 2024

Copy link
Copy Markdown
ContributorAuthor

the current issue is that some modules are JDK17+ compatible, and are successfully skipped when you build the whole project, but the precommit enters into the folder of the changed submodule and builds it, hence the sub-module skipping won't work
precommit needs to be prepared for this scenario (or some additional maven hack is needed into the submodule's pom.xml)

https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-296/9/artifact/out/patch-mvninstall-tez-tools_tez-javadoc-tools-base.txt

cd /home/jenkins/jenkins-home/workspace/tez-multibranch_PR-296/src/tez-tools/tez-javadoc-tools-base
mvn --batch-mode -Dmaven.repo.local=/home/jenkins/jenkins-home/workspace/tez-multibranch_PR-296/yetus-m2/tez-master-patch-1 -fae clean install -DskipTests=true -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Dfindbugs.skip=true -Dspotbugs.skip=true

@tez-yetus

This comment was marked as outdated.

@tez-yetus

This comment was marked as outdated.

@tez-yetus

This comment was marked as outdated.

@tez-yetus

This comment was marked as outdated.

@abstractdog

abstractdog commented Dec 25, 2024

Copy link
Copy Markdown
ContributorAuthor

latest patch is okay from precommit point of view, I need to check what's happening on JDK17 in terms of javadoc generation:

mvn clean install javadoc:aggregate -DskipTests -pl tez-api -pl tez-mapreduce -pl tez-runtime-library
mvn site -f tez-api

the latter command throws:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.7.1:site (default-site) on project tez-api: Error generating maven-javadoc-plugin:3.0.1:aggregate report:
[ERROR] Exit code: 1 - error: Class org.apache.hadoop.classification.tools.IncludePublicAnnotationsStandardDoclet is not a valid doclet.
[ERROR] Note: As of JDK 13, the com.sun.javadoc API is no longer supported.
[ERROR]
[ERROR] Command line was: /Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/bin/javadoc @options @packages
[ERROR]
[ERROR] Refer to the generated Javadoc files in '/Users/laszlobodor/apache/tez/tez-api/target/site/apidocs' dir.

as the doc generation works on JDK8, maybe we can postpone the solution as a followup ticket, but I'm trying to handle it now hoping that it's an easy one

@tez-yetus

This comment was marked as outdated.

@ayushtknayushtkn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

one checkstyle warning, rest looks good in the build.
@abstractdog as of now we are just compiling, how do we know if the tests would be fine with higher JDK versions?

@abstractdog

Copy link
Copy Markdown
ContributorAuthor

thanks @ayushtkn for the comments, I'll address them

currently I'm testing a different approach which doesn't involve separate modules, only separate folders in the original tez-javadoc-tools module, which looks a bit more lightweight

@tez-yetus

This comment was marked as outdated.

@abstractdog

abstractdog commented Dec 26, 2024

Copy link
Copy Markdown
ContributorAuthor

compile time compatibility of tez-javadoc-tools is done
created TEZ-4597 as a follow-up to take care of full javadoc generation on JDK17, in the meantime, it works flawlessly on JDK8

@tez-yetus

This comment was marked as outdated.

@abstractdog

Copy link
Copy Markdown
ContributorAuthor

latest precommit is clean (besides the already known TestAnalyzer failure)
@ayushtkn

@tez-yetus

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 15sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-1 ❌test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+0 🆗mvndep3m 51sMaven dependency ordering for branch
+1 💚mvninstall12m 12smaster passed
+1 💚compile2m 42smaster passed with JDK Ubuntu-11.0.25+9-post-Ubuntu-1ubuntu122.04
+1 💚compile2m 28smaster passed with JDK Private Build-1.8.0_432-8u432-gaus1-0ubuntu222.04-ga
+1 💚checkstyle1m 42smaster passed
+1 💚javadoc1m 49smaster passed with JDK Ubuntu-11.0.25+9-post-Ubuntu-1ubuntu122.04
+1 💚javadoc1m 32smaster passed with JDK Private Build-1.8.0_432-8u432-gaus1-0ubuntu222.04-ga
+0 🆗spotbugs5m 51sUsed deprecated FindBugs config; considering switching to SpotBugs.
+1 💚findbugs6m 51smaster passed
-0 ⚠️patch6m 4sUsed diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
+0 🆗mvndep0m 15sMaven dependency ordering for patch
+1 💚mvninstall4m 23sthe patch passed
+1 💚compile2m 39sthe patch passed with JDK Ubuntu-11.0.25+9-post-Ubuntu-1ubuntu122.04
+1 💚javac2m 39sthe patch passed
+1 💚compile2m 34sthe patch passed with JDK Private Build-1.8.0_432-8u432-gaus1-0ubuntu222.04-ga
+1 💚javac2m 34sthe patch passed
+1 💚checkstyle0m 21stez-tools/tez-javadoc-tools: The patch generated 0 new + 0 unchanged - 23 fixed = 0 total (was 23)
+1 💚checkstyle0m 52sroot: The patch generated 0 new + 0 unchanged - 23 fixed = 0 total (was 23)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚xml0m 4sThe patch has no ill-formed XML file.
+1 💚javadoc1m 35sthe patch passed with JDK Ubuntu-11.0.25+9-post-Ubuntu-1ubuntu122.04
+1 💚javadoc1m 32sthe patch passed with JDK Private Build-1.8.0_432-8u432-gaus1-0ubuntu222.04-ga
+1 💚findbugs6m 34sthe patch passed
_ Other Tests _
+1 💚unit0m 26stez-javadoc-tools in the patch passed.
-1 ❌unit78m 17sroot in the patch failed.
+1 💚asflicense1m 6sThe patch does not generate ASF License warnings.
136m 39s
ReasonTests
Failed junit teststez.analyzer.TestAnalyzer
SubsystemReport/Notes
DockerClientAPI=1.47 ServerAPI=1.47 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-296/17/artifact/out/Dockerfile
GITHUB PR#296
JIRA IssueTEZ-4387
Optional Testsdupname asflicense javac javadoc unit xml compile spotbugs findbugs checkstyle
unameLinux 438c1a349e78 5.15.0-124-generic #134-Ubuntu SMP Fri Sep 27 20:20:17 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitypersonality/tez.sh
git revisionmaster / c77d37e
Default JavaPrivate Build-1.8.0_432-8u432-gaus1-0ubuntu222.04-ga
Multi-JDK versions/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.25+9-post-Ubuntu-1ubuntu122.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_432-8u432-gaus1-0ubuntu222.04-ga
unithttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-296/17/artifact/out/patch-unit-root.txt
Test Resultshttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-296/17/testReport/
Max. process+thread count1554 (vs. ulimit of 5500)
modulesC: tez-tools/tez-javadoc-tools . U: .
Console outputhttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-296/17/console
versionsgit=2.34.1 maven=3.6.3 findbugs=3.0.1
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@ayushtknayushtkn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanx @abstractdog for the changes, apart from the change in License stuff, changes LGTM

@abstractdog

Copy link
Copy Markdown
ContributorAuthor

Thanx @abstractdog for the changes, apart from the change in License stuff, changes LGTM

thanks! addressed them in the latest commit

@tez-yetus

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec21m 23sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-1 ❌test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+0 🆗mvndep4m 4sMaven dependency ordering for branch
+1 💚mvninstall12m 44smaster passed
+1 💚compile2m 39smaster passed with JDK Ubuntu-11.0.25+9-post-Ubuntu-1ubuntu122.04
+1 💚compile2m 27smaster passed with JDK Private Build-1.8.0_432-8u432-gaus1-0ubuntu222.04-ga
+1 💚checkstyle1m 41smaster passed
+1 💚javadoc1m 44smaster passed with JDK Ubuntu-11.0.25+9-post-Ubuntu-1ubuntu122.04
+1 💚javadoc1m 27smaster passed with JDK Private Build-1.8.0_432-8u432-gaus1-0ubuntu222.04-ga
+0 🆗spotbugs5m 48sUsed deprecated FindBugs config; considering switching to SpotBugs.
+1 💚findbugs6m 49smaster passed
-0 ⚠️patch6m 0sUsed diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
+0 🆗mvndep0m 14sMaven dependency ordering for patch
+1 💚mvninstall4m 23sthe patch passed
+1 💚compile2m 54sthe patch passed with JDK Ubuntu-11.0.25+9-post-Ubuntu-1ubuntu122.04
+1 💚javac2m 54sthe patch passed
+1 💚compile2m 38sthe patch passed with JDK Private Build-1.8.0_432-8u432-gaus1-0ubuntu222.04-ga
+1 💚javac2m 38sthe patch passed
+1 💚checkstyle0m 17stez-tools/tez-javadoc-tools: The patch generated 0 new + 0 unchanged - 23 fixed = 0 total (was 23)
+1 💚checkstyle0m 52sroot: The patch generated 0 new + 0 unchanged - 23 fixed = 0 total (was 23)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚xml0m 4sThe patch has no ill-formed XML file.
+1 💚javadoc1m 24sthe patch passed with JDK Ubuntu-11.0.25+9-post-Ubuntu-1ubuntu122.04
+1 💚javadoc1m 25sthe patch passed with JDK Private Build-1.8.0_432-8u432-gaus1-0ubuntu222.04-ga
+1 💚findbugs6m 25sthe patch passed
_ Other Tests _
+1 💚unit0m 24stez-javadoc-tools in the patch passed.
-1 ❌unit76m 14sroot in the patch failed.
+1 💚asflicense1m 3sThe patch does not generate ASF License warnings.
155m 54s
ReasonTests
Failed junit teststez.analyzer.TestAnalyzer
SubsystemReport/Notes
DockerClientAPI=1.47 ServerAPI=1.47 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-296/18/artifact/out/Dockerfile
GITHUB PR#296
JIRA IssueTEZ-4387
Optional Testsdupname asflicense javac javadoc unit xml compile spotbugs findbugs checkstyle
unameLinux ebb4f1b38fb1 5.15.0-124-generic #134-Ubuntu SMP Fri Sep 27 20:20:17 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitypersonality/tez.sh
git revisionmaster / c77d37e
Default JavaPrivate Build-1.8.0_432-8u432-gaus1-0ubuntu222.04-ga
Multi-JDK versions/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.25+9-post-Ubuntu-1ubuntu122.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_432-8u432-gaus1-0ubuntu222.04-ga
unithttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-296/18/artifact/out/patch-unit-root.txt
Test Resultshttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-296/18/testReport/
Max. process+thread count1593 (vs. ulimit of 5500)
modulesC: tez-tools/tez-javadoc-tools . U: .
Console outputhttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-296/18/console
versionsgit=2.34.1 maven=3.6.3 findbugs=3.0.1
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@abstractdog
abstractdog merged commit c7a3791 into apache:masterDec 30, 2024
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.

4 participants

@abstractdog@tez-yetus@ayushtkn@LA-Toth