|
||||||||
|
This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira |
||||||||
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Specifically: if a slave is connected and a FilePath is created on it, but then the slave is later disconnected and reconnected and someone calls toComputer on that cached path, you will get a null return value, because the old Channel is not the same as the new Channel (it is a live connection, like a java.net.Socket etc.). By comparison, FilePathPickle records the slave name permanently in channelNames even after a disconnection, so we can always figure out which slave a FilePath came from, no matter what happened to the connection subsequently.
In the existing uses from Workflow, we actually do not care if the slave is disconnected now (we just want to know the node name), so FilePath.toComputer would not actually be useful at all: there is no Computer once a slave is disconnected and all its executors stop. Thus we would really want to have a more primitive method that returns a String for the node name (null if unknown for some reason, for example because the FilePath was created using some other exotic VirtualChannel); and toComputer would call that method and just look for a computer with that name.