-
-
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
Simplifying JNLPLauncher
#8762
Simplifying JNLPLauncher
#8762
Conversation
// which is already defined and deprecated. Could retroactively let no-arg constructor use default for workDirSettings, | ||
// which would be a behavioral change only for callers of the Java constructor (unlikely). |
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.
Would only affect
- Java callers
- which use the no-arg ctor that had been deprecated for years
- which use the now-deprecated
-jnlpUrl
mode - which even care about the location of the work dir
@@ -38,28 +38,6 @@ THE SOFTWARE. | |||
<j:set var="copy_java_cmd_unix" value="java -jar agent.jar -url ${jenkinsURL} ${it.launcher.getRemotingOptionsUnix(it)}${it.launcher.getWorkDirOptions(it)}" /> | |||
<j:set var="copy_java_cmd_windows" value="java -jar agent.jar -url ${jenkinsURL} ${it.launcher.getRemotingOptionsWindows(it)}${it.launcher.getWorkDirOptions(it)}" /> | |||
<j:if test="${h.hasPermission(it, it.CONNECT)}"> | |||
<j:choose> | |||
<j:when test="${it.ACL.hasPermission(app.ANONYMOUS, it.CONNECT)}"> |
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 clause tried to omit the -secret
when Jenkins is run without security, which did not actually work (perhaps as of jenkinsci/remoting#677, or perhaps due to changes in #8639). I do not see any compelling reason not to just always offer -secret
.
powerShell.cli.curl=Note: PowerShell users must use curl.exe instead of curl because curl is a default PowerShell cmdlet alias for Invoke-WebRequest. | ||
commonOptions=\ | ||
The most commonly used option is <code>-webSocket</code>. \ |
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 doubt -tunnel
and the various workdir-related options are relevant to enough people to be worth enumerating 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.
Very nice!
<p> | ||
${%instance-identity-missing} | ||
<l:isAdmin><a href="${rootURL}/manage/pluginManager/available">${%install-instance-identity}</a>.</l:isAdmin> | ||
</p> |
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.
@@ -245,8 +245,7 @@ public ComputerLauncher getLauncher() { | |||
LOGGER.log(Level.WARNING, "could not update historical agentCommand setting to CommandLauncher", x); | |||
} | |||
} | |||
// Default launcher does not use Work Directory |
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.
Should only affect loading of ancient node definitions from disk, or I guess someone defining nodes via XML produced from template who for some reason declined to specify a launcher.
return FormValidation.error(Messages.JNLPLauncher_WebsocketNotEnabled()); | ||
} | ||
if (Util.fixEmptyAndTrim(tunnel) != null) { | ||
return FormValidation.error(Messages.JNLPLauncher_TunnelingNotSupported()); |
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 and other improper combinations now handled by args4j in the launcher itself.
<l:isAdmin><a href="${rootURL}/manage/pluginManager/available">${%install-instance-identity}</a>.</l:isAdmin> | ||
</p> | ||
</j:if> | ||
<j:if test="${!it.launcher.descriptor.webSocketSupported}"> |
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.
(untested)
<p> | ||
${%tcp-port-disabled} | ||
<l:isAdmin><a href="${rootURL}/manage/configureSecurity/">${%configure.link.text}</a>.</l:isAdmin> | ||
</p> |
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.
Similar to older message, but not marked as an error since it may be perfectly normal in a WebSockets-only installation.
@@ -20,7 +20,6 @@ | |||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |||
# THE SOFTWARE. | |||
|
|||
slaveAgentPort.disabled=El puerto TCP para los agentes via JNLP está deshabilitado. |
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.
Renaming key and deleting old translations since there is now a significant extra clause about WebSockets.
OOME creating the WAR; probably unrelated? |
Very likely unrelated. I've seem OOM errors on Java 21 environments for plugin builds in the last 1-2 weeks but have not investigated further to see if there is a root reason for the failures. |
/label ready-for-merge This PR is now ready for merge. We will merge it after ~24 hours if there is no negative feedback. |
FYI, I am seeing consistent NullPointerExceptions when using the docker plugin in JNLP mode, starting with Jenkins 2.437 (The first version with these changes). See jenkinsci/docker-plugin#1047 for details. |
#8639 (comment) cleaning up from jenkinsci/remoting#677. The situation is more complicated than that in #6543 because the deprecated properties will still be used if you use the deprecated
-jnlpUrl
mode.Testing done
jenkinsci/configuration-as-code-plugin#2430 continues to pass against this change. Interactively:
Preferred config
Deprecated config
When reconfiguring an agent predating this change.
Launcher page
Proposed changelog entries
inbound
in JCasC), as these are only useful in conjunction with the deprecated-jnlpUrl
mode.Proposed upgrade guidelines
Reset all inbound launcher options to defaults, and follow new guidance for command-line options for
agent.jar
.Before the changes are marked as
ready-for-merge
:Maintainer checklist