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

Reference new tcp-agent-listener endpoint #457

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/java/hudson/remoting/Engine.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public Thread newThread(@Nonnull final Runnable r) {
*
* <p>
* This value is determined from {@link #candidateUrls} after a successful connection.
* Note that this URL <b>DOES NOT</b> have "tcpSlaveAgentListener" in it.
* Note that this URL <b>DOES NOT</b> have "tcp-agent-listener" in it.
*/
@CheckForNull
private URL hudsonUrl;
Expand Down Expand Up @@ -639,7 +639,7 @@ public void closeRead() throws IOException {
}
events.onDisconnect();
while (true) {
// Unlike JnlpAgentEndpointResolver, we do not use $jenkins/tcpSlaveAgentListener/, as that will be a 404 if the TCP port is disabled.
// Unlike JnlpAgentEndpointResolver, we do not use $jenkins/tcp-agent-listener/, as that will be a 404 if the TCP port is disabled.
URL ping = new URL(candidateUrls.get(0), "login");
try {
HttpURLConnection conn = (HttpURLConnection) ping.openConnection();
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/org/jenkinsci/remoting/RoleSensitive.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,7 @@ public interface RoleSensitive {
* receive {@link AbstractMethodError}, and treat that as if the invocation of
* {@code checker.check(this,Role.UNKNOWN)} has happened.
*/
// TODO Update Javadoc once https://github.com/jenkinsci/jenkins/pull/5494 is updated
// TODO Update Javadoc once developer documentation is migrated to jenkins.io/doc/developer
void checkRoles(RoleChecker checker) throws SecurityException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,8 @@ private boolean isPortVisible(String hostname, int port) {
@Nonnull
private URL toAgentListenerURL(@Nonnull String jenkinsUrl) throws MalformedURLException {
return jenkinsUrl.endsWith("/")
? new URL(jenkinsUrl + "tcpSlaveAgentListener/")
: new URL(jenkinsUrl + "/tcpSlaveAgentListener/");
? new URL(jenkinsUrl + "tcp-agent-listener/")
: new URL(jenkinsUrl + "/tcp-agent-listener/");
Comment on lines 379 to +381
Copy link
Member

Choose a reason for hiding this comment

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

Merge conflict with #454.

}

@Override
Expand Down