-
-
Notifications
You must be signed in to change notification settings - Fork 274
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
Send Node-Name
HTTP header in JnlpAgentEndpointResolver
#685
Conversation
public JnlpAgentEndpointResolver(String... jenkinsUrls) { | ||
this.jenkinsUrls = new ArrayList<>(Arrays.asList(jenkinsUrls)); | ||
} | ||
|
||
public JnlpAgentEndpointResolver(@NonNull List<String> jenkinsUrls) { | ||
this(jenkinsUrls, null, null, null, null, false); | ||
} |
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.
These overloads appear unused, so I did not bother retaining compatibility for them.
src/main/java/org/jenkinsci/remoting/engine/JnlpAgentEndpointResolver.java
Outdated
Show resolved
Hide resolved
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.
Making it clear that I am blocking this PR until it does not increase the divergence between multiple copies of this code.
This PR does not actually increase the divergence between copies, since it adds an independent line of code after the common portions; if #687 is merged then I would resolve the merge conflict which would make that more apparent. |
I'm having a hard time following this point, so maybe you could clarify. Are you saying that even in the context of the more comprehensive refactoring done in #677 (which condenses all |
Yes, exactly. |
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.
OK, I could also see an argument for always passing the header for greater consistency among the client's requests. But I don't feel strongly either way. Approving this PR.
I do not feel strongly either way either. Will wait for #677 to be merged and resolve conflicts with that. |
remoting/src/main/java/org/jenkinsci/remoting/engine/JnlpConnectionState.java
Line 65 in b329c48
remoting/src/main/java/hudson/remoting/Engine.java
Line 555 in b329c48
remoting/src/main/java/hudson/remoting/Engine.java
Line 740 in b329c48
https://jenkins/tcpSlaveAgentListener/
to determine a host and port to connect to. Jenkins core will ignore the header; CloudBees CI can use it to adjust the TCP connection information according to the identity of the agent.