From af7a8b7d8b9608a162e408b6c1f58b3e51196d8f Mon Sep 17 00:00:00 2001 From: Xavier-Do Date: Mon, 17 Jun 2019 17:45:55 +0200 Subject: [PATCH] [IMP] runbot: kill subbuild when killing build --- runbot/models/build.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/runbot/models/build.py b/runbot/models/build.py index 8749f0bc..675708fb 100644 --- a/runbot/models/build.py +++ b/runbot/models/build.py @@ -806,6 +806,9 @@ class runbot_build(models.Model): elif build.local_state in ['testing', 'running']: build.write({'local_state': 'deathrow'}) build._log('_ask_kill', 'Killing build %s, requested by %s (user #%s)' % (build.dest, user.name, uid)) + for child in build.children_ids: # should we filter build that are target of a duplicate_id? + if not build.duplicate_id and build.local_state != 'done': + child._ask_kill() def _cmd(self): # why not remove build.modules output ? """Return a tuple describing the command to start the build