Skip to content

KAFKA-12782: Fix Javadocs generation by upgrading JDK#10780

Merged
ijuma merged 2 commits intoapache:trunkfrom
jlprat:KAFKA-12782-fix-javadocs-generation-by-upgrading-jdk
May 28, 2021
Merged

KAFKA-12782: Fix Javadocs generation by upgrading JDK#10780
ijuma merged 2 commits intoapache:trunkfrom
jlprat:KAFKA-12782-fix-javadocs-generation-by-upgrading-jdk

Conversation

@jlprat
Copy link
Contributor

@jlprat jlprat commented May 27, 2021

This, upgrades JDK to version 15 for the docs generation, this way we
can circumvent bug https://bugs.openjdk.java.net/browse/JDK-8215291
present in JDK11

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

This, upgrades JDK to version 15 for the docs generation, this way we
can circumvent bug https://bugs.openjdk.java.net/browse/JDK-8215291
present in JDK11
cmd("Building artifacts", "./gradlew clean && ./gradlewAll releaseTarGz", cwd=kafka_dir, env=jdk8_env, shell=True)
cmd("Copying artifacts", "cp %s/core/build/distributions/* %s" % (kafka_dir, artifacts_dir), shell=True)
cmd("Building docs", "./gradlew clean aggregatedJavadoc", cwd=kafka_dir, env=jdk11_env)
cmd("Building docs", "./gradlew clean aggregatedJavadoc", cwd=kafka_dir, env=jdk15_env)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This one I'm not sure it's really needed as I never executed that part of the script.

gradle_version_override = docs_release_version(version)

cmd("Building docs", "./gradlew -Pversion=%s clean siteDocsTar aggregatedJavadoc" % gradle_version_override, cwd=REPO_HOME, env=jdk11_env)
cmd("Building docs", "./gradlew -Pversion=%s clean siteDocsTar aggregatedJavadoc" % gradle_version_override, cwd=REPO_HOME, env=jdk15_env)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This, together with change in line 259, are the changes needed

@jlprat
Copy link
Contributor Author

jlprat commented May 27, 2021

Hi, @ijuma ready for you to review

release.py Outdated
@@ -512,6 +512,7 @@ def command_release_announcement_email():

jdk8_env = get_jdk(prefs, 8)
jdk11_env = get_jdk(prefs, 11)
Copy link
Member

Choose a reason for hiding this comment

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

Can we remove this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Most probably, but I never executed that part of the script.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will push a commit without this line

Copy link
Member

Choose a reason for hiding this comment

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

Can you search the file for references to this? If there are none, please remove it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The only reference was at line 604, which I replaced for JDK15

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pushed

@jlprat
Copy link
Contributor Author

jlprat commented May 27, 2021

An easy way to test this locally, is to search a Kafka class that contains a Javadoc link to a Standard Java Class.
For example, searching for KafkaFuture and then clicking on Throwable. Both search click and Throwable click should work.

@jlprat jlprat requested a review from ijuma May 28, 2021 17:25
Copy link
Member

@ijuma ijuma left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@ijuma
Copy link
Member

ijuma commented May 28, 2021

We'll hopefully switch to JDK 16 before the 3.0 release.

@ijuma ijuma merged commit 588ea44 into apache:trunk May 28, 2021
@jlprat jlprat deleted the KAFKA-12782-fix-javadocs-generation-by-upgrading-jdk branch May 28, 2021 18:52
@jlprat
Copy link
Contributor Author

jlprat commented May 28, 2021

Thanks @ijuma for the review! The upgrade to JDK 16 is this one #10415 , right?

@ijuma
Copy link
Member

ijuma commented May 28, 2021

@jlprat See #10702 (comment) for additional things that need to be fixed.

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.

2 participants

Comments