[JIRA] (JENKINS-59656) executors widget makes it easy to interrupt the wrong build

14 views
Skip to first unread message

tom.gl@free.fr (JIRA)

unread,
Oct 4, 2019, 9:07:02 AM10/4/19
to jenkinsc...@googlegroups.com
Thomas de Grenier de Latour created an issue
 
Jenkins / Bug JENKINS-59656
executors widget makes it easy to interrupt the wrong build
Issue Type: Bug Bug
Assignee: Unassigned
Components: core
Created: 2019-10-04 13:06
Environment: found in Jenkins 2.176.3,
reproduced in Jenkins 2.198
Priority: Minor Minor
Reporter: Thomas de Grenier de Latour

In Jenkins classical UI, users can interrupt builds using the stop button (little red cross) attached to each busy executor. Clicking this button displays a confirmation dialog (with the full display name of the build about to be interrupted, which is good). Then, on confirmation, a stop request is POSTed to the executor URL, which is something like this:
/jenkins/computer/SOME_NAME/executors/NUMBER/stop
or that:
/jenkins/computer/(master)/oneOffExecutors/NUMBER/stop
(and I guess it's not the only options, but you get the idea: the target is an executor, not a specific running task)

Between the initial click on the cancel button and the stop request actually reaching the server, many things can happen (especially if the user hesitated on the confirmation dialog). The target executor identified by its name+number can now be executing something completely different from the build that the user was intending to interrupt.

This is not a theoretical issue: I've came across this yesterday while doing the post-mortem analysis of an unintentionally interrupted deployment Pipeline

I will submit a WIP PR with a proposed change to avoid this issue...

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

tom.gl@free.fr (JIRA)

unread,
Oct 4, 2019, 9:27:02 AM10/4/19
to jenkinsc...@googlegroups.com

tom.gl@free.fr (JIRA)

unread,
Oct 4, 2019, 9:53:02 AM10/4/19
to jenkinsc...@googlegroups.com
Thomas de Grenier de Latour commented on Bug JENKINS-59656
 
Re: executors widget makes it easy to interrupt the wrong build

Steps to reproduce when running with only the Jenkins war (as in jenkins-dev:run):

  • create a test freestyle job with a "sleep 10" shell step
  • go back to Jenkins main page, and launch the job twice; default job config will make it run one build at a time
  • as soon as build #1 appears running in the executors view, click the stop button; you get the dialog to confirm interruption of build #1
  • count to 10 slowly, and click OK
  • check that build #1 is in success, and it's build #2 which got interrupted

That's basically how I've tested my proposed changes so far...

tom.gl@free.fr (JIRA)

unread,
Nov 8, 2019, 4:35:02 AM11/8/19
to jenkinsc...@googlegroups.com

I will submit a WIP PR with a proposed change to avoid this issue...

The PR is not WIP anymore, just needs more review.

tom.gl@free.fr (JIRA)

unread,
Dec 11, 2019, 2:59:03 AM12/11/19
to jenkinsc...@googlegroups.com
Thomas de Grenier de Latour updated Bug JENKINS-59656
 

Fixed via PR #4264, should be released in 2.209.

Change By:
Status: Open Fixed but Unreleased
Resolution: Fixed

tom.gl@free.fr (JIRA)

unread,
Feb 18, 2020, 5:18:02 PM2/18/20
to jenkinsc...@googlegroups.com

tom.gl@free.fr (JIRA)

unread,
Feb 18, 2020, 5:19:02 PM2/18/20
to jenkinsc...@googlegroups.com
 

Fixed some time ago, closing.

Status: Fixed but Unreleased Resolved
Released As: 2.209

tom.gl@free.fr (JIRA)

unread,
Feb 18, 2020, 5:20:02 PM2/18/20
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages