mirror of
https://github.com/odoo/runbot.git
synced 2025-04-03 00:35:51 +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
213 lines
10 KiB
XML
213 lines
10 KiB
XML
<odoo>
|
|
<data>
|
|
|
|
<record id="config_form" model="ir.ui.view">
|
|
<field name="model">runbot.build.config</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Build config">
|
|
<sheet>
|
|
<div attrs="{'invisible': [('protected', '=', False)]}">
|
|
<i class="fa fa-warning text-warning"/>This record is protected and can only be edited by config administrator.
|
|
</div>
|
|
<group>
|
|
<field name="name"/>
|
|
<field name="description"/>
|
|
<field name="step_order_ids">
|
|
<tree string="Step list" editable="bottom">
|
|
<field name="step_id" widget="Many2one" options="{'no_edit': 1}"/>
|
|
<field name="sequence" widget="handle"/>
|
|
</tree>
|
|
</field>
|
|
<field name="protected" groups="base.group_no_one"/>
|
|
<field name="group" groups="base.group_no_one"/>
|
|
</group>
|
|
</sheet>
|
|
<div class="oe_chatter">
|
|
<field name="message_follower_ids" widget="mail_followers"/>
|
|
<field name="message_ids" widget="mail_thread"/>
|
|
</div>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="config_step_form" model="ir.ui.view">
|
|
<field name="model">runbot.build.config.step</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Build config step">
|
|
<sheet>
|
|
<div t-att-class="label label-warning" attrs="{'invisible': [('protected', '=', False)]}">
|
|
This record is protected and can only be edited by config administrator.
|
|
</div>
|
|
<group string="General settings">
|
|
<field name="name"/>
|
|
<field name="description"/>
|
|
<field name="domain_filter"/>
|
|
<field name="job_type"/>
|
|
<field name="make_stats"/>
|
|
<field name="protected" groups="base.group_no_one"/>
|
|
<field name="default_sequence" groups="base.group_no_one"/>
|
|
<field name="group" groups="base.group_no_one"/>
|
|
</group>
|
|
<group string="Stats regexes" attrs="{'invisible': [('make_stats', '=', False)]}">
|
|
<field name="build_stat_regex_ids">
|
|
<tree string="Regexes" editable="bottom">
|
|
<field name="name"/>
|
|
<field name="regex"/>
|
|
<field name="description"/>
|
|
</tree>
|
|
</field>
|
|
</group>
|
|
<group string="Python settings" attrs="{'invisible': [('job_type', 'not in', ('python'))]}">
|
|
<field name="python_code" widget="ace" options="{'mode': 'python'}"/>
|
|
<field name="python_result_code" widget="ace" options="{'mode': 'python'}"/>
|
|
<field name="running_job"/>
|
|
</group>
|
|
<group string="Test settings" attrs="{'invisible': [('job_type', 'not in', ('python', 'install_odoo'))]}">
|
|
<field name="create_db" groups="base.group_no_one"/>
|
|
<field name="install_modules"/>
|
|
<field name="db_name" groups="base.group_no_one"/>
|
|
<field name="cpu_limit" groups="base.group_no_one"/>
|
|
<field name="coverage"/>
|
|
<field name="paths_to_omit" attrs="{'invisible': [('coverage', '!=', True)]}"/>
|
|
<field name="test_enable"/>
|
|
<field name="test_tags"/>
|
|
<field name="enable_auto_tags"/>
|
|
<field name="sub_command"/>
|
|
</group>
|
|
<group string="Extra Parameters" attrs="{'invisible': [('job_type', 'not in', ('python', 'install_odoo', 'test_upgrade', 'run_odoo'))]}">
|
|
<field name="extra_params"/>
|
|
<field name="additionnal_env"/>
|
|
</group>
|
|
<group string="Create settings" attrs="{'invisible': [('job_type', 'not in', ('python', 'create_build'))]}">
|
|
<field name="create_config_ids" widget="many2many_tags" options="{'no_create': True}" />
|
|
<field name="number_builds"/>
|
|
<field name="make_orphan"/>
|
|
</group>
|
|
<group attrs="{'invisible': [('job_type', 'not in', ('python', 'configure_upgrade'))]}">
|
|
<group class="col" string="Target version settings">
|
|
<field string="Current" name="upgrade_to_current"/>
|
|
<field string="Master" name="upgrade_to_master"/>
|
|
<field string="Major" name="upgrade_to_major_versions"/>
|
|
<field string="All saas" name="upgrade_to_all_versions"/>
|
|
<field string="Explicit list" name="upgrade_to_version_ids" widget="many2many_tags"/>
|
|
</group>
|
|
<group class="col" string="Source version settings">
|
|
<field string="Major" name="upgrade_from_previous_major_version"/>
|
|
<field string="Last saas" name="upgrade_from_last_intermediate_version"/>
|
|
<field string="All saas" name="upgrade_from_all_intermediate_version"/>
|
|
<field string="Explicit list" name="upgrade_from_version_ids" widget="many2many_tags"/>
|
|
</group>
|
|
<group string="Upgrade settings" class="o_group_col_12">
|
|
<field name="upgrade_flat"/>
|
|
<field name="upgrade_config_id"/>
|
|
<field string="Db to upgrade" name="upgrade_dbs">
|
|
<tree editable="bottom">
|
|
<field name="config_id"/>
|
|
<field name="db_pattern"/>
|
|
<field name="min_target_version_id"/>
|
|
</tree>
|
|
</field>
|
|
</group>
|
|
</group>
|
|
<group string="Restore settings" attrs="{'invisible': [('job_type', '!=', 'restore')]}">
|
|
<field name="restore_download_db_suffix"/>
|
|
<field name="restore_rename_db_suffix"/>
|
|
</group>
|
|
|
|
<group string="Codeowner settings" attrs="{'invisible': [('job_type', 'not in', ('codeowner', 'python'))]}">
|
|
<field name="fallback_reviewer"/>
|
|
</group>
|
|
<group>
|
|
<field name="step_order_ids" groups="base.group_no_one" readonly="1">
|
|
<tree>
|
|
<field name="config_id" widget="Many2one" options="{'no_edit': 1}"/>
|
|
</tree>
|
|
</field>
|
|
</group>
|
|
</sheet>
|
|
<div class="oe_chatter">
|
|
<field name="message_follower_ids" widget="mail_followers"/>
|
|
<field name="message_ids" widget="mail_thread"/>
|
|
</div>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="runbot_config_tree_view" model="ir.ui.view">
|
|
<field name="name">Runbot Config tree view</field>
|
|
<field name="model">runbot.build.config</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Build Configs">
|
|
<field name="name"/>
|
|
<field name="description"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="runbot_step_config_tree_view" model="ir.ui.view">
|
|
<field name="name">Runbot Config Step tree view</field>
|
|
<field name="model">runbot.build.config.step</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Build Config Steps">
|
|
<field name="name"/>
|
|
<field name="job_type"/>
|
|
<field name="group"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="runbot_config_search_view" model="ir.ui.view">
|
|
<field name="name">runbot.build.config.filter</field>
|
|
<field name="model">runbot.build.config</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Search config">
|
|
<field name="name"/>
|
|
<field name="group_name"/>
|
|
<filter string="Is in a group" name='is_in_group' domain="[(['group', '!=', False])]"/>
|
|
<filter string="No step's defined" name="no_step" domain="[(['step_order_ids', '=', False])]"/>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="runbot_config_step_search_view" model="ir.ui.view">
|
|
<field name="name">runbot.build.config.step.filter</field>
|
|
<field name="model">runbot.build.config.step</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Search config step">
|
|
<field name="name"/>
|
|
<field name="group_name"/>
|
|
<field name="python_code" filter_domain="[
|
|
'|',
|
|
('python_code', 'ilike', self),
|
|
('python_result_code', 'ilike', self),
|
|
]">
|
|
</field>
|
|
<filter string="Install job" name='install_job' domain="[(['job_type', '=', 'install_odoo'])]"/>
|
|
<filter string="Run job" name='run_job' domain="[(['job_type', '=', 'run_odoo'])]"/>
|
|
<filter string="Python job" name='python_job' domain="[(['job_type', '=', 'python'])]"/>
|
|
<filter string="Create job" name='create_job' domain="[(['job_type', '=', 'create_build'])]"/>
|
|
<separator/>
|
|
<filter string="Is in a group" name='is_in_group' domain="[(['group', '!=', False])]"/>
|
|
<separator/>
|
|
<filter string="No config defined" name="no_step" domain="[(['step_order_ids', '=', False])]"/>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="open_view_job_config_tree" model="ir.actions.act_window">
|
|
<field name="name">Build Configs</field>
|
|
<field name="res_model">runbot.build.config</field>
|
|
<field name="view_mode">tree,form</field>
|
|
</record>
|
|
|
|
<record id="open_view_job_tree" model="ir.actions.act_window">
|
|
<field name="name">Build Config Steps</field>
|
|
<field name="res_model">runbot.build.config.step</field>
|
|
<field name="view_mode">tree,form</field>
|
|
</record>
|
|
|
|
|
|
|
|
</data>
|
|
</odoo>
|