/**
* Executes some program on the machine that this {@link FilePath} exists,
* so that one can perform local file operations.
*/
public <T> T act(final FileCallable<T> callable) throws IOException, InterruptedException {
return act(callable, callable.getClass().getClassLoader());
}
private <T> T act(final FileCallable<T> callable, ClassLoader cl) throws IOException, InterruptedException {
if (channel != null) {
// run this on a remote system
try {
DelegatingCallable<T, IOException> wrapper = new FileCallableWrapper<>(callable, cl, this);
for (FileCallableWrapperFactory factory : ExtensionList.lookup(FileCallableWrapperFactory.class)) {
wrapper = factory.wrap(wrapper);
}
return channel.call(wrapper);
} catch (TunneledInterruptedException e) {
throw (InterruptedException) new InterruptedException(e.getMessage()).initCause(e);
}
} else {
// the file is on the local machine.
return callable.invoke(new File(remote), localChannel);
}
}
What feature do you want to see added?
Propage trace context in the calls sent in the Grafana Agent
Upstream changes
No response
Are you interested in contributing this feature?
No response
Notes
https://github.com/jenkinsci/junit-plugin/blob/85201a38881e5811c8632b610d8d655f161db103/src/main/java/hudson/tasks/junit/JUnitParser.java#L122-L134
https://github.com/jenkinsci/jenkins/blob/0d5232fca40a12b2d14f7ded577a90f0cb3c6f06/core/src/main/java/hudson/FilePath.java