-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
[JENKINS-52282] Add isJavaWebStartSupported to JNLPLauncher #3766
[JENKINS-52282] Add isJavaWebStartSupported to JNLPLauncher #3766
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @MarkEWaite! Some minor patches are needed IMHO, but I think we can land it in the weekly release on Nov 26
${%Launch agent from browser} | ||
</p> | ||
</li> | ||
</j:if> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
else
add some warning to the WebUI? Otherwise we may end up with users who report the issue after reading the docs and failing to fond the button
${%Launch agent from browser} | ||
</p> | ||
</li> | ||
<j:if test="${it.launcher.javaWebStartSupported}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it's jelly, but could we incorporate a link to a resource (wiki, blog, etc) to say why the web starter is not available. So having a <j:choose>
rather than a <j:if>
so we can have an else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll need help from someone else to make those jelly changes. I'm not skilled with jelly and need to spend my weekends and nights working on the git plugin and git client plugin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's
<j:choose>
<j:when test="${it.launcher.javaWebStartSupported}">
[...]
</j:when>
<j:otherwise>
<div>There is no Web starter for the JVM version used to run Jenkins</div>
</j:otherwise>
</j:choose>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as https://github.com/jenkinsci/jenkins/pull/3766/files#r234416298 .
I believe we need to have a Wiki or jenkins.io page to list known Jenkins core incompatibilities.
There is https://jenkins.io/doc/administration/requirements/java/ , but probably it worth having a separate page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just add a redirect page on Jenkins.io? This way we can modify the final destination later?
Like https://jenkins.io/redirect/java-web-start ? Or a more general https://jenkins.io/redirect/java-11 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's do https://jenkins.io/redirect/java11-java-web-start
or so. It can be finally linking to the anchor on a page, but it can just link to the JIRA ticket for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, +1 on redirect and it can be changed to wiki page in the future. @MarkEWaite do you want me to test / commit the jelly code I provided?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alecharp that would be great.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the conditional text and redirect link as suggested.
* @since FIXME | ||
*/ | ||
public boolean isJavaWebStartSupported() { | ||
return System.getProperty("java.version", "1.8").startsWith("1.8"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was looking for https://docs.oracle.com/javase/10/docs/api/java/lang/Runtime.Version.html but it's only available since Java 9, sadly. So I guess this startWith
is really all we can do here..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I saw as well. I would have preferred a better check, but...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a hack we usually do. Probably we need to move these checks to a utility class
0351a49
to
867ccd5
Compare
${%Launch agent from browser} | ||
</p> | ||
</li> | ||
<j:if test="${it.launcher.javaWebStartSupported}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just add a redirect page on Jenkins.io? This way we can modify the final destination later?
Like https://jenkins.io/redirect/java-web-start ? Or a more general https://jenkins.io/redirect/java-11 ?
Seems cleaner to use JNLPLauncher than to use Functions. Narrows the scope of the method so that callers know it is specific to JNLPLauncher.
867ccd5
to
f33e5f8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better UI would be nice, but IMO it can be merged once the redirect link is actually created
Oracle announced in March 2018 that it will not include Java Web Start in Java SE 11. Jenkins provides a "Java Web Start" button to simplify launching of clients with Java Web Start. That simplified start technique is often used for Windows agents. Jenkins on Java 11 can't use that button because the underlying Java implementation does not support it. The communication protocol used by agent.jar continues to be fully supported and operational with Java 11. Only the Java Web Start button from the web page is not supported in Java 11. See [JENKINS-52282] and jenkinsci/jenkins#3766 for more details.
See the jenkins.io pull request for the proposed redirect to Wikipedia. The Wikipedia destination was chosen because it states the deprecation very simply and includes a link to the authoritative PDF file. When we add documentation on agents to jenkins.io, we can include Java Web Start and its deprecation in that section. Alternately, it could be placed in a jenkins.io section dedicated to Java 11. |
Upstream redirect was integrated, merging |
* This flag is checked in {@code config.jelly} before displaying the | ||
* Java Web Start button. | ||
* @return {@code true} if Java Web Start button should be displayed. | ||
* @since FIXME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to @since
something that's @Restricted
See JENKINS-52282, Java 9 and later do not support Java Web Start.
No automated test because I don't have time to write a test for the existence of a button in the user interface.
Proposed changelog entries
Submitter checklist
* Use the
Internal:
prefix if the change has no user-visible impact (API, test frameworks, etc.)Desired reviewers
@jenkinsci/java11-support