Hi,

I'm wrting a plugin that implements a SimpleBuildStep and I have a strange 
behaivour that I don't understand.
If I start the build and then click the cancel button while it's in 
progress I get a java.nio.channels.ClosedByInterruptException and the job 
fails with error instead of with the normal job interupted status.

He're the full stack trace:

java.nio.channels.ClosedByInterruptException
        at 
java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:202)
        at sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:216)
        at hudson.util.FileChannelWriter.write(FileChannelWriter.java:72)
        at java.io.Writer.write(Writer.java:192)
        at hudson.util.AtomicFileWriter.write(AtomicFileWriter.java:162)
        at java.io.Writer.write(Writer.java:157)
        at hudson.XmlFile.write(XmlFile.java:189)
        at hudson.model.Run.save(Run.java:1923)
        at hudson.model.Run.execute(Run.java:1784)


My plugin is a Builder plugin that implements SimpleBuildStep and I run my 
code (which zips some files from the workspace and uploads them to a 
server) in a 
"private static class DeployCallable extends 
MasterToSlaveFileCallable<Void>" instance that is called using 
"workspace.act(new DeployCallable(...".

The strange thing is that if I restar Jenkins then the build that I 
canceled also dissapears from the build history for this job.


Any idea what would cause this issue? And idea what can I do to fix it?

Also am I using the right class/method (workspace.act and 
MasterToSlaveFileCallable) to make my plugin compatible with master/slave 
setups?


The code for the plugin is here if it 
helps: 
https://github.com/jenkinsci/osf-builder-suite-for-sfcc-deploy-plugin/blob/master/src/main/java/org/jenkinsci/plugins/osfbuildersuiteforsfcc/deploy/DeployBuilder.java#L265

Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/5786267e-1c2a-430c-a6c6-880cd65f54e7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to