It's all about the answers!

Ask a question

Trying to use Build Forge filter to stop/cancel a step


Martina Riedel (20323341) | asked Jan 07 '13, 7:34 p.m.
Our "execute build" step in BF calls legacy makefiles.
We just had a case where some program it was calling wanted a y/n from stdin and it just kept looping, filling up logs and the db.

It is a very easy pattern to detect with a BF filter. The problem I have is to get it to actually stop or cancel the build.
I tried actions "stop build with fail result" and "set fail / halt". I expected the first one to work, but it doesn't.
The test I have displays the significant string 30 times and then something else. The match works, I see that in the step log, but it finishes everything up and then fails the step.
In the case of an endless loop I want it to stop the thing right then and there. I also let it output the line 5000 times and it didn't stop it.
I don't think this is "works as designed" - or?
Does anybody have any ideas what could be wrong? It should be pretty straight forward. It almost feels to me like it is so busy matching the pattern that it doesn't have time to stop the build.

this is BF 7.1.2.2

Accepted answer


permanent link
Spencer Murata (2.3k115971) | answered Jan 08 '13, 8:25 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
 Unfortunately the step filter is for when the step is complete.  Once the step is complete it will determine if the step was a success or a failure, there isn't any mechanism in BF to step into a running step and preemptively terminate a step.  The matching that is happening is in parallel to the step execution, but it will never stop the step from running.  It will only halt the build at that step when the step is complete.  Is there no way to strip out the stdin?  Or maybe wrap the script to echo in the required 'y'?

~Spencer
Martina Riedel selected this answer as the correct answer

Comments
Martina Riedel commented Jan 08 '13, 9:13 a.m.

they could just call the tool right. It is a case of not really knowing what users will come up with. We can look at doing something with stdin or the script so it doesn't think that it is in an interactive shell. It would have been nice if we could just stop it with the filter.
Thanks

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.