mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-10-28 12:05:19 +00:00
[JENKINS-27035] Gathering command read/write events (#3071)
* Slave.JnlpJar.getURL did not work in some modes when core had a snapshot dependency on Remoting. * Starting to implement Channel.Listener.read/write. * Now obtaining response timing statistics. * For now, avoiding timestamped snapshots, as it caused problems for #3120 which I have asked for help from @stephenc diagnosing. * Simplified logging a bit. * onResponse * hudson.FilePath$Mkdirs is a lot more readable than hudson.FilePath$13. * Specific snapshot. * onJar * LoggingChannelListener * remoting.version=3.17 * Making a few test assertions more lenient to adapt to https://github.com/jenkinsci/remoting/pull/247.
This commit is contained in:
1 parent
01a65588f6
commit
f4b78921e8
6 files changed
+25
-16
No files matched your search
@@ -1167,19 +1167,22 @@ public final class FilePath implements Serializable {
|
||||
* Creates this directory.
|
||||
*/
|
||||
public void mkdirs() throws IOException, InterruptedException {
|
||||
if(!act(new SecureFileCallable<Boolean>() {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public Boolean invoke(File f, VirtualChannel channel) throws IOException, InterruptedException {
|
||||
if(mkdirs(f) || f.exists())
|
||||
return true; // OK
|
||||
if (!act(new Mkdirs())) {
|
||||
throw new IOException("Failed to mkdirs: " + remote);
|
||||
}
|
||||
}
|
||||
private class Mkdirs extends SecureFileCallable<Boolean> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Override
|
||||
public Boolean invoke(File f, VirtualChannel channel) throws IOException, InterruptedException {
|
||||
if(mkdirs(f) || f.exists())
|
||||
return true; // OK
|
||||
|
||||
// following Ant <mkdir> task to avoid possible race condition.
|
||||
Thread.sleep(10);
|
||||
// following Ant <mkdir> task to avoid possible race condition.
|
||||
Thread.sleep(10);
|
||||
|
||||
return mkdirs(f) || f.exists();
|
||||
}
|
||||
}))
|
||||
throw new IOException("Failed to mkdirs: "+remote);
|
||||
return mkdirs(f) || f.exists();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2828,6 +2831,11 @@ public final class FilePath implements Serializable {
|
||||
return classLoader;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return callable.toString();
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user