Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

15.0 upgrade imps xdo #775

Open
wants to merge 3 commits into
base: 16.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion runbot/models/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,7 @@ def _local_pg_createdb(self, dbname):
self.env['runbot.database'].create({'name': dbname, 'build_id': self.id})

def _log(self, func, message, level='INFO', log_type='runbot', path='runbot'):

message = str(message)
if len(message) > 300000:
message = message[:300000] + '[Truncate, message too long]'

Expand Down
5 changes: 4 additions & 1 deletion runbot/models/build_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ class ConfigStep(models.Model):
upgrade_to_version_ids = fields.Many2many('runbot.version', relation='runbot_upgrade_to_version_ids', string='Forced version to use as target')
# 2. define source from target
upgrade_from_current = fields.Boolean(help="If checked, only upgrade from current will be used, other options will be ignored Template should be installed in the same build")
upgrade_from_base = fields.Boolean()
upgrade_from_previous_major_version = fields.Boolean() # 13.0
upgrade_from_last_intermediate_version = fields.Boolean() # 13.3
upgrade_from_all_intermediate_version = fields.Boolean() # 13.2 # 13.1
Expand Down Expand Up @@ -677,6 +678,8 @@ def _get_upgrade_source_versions(self, target_version):
return self.upgrade_from_version_ids
else:
versions = self.env['runbot.version'].browse()
if self.upgrade_from_base:
versions |= target_version
if self.upgrade_from_previous_major_version:
versions |= target_version.previous_major_version_id
if self.upgrade_from_all_intermediate_version:
Expand Down Expand Up @@ -857,7 +860,7 @@ def log_end(self, build):
return

kwargs = dict(message='Step %s finished in %s' % (self.name, s2human(build.job_time)))
if self.job_type == 'install_odoo':
if self.job_type == 'install_odoo' or (self.job_type == 'python' and '_run_install_odoo' in self.python_code):
kwargs['message'] += ' $$fa-download$$'
db_suffix = build.params_id.config_data.get('db_name') or (build.params_id.dump_db.db_suffix if not self.create_db else False) or self.db_name
kwargs['path'] = '%s%s-%s.zip' % (build.http_log_url(), build.dest, db_suffix)
Expand Down
1 change: 1 addition & 0 deletions runbot/views/config_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
<field string="Explicit list" name="upgrade_to_version_ids" widget="many2many_tags"/>
</group>
<group class="col" string="Source version settings">
<field string="Base" name="upgrade_from_base"/>
<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"/>
Expand Down