My plugin just zips some files and pushes them to a HTTP server so I'm using: ZeroTurnaround Zip library - https://mvnrepository.com/artifact/org.zeroturnaround/zt-zip and Apache HTTP Client - https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient
I sit possible maybe one of these libraries? Throw some kind of exception when Jenkins tries to interrupt the job when I click cancel and this bubbles up to crash the job thread somehow? I tried a test with just a bunch of Thread.sleep() before it gets to my code (that zips the files and HTTP puts them) and if I cancel the job there it gets aborted nicely and is handled properly by Jenkins. So it looks that this issue appears when job is being canceled while in the process op zipping the files or making those HTTP calls. Another interesting thing is that even if on Jenkins side things crashed (nothing appears on the build log anymore - as I print things step by step as they are happening) the files are still being pushed to the server. (i.e. If I have 10 zip files and I cancel the job while the 3rd file is being pushed, on Jenkins things have crashed - nothing appears anymore on build log - but on the server I still see the rest of the files from 4 to 10 being pushed and the job is actually marked as failed after everything is finished. At this moment I see the build in Jenkins web interface, but if I restart it it disappears from the log - I guess due to that "at hudson.XmlFile.write(XmlFile.java:189)" as it never gets saved to the disk). On Tuesday, March 20, 2018 at 11:27:48 PM UTC+2, Jesse Glick wrote: > > Offhand that sounds like a core bug. If you were just unlucky enough > to cancel at the exact moment `Run.save` was being called, then that > is a robustness fix. Possibly some other exception was thrown which > failed to clear the thread interruption flag. Would need a > self-contained reproducible test case to analyze—if you have one, file > a bug report. > -- 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/633c8912-4d0b-457f-b820-021dfe4b0109%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
