This commit is contained in:
Xavier-Do 2025-03-14 13:18:38 +01:00
parent 9097aa4545
commit 6866607d10
5 changed files with 12 additions and 9 deletions

View File

@ -6,7 +6,7 @@
'author': "Odoo SA",
'website': "http://runbot.odoo.com",
'category': 'Website',
'version': '5.9',
'version': '5.10',
'application': True,
'depends': ['base', 'base_automation', 'website'],
'data': [

View File

@ -0,0 +1,3 @@
def migrate(cr, version):
cr.execute("UPDATE runbot_build set local_state='killed' where local_state='manually_killed')
cr.execute("UPDATE runbot_build set global_state='killed' where global_state='manually_killed')

View File

@ -147,7 +147,7 @@ class Batch(models.Model):
domain += [('host', '=', self.bundle_id.host_id.name), ('keep_host', '=', True)]
build = self.env['runbot.build'].search(domain, limit=1, order='id desc')
link_type = 'matched'
killed_states = ('skipped', 'killed', 'manually_killed')
killed_states = ('skipped', 'killed')
if build and build.local_result not in killed_states and build.global_result not in killed_states:
if build.killable:
build.killable = False

View File

@ -28,7 +28,7 @@ from odoo.tools.safe_eval import safe_eval
_logger = logging.getLogger(__name__)
result_order = ['ok', 'warn', 'ko', 'skipped', 'killed', 'manually_killed']
result_order = ['ok', 'warn', 'ko', 'skipped', 'killed']
state_order = ['pending', 'testing', 'waiting', 'running', 'done']
COPY_WHITELIST = [
@ -414,7 +414,7 @@ class BuildResult(models.Model):
def _result_multi(self):
if all(build.global_result == 'ok' or not build.global_result for build in self):
return 'ok'
if any(build.global_result in ('skipped', 'killed', 'manually_killed') for build in self):
if any(build.global_result in ('skipped', 'killed') for build in self):
return 'killed'
if any(build.global_result == 'ko' for build in self):
return 'ko'
@ -680,7 +680,7 @@ class BuildResult(models.Model):
if build.requested_action == 'deathrow':
result = None
if build.local_state != 'running' and build.global_result not in ('warn', 'ko'):
result = 'manually_killed'
result = 'killed'
build._kill(result=result)
return
@ -1226,7 +1226,7 @@ class BuildResult(models.Model):
if self.global_result == 'ok':
return 'success'
if self.global_result in ('skipped', 'killed', 'manually_killed'):
if self.global_result in ('skipped', 'killed'):
return 'secondary'
return 'default'

View File

@ -19,7 +19,7 @@
<meta http-equiv="refresh" t-att-content="refresh"/>
</t>
<t t-if="not page_info_state or page_info_state == 'ok' or page_info_state not in ('warn', 'ko', 'skipped', 'killed', 'manually_killed')">
<t t-if="not page_info_state or page_info_state == 'ok' or page_info_state not in ('warn', 'ko', 'skipped', 'killed')">
<link rel="icon" type="image/png" href="/runbot/static/src/img/icon_ok.png"/>
<link rel="icon" type="image/svg+xml" href="/runbot/static/src/img/icon_ok.svg"/>
</t>
@ -35,7 +35,7 @@
<link rel="icon" type="image/png" href="/runbot/static/src/img/icon_skipped.png"/>
<link rel="icon" type="image/svg+xml" href="/runbot/static/src/img/icon_skipped.svg"/>
</t>
<t t-elif="page_info_state == 'killed' or page_info_state == 'manually_killed'">
<t t-elif="page_info_state == 'killed'">
<link rel="icon" type="image/png" href="/runbot/static/src/img/icon_killed.png"/>
<link rel="icon" type="image/svg+xml" href="/runbot/static/src/img/icon_killed.svg"/>
</t>
@ -280,7 +280,7 @@
<t t-if="build.global_result == 'skipped'">
<t t-set="rowclass">default</t>
</t>
<t t-if="build.global_result in ['killed', 'manually_killed']">
<t t-if="build.global_result in ['killed']">
<t t-set="rowclass">killed</t>
</t>
</t>