mirror of
https://github.com/odoo/runbot.git
synced 2025-03-30 14:55:45 +07:00

The initial motivation is to remove the flush when a log_counter is written. This flush was initially usefull when the limit was in a psql trigger, but finally add a side effect to flush everything before starting the docker. This was limiting concurrent update after starting the docker, but we still have no garantee that the transaction is commited after starting the docker. The use case where the docker is started but the transaction is not commited was not handled well and was leading to an infinite loop of trying to start a docker (while the docker was already started) This refactoring returns the docker to the scheduler so that the schedulter can commit before starting the docker. To achieve this, it is ideal to have only one method that could return a callable in the _scheduler loop. This is done by removing the run_job from the init_pending method. All satellite method like make result are also modified and adapted to make direct write: the old way was technical debt, useless optimization from pre-v13. Other piece of code are moved arround to prepare for future changes, mainly to make the last commit easier to revert if needed. [FIX] runbot: adapt tests to previous refactoring
151 lines
7.0 KiB
XML
151 lines
7.0 KiB
XML
<odoo>
|
|
<data>
|
|
<record id="build_form_params" model="ir.ui.view">
|
|
<field name="model">runbot.build.params</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Build Params">
|
|
<sheet>
|
|
<group>
|
|
<group colspan="2">
|
|
<field name="config_id"/>
|
|
<field name="config_data"/>
|
|
<field name="extra_params"/>
|
|
<field name="dockerfile_id"/>
|
|
<field name="dump_db"/>
|
|
</group>
|
|
<group colspan="2">
|
|
<field name="trigger_id"/>
|
|
<field name="create_batch_id"/>
|
|
<field name="version_id"/>
|
|
<field name="used_custom_trigger"/>
|
|
</group>
|
|
</group>
|
|
<group>
|
|
<notebook>
|
|
<page string="Commits">
|
|
<field name="commit_link_ids">
|
|
<tree>
|
|
<field name="commit_id"/>
|
|
<field name="match_type"/>
|
|
</tree>
|
|
</field>
|
|
</page>
|
|
<page string="Builds">
|
|
<field name="build_ids"/>
|
|
</page>
|
|
<page string="Reference Builds">
|
|
<field name="builds_reference_ids"/>
|
|
</page>
|
|
</notebook>
|
|
</group>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
<record id="view_build_params_tree" model="ir.ui.view">
|
|
<field name="model">runbot.build.params</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Build params">
|
|
<field name="config_id"/>
|
|
<field name="version_id"/>
|
|
<field name="commit_link_ids"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
<record id="build_form" model="ir.ui.view">
|
|
<field name="model">runbot.build</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Build">
|
|
<sheet>
|
|
<group>
|
|
<field name="description"/>
|
|
<field name="params_id"/>
|
|
<field name="config_id"/>
|
|
<field name="port" groups="base.group_no_one"/>
|
|
<field name="dest"/>
|
|
<field name="local_state"/>
|
|
<field name="global_state"/>
|
|
<field name="requested_action" groups="base.group_no_one"/>
|
|
<field name="local_result"/>
|
|
<field name="global_result"/>
|
|
<field name="host"/>
|
|
<field name="host_id"/>
|
|
<field name="job_start" groups="base.group_no_one"/>
|
|
<field name="job_end" groups="base.group_no_one"/>
|
|
<field name="job_time" groups="base.group_no_one"/>
|
|
<field name="build_start" groups="base.group_no_one"/>
|
|
<field name="build_end" groups="base.group_no_one"/>
|
|
<field name="build_time" groups="base.group_no_one"/>
|
|
<field name="build_age" groups="base.group_no_one"/>
|
|
<field name="build_type"/>
|
|
<field name="parent_id"/>
|
|
<field name="orphan_result"/>
|
|
<field name="build_url" widget="url" readonly="1"/>
|
|
<field name="keep_running"/>
|
|
<field name="gc_date" readonly="1"/>
|
|
<field name="gc_delay"/>
|
|
</group>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
<record id="view_build_tree" model="ir.ui.view">
|
|
<field name="model">runbot.build</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Builds">
|
|
<field name="dest"/>
|
|
<field name="global_state"/>
|
|
<field name="global_result"/>
|
|
<field name="job"/>
|
|
<field name="host"/>
|
|
<field name="build_time"/>
|
|
<field name="build_age"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
<record id="view_build_pivot" model="ir.ui.view">
|
|
<field name="name">runbot.pivot</field>
|
|
<field name="model">runbot.build</field>
|
|
<field name="arch" type="xml">
|
|
<pivot string="Builds analysis">
|
|
<field name="create_date" interval="week" type="row"/>
|
|
<field name="global_state" type="col"/>
|
|
</pivot>
|
|
</field>
|
|
</record>
|
|
<record id="view_build_search" model="ir.ui.view">
|
|
<field name="model">runbot.build</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Search builds">
|
|
<field name="id"/>
|
|
<field name="global_state"/>
|
|
<field name="dest"/>
|
|
<filter string="Pending" name='pending' domain="[('global_state','=', 'pending')]"/>
|
|
<filter string="Testing" name='testing' domain="[('global_state','in', ('testing', 'waiting'))]"/>
|
|
<filter string="Running" name='running' domain="[('global_state','=', 'running')]"/>
|
|
<filter string="Done" name='done' domain="[('global_state','=','done')]"/>
|
|
<filter string="Duplicate" name='duplicate' domain="[('local_state','=', 'duplicate')]"/>
|
|
<group expand="0" string="Group By...">
|
|
<filter string="Status" name='status' domain="[]" context="{'group_by':'global_state'}"/>
|
|
<filter string="Result" name='result' domain="[]" context="{'group_by':'global_result'}"/>
|
|
<filter string="Start" name='start' domain="[]" context="{'group_by':'job_start'}"/>
|
|
<filter string="Host" name='host' domain="[]" context="{'group_by':'host'}"/>
|
|
<filter string="Create Date" name='create_date' domain="[]" context="{'group_by':'create_date'}"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
<record id="action_build" model="ir.actions.act_window">
|
|
<field name="name">Builds</field>
|
|
<field name="type">ir.actions.act_window</field>
|
|
<field name="res_model">runbot.build</field>
|
|
<field name="view_mode">tree,form,graph,pivot</field>
|
|
</record>
|
|
<record id="action_build_params" model="ir.actions.act_window">
|
|
<field name="name">Builds Params</field>
|
|
<field name="type">ir.actions.act_window</field>
|
|
<field name="res_model">runbot.build.params</field>
|
|
<field name="view_mode">tree,form</field>
|
|
</record>
|
|
</data>
|
|
</odoo> |