提交 c8ccee16 编写于 作者: K Kohsuke Kawaguchi

Don't interrupt executors if it's already in a post-processing stage.

上级 66b24f29
......@@ -55,7 +55,8 @@ Upcoming changes</a>
<!-- Record your changes in the trunk here. -->
<div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
<ul class=image>
<li class=>
<li class=bug>
Fixed a bug where long post-production processing in matrix jobs can cause incorrect abortion.
</ul>
</div><!--=TRUNK-END=-->
......
......@@ -314,7 +314,7 @@ public class MatrixBuild extends AbstractBuild<MatrixProject,MatrixBuild> {
if(q.cancel(c))
logger.println(Messages.MatrixBuild_Cancelled(HyperlinkNote.encodeTo('/'+ c.getUrl(),c.getDisplayName())));
MatrixRun b = c.getBuildByNumber(n);
if(b!=null) {
if(b!=null && b.isBuilding()) {// executor can spend some time in post production state, so only cancel in-progress builds.
Executor exe = b.getExecutor();
if(exe!=null) {
logger.println(Messages.MatrixBuild_Interrupting(HyperlinkNote.encodeTo('/'+ b.getUrl(),b.getDisplayName())));
......
......@@ -1438,7 +1438,7 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run
duration = Math.max(end - start, 0); // @see HUDSON-5844
// advance the state.
// the significance of doing this is that Hudson
// the significance of doing this is that Jenkins
// will now see this build as completed.
// things like triggering other builds requires this as pre-condition.
// see issue #980.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册