Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Build does not get cancelled at specific step #4290

prinkush ·

When I cancel the build manually or using BuildEngine.instance.cancelRequest(<buildId>);
the build is not cancelled even after multiple tries.
It only happens at a specific step which is using groovy script to execute multiple p4 comands:

test_list.each()
    {
         command = "p4 describe -Ss " + CL // sample command
         try {
		result = util.readOutput(command)
	} catch (Exception E) {
		logger.info("error : " + E)
		
	}
	...

    }

it just ignores the issued cancel signal. At the most , the build cancels one of the p4 command and all other steps are executed as normal.
1.Could you explain why this is happening?
2.Please help me how can I achieve cancelling the complete build in such scenario, if possible ? else any workarounds?
I am using QB8.0

  • solved #4
  • replies 3
  • views 1941
  • stars 0
robinshen ADMIN ·

Please test with latest QB version to see if it works. We've fixed a lot of bugs since QB8. Also make sure NOT to set execution condition of your steps as "always execute" which means to execute regardless of cancellation (sometimes this is necessary for some steps to do cleanup after cancellation).

prinkush ·

Thanks for the quick reply.
I am not using "Always execute" condition but "If all previous sibling steps are successful" and it is first step in the workflow.
I understand that I am not using latest QB version.
But at the same time, I was hoping to know why build is not cancelled once I hit stop. Since this kind of issue was already detected and fixed in QB5 here( https://support.pmease.com/PMEase/QuickBuild/topics/3011/stopped-build-still-running-steps-5-1-36-/2?1).
It would be really helpful to get more insight if its a known bug or is there any workaround to it.

Thanks :)

robinshen ADMIN ·

When a build is cancelled, QB will interrupt the thread of the step. If the step is executing an external command (here util.readOutput(command)), you should get a InterruptedException, and upon this exception you should throw it again if you've catched it like you do here, otherwise the script will continue to run.

If the command executing does not throw InterruptedException at all, please check in the console for the running "p4" command to see if responds to SIGTERM.